mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
878 lines
24 KiB
Go
878 lines
24 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the EmailMessageRecord type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailMessageRecord{}
|
|
|
|
// EmailMessageRecord struct for EmailMessageRecord
|
|
type EmailMessageRecord struct {
|
|
// Bounce is hard or soft, for a message that bounced.
|
|
Bounce *string `json:"bounce,omitempty"`
|
|
// BouncedAt is when it bounced, and Bounce whether hard or soft.
|
|
BouncedAt *time.Time `json:"bounced_at,omitempty"`
|
|
// Campaign is the campaign the message was tagged with.
|
|
Campaign *string `json:"campaign,omitempty"`
|
|
// ClickedAt is when a link in it was first clicked.
|
|
ClickedAt *time.Time `json:"clicked_at,omitempty"`
|
|
// ComplainedAt is when its recipient reported it as spam.
|
|
ComplainedAt *time.Time `json:"complained_at,omitempty"`
|
|
// CreatedAt is when the message was sent, or accepted to be.
|
|
CreatedAt *time.Time `json:"created_at,omitempty"`
|
|
// DeliveredAt is when the receiving server first took it.
|
|
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
|
|
// Error says why it failed, bounced, was deferred or was rejected.
|
|
Error *string `json:"error,omitempty"`
|
|
// From is the sender address, when known.
|
|
From *string `json:"from,omitempty"`
|
|
// ID is our id for the message (msg_…): every link in it carries it as from=, and the event stream names it by it.
|
|
Id *string `json:"id,omitempty"`
|
|
// IdempotencyKey is the key the message was sent under.
|
|
IdempotencyKey *string `json:"idempotency_key,omitempty"`
|
|
// OpenedAt is when it was first opened.
|
|
OpenedAt *time.Time `json:"opened_at,omitempty"`
|
|
// Org is the organization owning this message.
|
|
Org *string `json:"org,omitempty"`
|
|
// Origin is api for a message POST /v1/email sent, provider for one the provider's events told of, sent from the org's own tools.
|
|
Origin *string `json:"origin,omitempty"`
|
|
// Provider is the rail it went by: ses or sendgrid.
|
|
Provider *string `json:"provider,omitempty"`
|
|
// ProviderID is the provider's own id for the message, which its events name it by; empty until the provider answers one.
|
|
ProviderId *string `json:"provider_id,omitempty"`
|
|
// Status is queued, sent, failed, delivered, opened, clicked, bounced or complained.
|
|
Status *string `json:"status,omitempty"`
|
|
// Subject is the message subject line, when known.
|
|
Subject *string `json:"subject,omitempty"`
|
|
// To lists the recipients.
|
|
To []string `json:"to,omitempty"`
|
|
// UnsubscribedAt is when its recipient unsubscribed from it.
|
|
UnsubscribedAt *time.Time `json:"unsubscribed_at,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailMessageRecord EmailMessageRecord
|
|
|
|
// NewEmailMessageRecord instantiates a new EmailMessageRecord 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 NewEmailMessageRecord() *EmailMessageRecord {
|
|
this := EmailMessageRecord{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailMessageRecordWithDefaults instantiates a new EmailMessageRecord 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 NewEmailMessageRecordWithDefaults() *EmailMessageRecord {
|
|
this := EmailMessageRecord{}
|
|
return &this
|
|
}
|
|
|
|
// GetBounce returns the Bounce field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetBounce() string {
|
|
if o == nil || IsNil(o.Bounce) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Bounce
|
|
}
|
|
|
|
// GetBounceOk returns a tuple with the Bounce field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetBounceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Bounce) {
|
|
return nil, false
|
|
}
|
|
return o.Bounce, true
|
|
}
|
|
|
|
// HasBounce returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasBounce() bool {
|
|
if o != nil && !IsNil(o.Bounce) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBounce gets a reference to the given string and assigns it to the Bounce field.
|
|
func (o *EmailMessageRecord) SetBounce(v string) {
|
|
o.Bounce = &v
|
|
}
|
|
|
|
// GetBouncedAt returns the BouncedAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetBouncedAt() time.Time {
|
|
if o == nil || IsNil(o.BouncedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.BouncedAt
|
|
}
|
|
|
|
// GetBouncedAtOk returns a tuple with the BouncedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetBouncedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.BouncedAt) {
|
|
return nil, false
|
|
}
|
|
return o.BouncedAt, true
|
|
}
|
|
|
|
// HasBouncedAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasBouncedAt() bool {
|
|
if o != nil && !IsNil(o.BouncedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBouncedAt gets a reference to the given time.Time and assigns it to the BouncedAt field.
|
|
func (o *EmailMessageRecord) SetBouncedAt(v time.Time) {
|
|
o.BouncedAt = &v
|
|
}
|
|
|
|
// GetCampaign returns the Campaign field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetCampaign() string {
|
|
if o == nil || IsNil(o.Campaign) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Campaign
|
|
}
|
|
|
|
// GetCampaignOk returns a tuple with the Campaign field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetCampaignOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Campaign) {
|
|
return nil, false
|
|
}
|
|
return o.Campaign, true
|
|
}
|
|
|
|
// HasCampaign returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasCampaign() bool {
|
|
if o != nil && !IsNil(o.Campaign) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCampaign gets a reference to the given string and assigns it to the Campaign field.
|
|
func (o *EmailMessageRecord) SetCampaign(v string) {
|
|
o.Campaign = &v
|
|
}
|
|
|
|
// GetClickedAt returns the ClickedAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetClickedAt() time.Time {
|
|
if o == nil || IsNil(o.ClickedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.ClickedAt
|
|
}
|
|
|
|
// GetClickedAtOk returns a tuple with the ClickedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetClickedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.ClickedAt) {
|
|
return nil, false
|
|
}
|
|
return o.ClickedAt, true
|
|
}
|
|
|
|
// HasClickedAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasClickedAt() bool {
|
|
if o != nil && !IsNil(o.ClickedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClickedAt gets a reference to the given time.Time and assigns it to the ClickedAt field.
|
|
func (o *EmailMessageRecord) SetClickedAt(v time.Time) {
|
|
o.ClickedAt = &v
|
|
}
|
|
|
|
// GetComplainedAt returns the ComplainedAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetComplainedAt() time.Time {
|
|
if o == nil || IsNil(o.ComplainedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.ComplainedAt
|
|
}
|
|
|
|
// GetComplainedAtOk returns a tuple with the ComplainedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetComplainedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.ComplainedAt) {
|
|
return nil, false
|
|
}
|
|
return o.ComplainedAt, true
|
|
}
|
|
|
|
// HasComplainedAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasComplainedAt() bool {
|
|
if o != nil && !IsNil(o.ComplainedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetComplainedAt gets a reference to the given time.Time and assigns it to the ComplainedAt field.
|
|
func (o *EmailMessageRecord) SetComplainedAt(v time.Time) {
|
|
o.ComplainedAt = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetCreatedAt() time.Time {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetCreatedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
|
func (o *EmailMessageRecord) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDeliveredAt returns the DeliveredAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetDeliveredAt() time.Time {
|
|
if o == nil || IsNil(o.DeliveredAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.DeliveredAt
|
|
}
|
|
|
|
// GetDeliveredAtOk returns a tuple with the DeliveredAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetDeliveredAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.DeliveredAt) {
|
|
return nil, false
|
|
}
|
|
return o.DeliveredAt, true
|
|
}
|
|
|
|
// HasDeliveredAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasDeliveredAt() bool {
|
|
if o != nil && !IsNil(o.DeliveredAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeliveredAt gets a reference to the given time.Time and assigns it to the DeliveredAt field.
|
|
func (o *EmailMessageRecord) SetDeliveredAt(v time.Time) {
|
|
o.DeliveredAt = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *EmailMessageRecord) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetFrom returns the From field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetFrom() string {
|
|
if o == nil || IsNil(o.From) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.From
|
|
}
|
|
|
|
// GetFromOk returns a tuple with the From field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetFromOk() (*string, bool) {
|
|
if o == nil || IsNil(o.From) {
|
|
return nil, false
|
|
}
|
|
return o.From, true
|
|
}
|
|
|
|
// HasFrom returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasFrom() bool {
|
|
if o != nil && !IsNil(o.From) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFrom gets a reference to the given string and assigns it to the From field.
|
|
func (o *EmailMessageRecord) SetFrom(v string) {
|
|
o.From = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *EmailMessageRecord) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetIdempotencyKey returns the IdempotencyKey field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetIdempotencyKey() string {
|
|
if o == nil || IsNil(o.IdempotencyKey) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.IdempotencyKey
|
|
}
|
|
|
|
// GetIdempotencyKeyOk returns a tuple with the IdempotencyKey field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetIdempotencyKeyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.IdempotencyKey) {
|
|
return nil, false
|
|
}
|
|
return o.IdempotencyKey, true
|
|
}
|
|
|
|
// HasIdempotencyKey returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasIdempotencyKey() bool {
|
|
if o != nil && !IsNil(o.IdempotencyKey) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIdempotencyKey gets a reference to the given string and assigns it to the IdempotencyKey field.
|
|
func (o *EmailMessageRecord) SetIdempotencyKey(v string) {
|
|
o.IdempotencyKey = &v
|
|
}
|
|
|
|
// GetOpenedAt returns the OpenedAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetOpenedAt() time.Time {
|
|
if o == nil || IsNil(o.OpenedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.OpenedAt
|
|
}
|
|
|
|
// GetOpenedAtOk returns a tuple with the OpenedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetOpenedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.OpenedAt) {
|
|
return nil, false
|
|
}
|
|
return o.OpenedAt, true
|
|
}
|
|
|
|
// HasOpenedAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasOpenedAt() bool {
|
|
if o != nil && !IsNil(o.OpenedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOpenedAt gets a reference to the given time.Time and assigns it to the OpenedAt field.
|
|
func (o *EmailMessageRecord) SetOpenedAt(v time.Time) {
|
|
o.OpenedAt = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) 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 *EmailMessageRecord) 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 *EmailMessageRecord) 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 *EmailMessageRecord) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetOrigin returns the Origin field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetOrigin() string {
|
|
if o == nil || IsNil(o.Origin) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Origin
|
|
}
|
|
|
|
// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetOriginOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Origin) {
|
|
return nil, false
|
|
}
|
|
return o.Origin, true
|
|
}
|
|
|
|
// HasOrigin returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasOrigin() bool {
|
|
if o != nil && !IsNil(o.Origin) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrigin gets a reference to the given string and assigns it to the Origin field.
|
|
func (o *EmailMessageRecord) SetOrigin(v string) {
|
|
o.Origin = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetProvider() string {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Provider, true
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *EmailMessageRecord) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetProviderId returns the ProviderId field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetProviderId() string {
|
|
if o == nil || IsNil(o.ProviderId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ProviderId
|
|
}
|
|
|
|
// GetProviderIdOk returns a tuple with the ProviderId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetProviderIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ProviderId) {
|
|
return nil, false
|
|
}
|
|
return o.ProviderId, true
|
|
}
|
|
|
|
// HasProviderId returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasProviderId() bool {
|
|
if o != nil && !IsNil(o.ProviderId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProviderId gets a reference to the given string and assigns it to the ProviderId field.
|
|
func (o *EmailMessageRecord) SetProviderId(v string) {
|
|
o.ProviderId = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *EmailMessageRecord) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSubject returns the Subject field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetSubject() string {
|
|
if o == nil || IsNil(o.Subject) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Subject
|
|
}
|
|
|
|
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetSubjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Subject) {
|
|
return nil, false
|
|
}
|
|
return o.Subject, true
|
|
}
|
|
|
|
// HasSubject returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasSubject() bool {
|
|
if o != nil && !IsNil(o.Subject) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSubject gets a reference to the given string and assigns it to the Subject field.
|
|
func (o *EmailMessageRecord) SetSubject(v string) {
|
|
o.Subject = &v
|
|
}
|
|
|
|
// GetTo returns the To field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetTo() []string {
|
|
if o == nil || IsNil(o.To) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.To
|
|
}
|
|
|
|
// GetToOk returns a tuple with the To field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetToOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.To) {
|
|
return nil, false
|
|
}
|
|
return o.To, true
|
|
}
|
|
|
|
// HasTo returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasTo() bool {
|
|
if o != nil && !IsNil(o.To) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTo gets a reference to the given []string and assigns it to the To field.
|
|
func (o *EmailMessageRecord) SetTo(v []string) {
|
|
o.To = v
|
|
}
|
|
|
|
// GetUnsubscribedAt returns the UnsubscribedAt field value if set, zero value otherwise.
|
|
func (o *EmailMessageRecord) GetUnsubscribedAt() time.Time {
|
|
if o == nil || IsNil(o.UnsubscribedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.UnsubscribedAt
|
|
}
|
|
|
|
// GetUnsubscribedAtOk returns a tuple with the UnsubscribedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMessageRecord) GetUnsubscribedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.UnsubscribedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UnsubscribedAt, true
|
|
}
|
|
|
|
// HasUnsubscribedAt returns a boolean if a field has been set.
|
|
func (o *EmailMessageRecord) HasUnsubscribedAt() bool {
|
|
if o != nil && !IsNil(o.UnsubscribedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnsubscribedAt gets a reference to the given time.Time and assigns it to the UnsubscribedAt field.
|
|
func (o *EmailMessageRecord) SetUnsubscribedAt(v time.Time) {
|
|
o.UnsubscribedAt = &v
|
|
}
|
|
|
|
func (o EmailMessageRecord) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailMessageRecord) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Bounce) {
|
|
toSerialize["bounce"] = o.Bounce
|
|
}
|
|
if !IsNil(o.BouncedAt) {
|
|
toSerialize["bounced_at"] = o.BouncedAt
|
|
}
|
|
if !IsNil(o.Campaign) {
|
|
toSerialize["campaign"] = o.Campaign
|
|
}
|
|
if !IsNil(o.ClickedAt) {
|
|
toSerialize["clicked_at"] = o.ClickedAt
|
|
}
|
|
if !IsNil(o.ComplainedAt) {
|
|
toSerialize["complained_at"] = o.ComplainedAt
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["created_at"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.DeliveredAt) {
|
|
toSerialize["delivered_at"] = o.DeliveredAt
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.From) {
|
|
toSerialize["from"] = o.From
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.IdempotencyKey) {
|
|
toSerialize["idempotency_key"] = o.IdempotencyKey
|
|
}
|
|
if !IsNil(o.OpenedAt) {
|
|
toSerialize["opened_at"] = o.OpenedAt
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.Origin) {
|
|
toSerialize["origin"] = o.Origin
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.ProviderId) {
|
|
toSerialize["provider_id"] = o.ProviderId
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Subject) {
|
|
toSerialize["subject"] = o.Subject
|
|
}
|
|
if !IsNil(o.To) {
|
|
toSerialize["to"] = o.To
|
|
}
|
|
if !IsNil(o.UnsubscribedAt) {
|
|
toSerialize["unsubscribed_at"] = o.UnsubscribedAt
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EmailMessageRecord) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailMessageRecord := _EmailMessageRecord{}
|
|
|
|
err = json.Unmarshal(data, &varEmailMessageRecord)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailMessageRecord(varEmailMessageRecord)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "bounce")
|
|
delete(additionalProperties, "bounced_at")
|
|
delete(additionalProperties, "campaign")
|
|
delete(additionalProperties, "clicked_at")
|
|
delete(additionalProperties, "complained_at")
|
|
delete(additionalProperties, "created_at")
|
|
delete(additionalProperties, "delivered_at")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "from")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "idempotency_key")
|
|
delete(additionalProperties, "opened_at")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "origin")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "provider_id")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "subject")
|
|
delete(additionalProperties, "to")
|
|
delete(additionalProperties, "unsubscribed_at")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailMessageRecord struct {
|
|
value *EmailMessageRecord
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailMessageRecord) Get() *EmailMessageRecord {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailMessageRecord) Set(val *EmailMessageRecord) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailMessageRecord) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailMessageRecord) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailMessageRecord(val *EmailMessageRecord) *NullableEmailMessageRecord {
|
|
return &NullableEmailMessageRecord{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailMessageRecord) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailMessageRecord) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|