Files
sdk/model_email_send_grid_status_result.go

725 lines
22 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the EmailSendGridStatusResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EmailSendGridStatusResult{}
// EmailSendGridStatusResult struct for EmailSendGridStatusResult
type EmailSendGridStatusResult struct {
// ActiveProvider is the provider the org's mail leaves by when a request pins none.
ActiveProvider *string `json:"active_provider,omitempty"`
// ASMGroupID is the optional SendGrid suppression group ID.
AsmGroupId *string `json:"asm_group_id,omitempty"`
// Configured reports whether the org holds the SendGrid credentials a send needs (api-key, from-email).
Configured *bool `json:"configured,omitempty"`
// CreditsRemaining is the credits left in the period.
CreditsRemaining *int64 `json:"credits_remaining,omitempty"`
// CreditsTotal, CreditsRemaining and CreditsUsed are the account's sending credits for the period, as SendGrid answers them.
CreditsTotal *int64 `json:"credits_total,omitempty"`
// CreditsUsed is the credits used in the period.
CreditsUsed *int64 `json:"credits_used,omitempty"`
// DNSRecords lists the required SendGrid Domain Authentication CNAME, Link Branding, SPF, and DMARC DNS records.
DnsRecords []EmailSESDNSRecord `json:"dns_records,omitempty"`
// Domain is the sending domain used for SendGrid Domain Authentication and DMARC.
Domain *string `json:"domain,omitempty"`
// FromEmail is the configured SendGrid outreach sender email address.
FromEmail *string `json:"from_email,omitempty"`
// FromName is the configured SendGrid outreach sender display name.
FromName *string `json:"from_name,omitempty"`
// IPPool is the SendGrid IP pool the credential names, if any.
IpPool *string `json:"ip_pool,omitempty"`
// Org is the organization identifier.
Org *string `json:"org,omitempty"`
// QuotaError says why the account's credits could not be read; they are then 0.
QuotaError *string `json:"quota_error,omitempty"`
// ReplyTo is the configured Reply-To address for outreach replies.
ReplyTo *string `json:"reply_to,omitempty"`
// SentLast24Hours is what the org's ledger counts sent by SendGrid in the last 24 hours: through POST /v1/email, and every message SendGrid's events told of.
SentLast24Hours *int64 `json:"sent_last_24_hours,omitempty"`
// SeparateFromTwilioNotify confirms that SendGrid outreach uses its own dedicated API key, sender identity, and IP pool distinct from standard Twilio transactional notifications.
SeparateFromTwilioNotify *bool `json:"separate_from_twilio_notify,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EmailSendGridStatusResult EmailSendGridStatusResult
// NewEmailSendGridStatusResult instantiates a new EmailSendGridStatusResult object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewEmailSendGridStatusResult() *EmailSendGridStatusResult {
this := EmailSendGridStatusResult{}
return &this
}
// NewEmailSendGridStatusResultWithDefaults instantiates a new EmailSendGridStatusResult object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewEmailSendGridStatusResultWithDefaults() *EmailSendGridStatusResult {
this := EmailSendGridStatusResult{}
return &this
}
// GetActiveProvider returns the ActiveProvider field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetActiveProvider() string {
if o == nil || IsNil(o.ActiveProvider) {
var ret string
return ret
}
return *o.ActiveProvider
}
// GetActiveProviderOk returns a tuple with the ActiveProvider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetActiveProviderOk() (*string, bool) {
if o == nil || IsNil(o.ActiveProvider) {
return nil, false
}
return o.ActiveProvider, true
}
// HasActiveProvider returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasActiveProvider() bool {
if o != nil && !IsNil(o.ActiveProvider) {
return true
}
return false
}
// SetActiveProvider gets a reference to the given string and assigns it to the ActiveProvider field.
func (o *EmailSendGridStatusResult) SetActiveProvider(v string) {
o.ActiveProvider = &v
}
// GetAsmGroupId returns the AsmGroupId field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetAsmGroupId() string {
if o == nil || IsNil(o.AsmGroupId) {
var ret string
return ret
}
return *o.AsmGroupId
}
// GetAsmGroupIdOk returns a tuple with the AsmGroupId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetAsmGroupIdOk() (*string, bool) {
if o == nil || IsNil(o.AsmGroupId) {
return nil, false
}
return o.AsmGroupId, true
}
// HasAsmGroupId returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasAsmGroupId() bool {
if o != nil && !IsNil(o.AsmGroupId) {
return true
}
return false
}
// SetAsmGroupId gets a reference to the given string and assigns it to the AsmGroupId field.
func (o *EmailSendGridStatusResult) SetAsmGroupId(v string) {
o.AsmGroupId = &v
}
// GetConfigured returns the Configured field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetConfigured() bool {
if o == nil || IsNil(o.Configured) {
var ret bool
return ret
}
return *o.Configured
}
// GetConfiguredOk returns a tuple with the Configured field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetConfiguredOk() (*bool, bool) {
if o == nil || IsNil(o.Configured) {
return nil, false
}
return o.Configured, true
}
// HasConfigured returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasConfigured() bool {
if o != nil && !IsNil(o.Configured) {
return true
}
return false
}
// SetConfigured gets a reference to the given bool and assigns it to the Configured field.
func (o *EmailSendGridStatusResult) SetConfigured(v bool) {
o.Configured = &v
}
// GetCreditsRemaining returns the CreditsRemaining field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetCreditsRemaining() int64 {
if o == nil || IsNil(o.CreditsRemaining) {
var ret int64
return ret
}
return *o.CreditsRemaining
}
// GetCreditsRemainingOk returns a tuple with the CreditsRemaining field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetCreditsRemainingOk() (*int64, bool) {
if o == nil || IsNil(o.CreditsRemaining) {
return nil, false
}
return o.CreditsRemaining, true
}
// HasCreditsRemaining returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasCreditsRemaining() bool {
if o != nil && !IsNil(o.CreditsRemaining) {
return true
}
return false
}
// SetCreditsRemaining gets a reference to the given int64 and assigns it to the CreditsRemaining field.
func (o *EmailSendGridStatusResult) SetCreditsRemaining(v int64) {
o.CreditsRemaining = &v
}
// GetCreditsTotal returns the CreditsTotal field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetCreditsTotal() int64 {
if o == nil || IsNil(o.CreditsTotal) {
var ret int64
return ret
}
return *o.CreditsTotal
}
// GetCreditsTotalOk returns a tuple with the CreditsTotal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetCreditsTotalOk() (*int64, bool) {
if o == nil || IsNil(o.CreditsTotal) {
return nil, false
}
return o.CreditsTotal, true
}
// HasCreditsTotal returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasCreditsTotal() bool {
if o != nil && !IsNil(o.CreditsTotal) {
return true
}
return false
}
// SetCreditsTotal gets a reference to the given int64 and assigns it to the CreditsTotal field.
func (o *EmailSendGridStatusResult) SetCreditsTotal(v int64) {
o.CreditsTotal = &v
}
// GetCreditsUsed returns the CreditsUsed field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetCreditsUsed() int64 {
if o == nil || IsNil(o.CreditsUsed) {
var ret int64
return ret
}
return *o.CreditsUsed
}
// GetCreditsUsedOk returns a tuple with the CreditsUsed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetCreditsUsedOk() (*int64, bool) {
if o == nil || IsNil(o.CreditsUsed) {
return nil, false
}
return o.CreditsUsed, true
}
// HasCreditsUsed returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasCreditsUsed() bool {
if o != nil && !IsNil(o.CreditsUsed) {
return true
}
return false
}
// SetCreditsUsed gets a reference to the given int64 and assigns it to the CreditsUsed field.
func (o *EmailSendGridStatusResult) SetCreditsUsed(v int64) {
o.CreditsUsed = &v
}
// GetDnsRecords returns the DnsRecords field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetDnsRecords() []EmailSESDNSRecord {
if o == nil || IsNil(o.DnsRecords) {
var ret []EmailSESDNSRecord
return ret
}
return o.DnsRecords
}
// GetDnsRecordsOk returns a tuple with the DnsRecords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetDnsRecordsOk() ([]EmailSESDNSRecord, bool) {
if o == nil || IsNil(o.DnsRecords) {
return nil, false
}
return o.DnsRecords, true
}
// HasDnsRecords returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasDnsRecords() bool {
if o != nil && !IsNil(o.DnsRecords) {
return true
}
return false
}
// SetDnsRecords gets a reference to the given []EmailSESDNSRecord and assigns it to the DnsRecords field.
func (o *EmailSendGridStatusResult) SetDnsRecords(v []EmailSESDNSRecord) {
o.DnsRecords = v
}
// GetDomain returns the Domain field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetDomain() string {
if o == nil || IsNil(o.Domain) {
var ret string
return ret
}
return *o.Domain
}
// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetDomainOk() (*string, bool) {
if o == nil || IsNil(o.Domain) {
return nil, false
}
return o.Domain, true
}
// HasDomain returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasDomain() bool {
if o != nil && !IsNil(o.Domain) {
return true
}
return false
}
// SetDomain gets a reference to the given string and assigns it to the Domain field.
func (o *EmailSendGridStatusResult) SetDomain(v string) {
o.Domain = &v
}
// GetFromEmail returns the FromEmail field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetFromEmail() string {
if o == nil || IsNil(o.FromEmail) {
var ret string
return ret
}
return *o.FromEmail
}
// GetFromEmailOk returns a tuple with the FromEmail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetFromEmailOk() (*string, bool) {
if o == nil || IsNil(o.FromEmail) {
return nil, false
}
return o.FromEmail, true
}
// HasFromEmail returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasFromEmail() bool {
if o != nil && !IsNil(o.FromEmail) {
return true
}
return false
}
// SetFromEmail gets a reference to the given string and assigns it to the FromEmail field.
func (o *EmailSendGridStatusResult) SetFromEmail(v string) {
o.FromEmail = &v
}
// GetFromName returns the FromName field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetFromName() string {
if o == nil || IsNil(o.FromName) {
var ret string
return ret
}
return *o.FromName
}
// GetFromNameOk returns a tuple with the FromName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetFromNameOk() (*string, bool) {
if o == nil || IsNil(o.FromName) {
return nil, false
}
return o.FromName, true
}
// HasFromName returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasFromName() bool {
if o != nil && !IsNil(o.FromName) {
return true
}
return false
}
// SetFromName gets a reference to the given string and assigns it to the FromName field.
func (o *EmailSendGridStatusResult) SetFromName(v string) {
o.FromName = &v
}
// GetIpPool returns the IpPool field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetIpPool() string {
if o == nil || IsNil(o.IpPool) {
var ret string
return ret
}
return *o.IpPool
}
// GetIpPoolOk returns a tuple with the IpPool field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetIpPoolOk() (*string, bool) {
if o == nil || IsNil(o.IpPool) {
return nil, false
}
return o.IpPool, true
}
// HasIpPool returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasIpPool() bool {
if o != nil && !IsNil(o.IpPool) {
return true
}
return false
}
// SetIpPool gets a reference to the given string and assigns it to the IpPool field.
func (o *EmailSendGridStatusResult) SetIpPool(v string) {
o.IpPool = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *EmailSendGridStatusResult) SetOrg(v string) {
o.Org = &v
}
// GetQuotaError returns the QuotaError field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetQuotaError() string {
if o == nil || IsNil(o.QuotaError) {
var ret string
return ret
}
return *o.QuotaError
}
// GetQuotaErrorOk returns a tuple with the QuotaError field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetQuotaErrorOk() (*string, bool) {
if o == nil || IsNil(o.QuotaError) {
return nil, false
}
return o.QuotaError, true
}
// HasQuotaError returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasQuotaError() bool {
if o != nil && !IsNil(o.QuotaError) {
return true
}
return false
}
// SetQuotaError gets a reference to the given string and assigns it to the QuotaError field.
func (o *EmailSendGridStatusResult) SetQuotaError(v string) {
o.QuotaError = &v
}
// GetReplyTo returns the ReplyTo field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetReplyTo() string {
if o == nil || IsNil(o.ReplyTo) {
var ret string
return ret
}
return *o.ReplyTo
}
// GetReplyToOk returns a tuple with the ReplyTo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetReplyToOk() (*string, bool) {
if o == nil || IsNil(o.ReplyTo) {
return nil, false
}
return o.ReplyTo, true
}
// HasReplyTo returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasReplyTo() bool {
if o != nil && !IsNil(o.ReplyTo) {
return true
}
return false
}
// SetReplyTo gets a reference to the given string and assigns it to the ReplyTo field.
func (o *EmailSendGridStatusResult) SetReplyTo(v string) {
o.ReplyTo = &v
}
// GetSentLast24Hours returns the SentLast24Hours field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetSentLast24Hours() int64 {
if o == nil || IsNil(o.SentLast24Hours) {
var ret int64
return ret
}
return *o.SentLast24Hours
}
// GetSentLast24HoursOk returns a tuple with the SentLast24Hours field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetSentLast24HoursOk() (*int64, bool) {
if o == nil || IsNil(o.SentLast24Hours) {
return nil, false
}
return o.SentLast24Hours, true
}
// HasSentLast24Hours returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasSentLast24Hours() bool {
if o != nil && !IsNil(o.SentLast24Hours) {
return true
}
return false
}
// SetSentLast24Hours gets a reference to the given int64 and assigns it to the SentLast24Hours field.
func (o *EmailSendGridStatusResult) SetSentLast24Hours(v int64) {
o.SentLast24Hours = &v
}
// GetSeparateFromTwilioNotify returns the SeparateFromTwilioNotify field value if set, zero value otherwise.
func (o *EmailSendGridStatusResult) GetSeparateFromTwilioNotify() bool {
if o == nil || IsNil(o.SeparateFromTwilioNotify) {
var ret bool
return ret
}
return *o.SeparateFromTwilioNotify
}
// GetSeparateFromTwilioNotifyOk returns a tuple with the SeparateFromTwilioNotify field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSendGridStatusResult) GetSeparateFromTwilioNotifyOk() (*bool, bool) {
if o == nil || IsNil(o.SeparateFromTwilioNotify) {
return nil, false
}
return o.SeparateFromTwilioNotify, true
}
// HasSeparateFromTwilioNotify returns a boolean if a field has been set.
func (o *EmailSendGridStatusResult) HasSeparateFromTwilioNotify() bool {
if o != nil && !IsNil(o.SeparateFromTwilioNotify) {
return true
}
return false
}
// SetSeparateFromTwilioNotify gets a reference to the given bool and assigns it to the SeparateFromTwilioNotify field.
func (o *EmailSendGridStatusResult) SetSeparateFromTwilioNotify(v bool) {
o.SeparateFromTwilioNotify = &v
}
func (o EmailSendGridStatusResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EmailSendGridStatusResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ActiveProvider) {
toSerialize["active_provider"] = o.ActiveProvider
}
if !IsNil(o.AsmGroupId) {
toSerialize["asm_group_id"] = o.AsmGroupId
}
if !IsNil(o.Configured) {
toSerialize["configured"] = o.Configured
}
if !IsNil(o.CreditsRemaining) {
toSerialize["credits_remaining"] = o.CreditsRemaining
}
if !IsNil(o.CreditsTotal) {
toSerialize["credits_total"] = o.CreditsTotal
}
if !IsNil(o.CreditsUsed) {
toSerialize["credits_used"] = o.CreditsUsed
}
if !IsNil(o.DnsRecords) {
toSerialize["dns_records"] = o.DnsRecords
}
if !IsNil(o.Domain) {
toSerialize["domain"] = o.Domain
}
if !IsNil(o.FromEmail) {
toSerialize["from_email"] = o.FromEmail
}
if !IsNil(o.FromName) {
toSerialize["from_name"] = o.FromName
}
if !IsNil(o.IpPool) {
toSerialize["ip_pool"] = o.IpPool
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.QuotaError) {
toSerialize["quota_error"] = o.QuotaError
}
if !IsNil(o.ReplyTo) {
toSerialize["reply_to"] = o.ReplyTo
}
if !IsNil(o.SentLast24Hours) {
toSerialize["sent_last_24_hours"] = o.SentLast24Hours
}
if !IsNil(o.SeparateFromTwilioNotify) {
toSerialize["separate_from_twilio_notify"] = o.SeparateFromTwilioNotify
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EmailSendGridStatusResult) UnmarshalJSON(data []byte) (err error) {
varEmailSendGridStatusResult := _EmailSendGridStatusResult{}
err = json.Unmarshal(data, &varEmailSendGridStatusResult)
if err != nil {
return err
}
*o = EmailSendGridStatusResult(varEmailSendGridStatusResult)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "active_provider")
delete(additionalProperties, "asm_group_id")
delete(additionalProperties, "configured")
delete(additionalProperties, "credits_remaining")
delete(additionalProperties, "credits_total")
delete(additionalProperties, "credits_used")
delete(additionalProperties, "dns_records")
delete(additionalProperties, "domain")
delete(additionalProperties, "from_email")
delete(additionalProperties, "from_name")
delete(additionalProperties, "ip_pool")
delete(additionalProperties, "org")
delete(additionalProperties, "quota_error")
delete(additionalProperties, "reply_to")
delete(additionalProperties, "sent_last_24_hours")
delete(additionalProperties, "separate_from_twilio_notify")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEmailSendGridStatusResult struct {
value *EmailSendGridStatusResult
isSet bool
}
func (v NullableEmailSendGridStatusResult) Get() *EmailSendGridStatusResult {
return v.value
}
func (v *NullableEmailSendGridStatusResult) Set(val *EmailSendGridStatusResult) {
v.value = val
v.isSet = true
}
func (v NullableEmailSendGridStatusResult) IsSet() bool {
return v.isSet
}
func (v *NullableEmailSendGridStatusResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEmailSendGridStatusResult(val *EmailSendGridStatusResult) *NullableEmailSendGridStatusResult {
return &NullableEmailSendGridStatusResult{value: val, isSet: true}
}
func (v NullableEmailSendGridStatusResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEmailSendGridStatusResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}