diff --git a/api/openapi.yaml b/api/openapi.yaml index c29f448..a0022eb 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -5719,6 +5719,7 @@ components: \ the `include_unsubscribed` value from the template will be inherited.\ \ If you are using a third-party ESP, this field requires the ESP's list\ \ of unsubscribed emails to be cleared." + nullable: true type: boolean writeOnly: true email_bcc: diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index a35d260..4af93cb 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -109,7 +109,7 @@ Name | Type | Description | Notes **EmailReplyToAddress** | Pointer to **NullableString** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **EmailPreheader** | Pointer to **NullableString** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **DisableEmailClickTracking** | Pointer to **NullableBool** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] -**IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] +**IncludeUnsubscribed** | Pointer to **NullableBool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **EmailBcc** | Pointer to **[]string** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **EmailSenderDomain** | Pointer to **NullableString** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] @@ -3606,6 +3606,16 @@ SetIncludeUnsubscribed sets IncludeUnsubscribed field to given value. HasIncludeUnsubscribed returns a boolean if a field has been set. +### SetIncludeUnsubscribedNil + +`func (o *BasicNotification) SetIncludeUnsubscribedNil(b bool)` + + SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil + +### UnsetIncludeUnsubscribed +`func (o *BasicNotification) UnsetIncludeUnsubscribed()` + +UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil ### GetEmailBcc `func (o *BasicNotification) GetEmailBcc() []string` diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index f4286dc..b88ebca 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -95,7 +95,7 @@ Name | Type | Description | Notes **EmailReplyToAddress** | Pointer to **NullableString** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **EmailPreheader** | Pointer to **NullableString** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **DisableEmailClickTracking** | Pointer to **NullableBool** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] -**IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] +**IncludeUnsubscribed** | Pointer to **NullableBool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **EmailBcc** | Pointer to **[]string** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **EmailSenderDomain** | Pointer to **NullableString** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] @@ -3227,6 +3227,16 @@ SetIncludeUnsubscribed sets IncludeUnsubscribed field to given value. HasIncludeUnsubscribed returns a boolean if a field has been set. +### SetIncludeUnsubscribedNil + +`func (o *BasicNotificationAllOf) SetIncludeUnsubscribedNil(b bool)` + + SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil + +### UnsetIncludeUnsubscribed +`func (o *BasicNotificationAllOf) UnsetIncludeUnsubscribed()` + +UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil ### GetEmailBcc `func (o *BasicNotificationAllOf) GetEmailBcc() []string` diff --git a/docs/Notification.md b/docs/Notification.md index 4665be1..91488cd 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -109,7 +109,7 @@ Name | Type | Description | Notes **EmailReplyToAddress** | Pointer to **NullableString** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **EmailPreheader** | Pointer to **NullableString** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **DisableEmailClickTracking** | Pointer to **NullableBool** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] -**IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] +**IncludeUnsubscribed** | Pointer to **NullableBool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **EmailBcc** | Pointer to **[]string** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **EmailSenderDomain** | Pointer to **NullableString** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] @@ -3607,6 +3607,16 @@ SetIncludeUnsubscribed sets IncludeUnsubscribed field to given value. HasIncludeUnsubscribed returns a boolean if a field has been set. +### SetIncludeUnsubscribedNil + +`func (o *Notification) SetIncludeUnsubscribedNil(b bool)` + + SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil + +### UnsetIncludeUnsubscribed +`func (o *Notification) UnsetIncludeUnsubscribed()` + +UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil ### GetEmailBcc `func (o *Notification) GetEmailBcc() []string` diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 42fc1a4..3b7c6e3 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -109,7 +109,7 @@ Name | Type | Description | Notes **EmailReplyToAddress** | Pointer to **NullableString** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **EmailPreheader** | Pointer to **NullableString** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **DisableEmailClickTracking** | Pointer to **NullableBool** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] -**IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] +**IncludeUnsubscribed** | Pointer to **NullableBool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **EmailBcc** | Pointer to **[]string** | BCC recipients that were set on this email notification. | [optional] **EmailSenderDomain** | Pointer to **NullableString** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] @@ -3619,6 +3619,16 @@ SetIncludeUnsubscribed sets IncludeUnsubscribed field to given value. HasIncludeUnsubscribed returns a boolean if a field has been set. +### SetIncludeUnsubscribedNil + +`func (o *NotificationWithMeta) SetIncludeUnsubscribedNil(b bool)` + + SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil + +### UnsetIncludeUnsubscribed +`func (o *NotificationWithMeta) UnsetIncludeUnsubscribed()` + +UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil ### GetEmailBcc `func (o *NotificationWithMeta) GetEmailBcc() []string` diff --git a/model_basic_notification.go b/model_basic_notification.go index 4f229d1..0dd681e 100644 --- a/model_basic_notification.go +++ b/model_basic_notification.go @@ -222,7 +222,7 @@ type BasicNotification struct { // Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. DisableEmailClickTracking NullableBool `json:"disable_email_click_tracking,omitempty"` // Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. - IncludeUnsubscribed *bool `json:"include_unsubscribed,omitempty"` + IncludeUnsubscribed NullableBool `json:"include_unsubscribed,omitempty"` // Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. EmailBcc []string `json:"email_bcc,omitempty"` // Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. @@ -4373,36 +4373,46 @@ func (o *BasicNotification) UnsetDisableEmailClickTracking() { o.DisableEmailClickTracking.Unset() } -// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise. +// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *BasicNotification) GetIncludeUnsubscribed() bool { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil || o.IncludeUnsubscribed.Get() == nil { var ret bool return ret } - return *o.IncludeUnsubscribed + return *o.IncludeUnsubscribed.Get() } // GetIncludeUnsubscribedOk returns a tuple with the IncludeUnsubscribed field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BasicNotification) GetIncludeUnsubscribedOk() (*bool, bool) { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil { return nil, false } - return o.IncludeUnsubscribed, true + return o.IncludeUnsubscribed.Get(), o.IncludeUnsubscribed.IsSet() } // HasIncludeUnsubscribed returns a boolean if a field has been set. func (o *BasicNotification) HasIncludeUnsubscribed() bool { - if o != nil && o.IncludeUnsubscribed != nil { + if o != nil && o.IncludeUnsubscribed.IsSet() { return true } return false } -// SetIncludeUnsubscribed gets a reference to the given bool and assigns it to the IncludeUnsubscribed field. +// SetIncludeUnsubscribed gets a reference to the given NullableBool and assigns it to the IncludeUnsubscribed field. func (o *BasicNotification) SetIncludeUnsubscribed(v bool) { - o.IncludeUnsubscribed = &v + o.IncludeUnsubscribed.Set(&v) +} +// SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil +func (o *BasicNotification) SetIncludeUnsubscribedNil() { + o.IncludeUnsubscribed.Set(nil) +} + +// UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil +func (o *BasicNotification) UnsetIncludeUnsubscribed() { + o.IncludeUnsubscribed.Unset() } // GetEmailBcc returns the EmailBcc field value if set, zero value otherwise (both if not set or set to explicit null). @@ -5148,8 +5158,8 @@ func (o BasicNotification) MarshalJSON() ([]byte, error) { if o.DisableEmailClickTracking.IsSet() { toSerialize["disable_email_click_tracking"] = o.DisableEmailClickTracking.Get() } - if o.IncludeUnsubscribed != nil { - toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed + if o.IncludeUnsubscribed.IsSet() { + toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed.Get() } if o.EmailBcc != nil { toSerialize["email_bcc"] = o.EmailBcc diff --git a/model_basic_notification_all_of.go b/model_basic_notification_all_of.go index 238d38a..1dcbe0e 100644 --- a/model_basic_notification_all_of.go +++ b/model_basic_notification_all_of.go @@ -194,7 +194,7 @@ type BasicNotificationAllOf struct { // Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. DisableEmailClickTracking NullableBool `json:"disable_email_click_tracking,omitempty"` // Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. - IncludeUnsubscribed *bool `json:"include_unsubscribed,omitempty"` + IncludeUnsubscribed NullableBool `json:"include_unsubscribed,omitempty"` // Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. EmailBcc []string `json:"email_bcc,omitempty"` // Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. @@ -3899,36 +3899,46 @@ func (o *BasicNotificationAllOf) UnsetDisableEmailClickTracking() { o.DisableEmailClickTracking.Unset() } -// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise. +// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *BasicNotificationAllOf) GetIncludeUnsubscribed() bool { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil || o.IncludeUnsubscribed.Get() == nil { var ret bool return ret } - return *o.IncludeUnsubscribed + return *o.IncludeUnsubscribed.Get() } // GetIncludeUnsubscribedOk returns a tuple with the IncludeUnsubscribed field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BasicNotificationAllOf) GetIncludeUnsubscribedOk() (*bool, bool) { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil { return nil, false } - return o.IncludeUnsubscribed, true + return o.IncludeUnsubscribed.Get(), o.IncludeUnsubscribed.IsSet() } // HasIncludeUnsubscribed returns a boolean if a field has been set. func (o *BasicNotificationAllOf) HasIncludeUnsubscribed() bool { - if o != nil && o.IncludeUnsubscribed != nil { + if o != nil && o.IncludeUnsubscribed.IsSet() { return true } return false } -// SetIncludeUnsubscribed gets a reference to the given bool and assigns it to the IncludeUnsubscribed field. +// SetIncludeUnsubscribed gets a reference to the given NullableBool and assigns it to the IncludeUnsubscribed field. func (o *BasicNotificationAllOf) SetIncludeUnsubscribed(v bool) { - o.IncludeUnsubscribed = &v + o.IncludeUnsubscribed.Set(&v) +} +// SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil +func (o *BasicNotificationAllOf) SetIncludeUnsubscribedNil() { + o.IncludeUnsubscribed.Set(nil) +} + +// UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil +func (o *BasicNotificationAllOf) UnsetIncludeUnsubscribed() { + o.IncludeUnsubscribed.Unset() } // GetEmailBcc returns the EmailBcc field value if set, zero value otherwise (both if not set or set to explicit null). @@ -4632,8 +4642,8 @@ func (o BasicNotificationAllOf) MarshalJSON() ([]byte, error) { if o.DisableEmailClickTracking.IsSet() { toSerialize["disable_email_click_tracking"] = o.DisableEmailClickTracking.Get() } - if o.IncludeUnsubscribed != nil { - toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed + if o.IncludeUnsubscribed.IsSet() { + toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed.Get() } if o.EmailBcc != nil { toSerialize["email_bcc"] = o.EmailBcc diff --git a/model_notification.go b/model_notification.go index c946f5a..61ee0cd 100644 --- a/model_notification.go +++ b/model_notification.go @@ -223,7 +223,7 @@ type Notification struct { // Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. DisableEmailClickTracking NullableBool `json:"disable_email_click_tracking,omitempty"` // Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. - IncludeUnsubscribed *bool `json:"include_unsubscribed,omitempty"` + IncludeUnsubscribed NullableBool `json:"include_unsubscribed,omitempty"` // Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. EmailBcc []string `json:"email_bcc,omitempty"` // Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. @@ -4376,36 +4376,46 @@ func (o *Notification) UnsetDisableEmailClickTracking() { o.DisableEmailClickTracking.Unset() } -// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise. +// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Notification) GetIncludeUnsubscribed() bool { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil || o.IncludeUnsubscribed.Get() == nil { var ret bool return ret } - return *o.IncludeUnsubscribed + return *o.IncludeUnsubscribed.Get() } // GetIncludeUnsubscribedOk returns a tuple with the IncludeUnsubscribed field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Notification) GetIncludeUnsubscribedOk() (*bool, bool) { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil { return nil, false } - return o.IncludeUnsubscribed, true + return o.IncludeUnsubscribed.Get(), o.IncludeUnsubscribed.IsSet() } // HasIncludeUnsubscribed returns a boolean if a field has been set. func (o *Notification) HasIncludeUnsubscribed() bool { - if o != nil && o.IncludeUnsubscribed != nil { + if o != nil && o.IncludeUnsubscribed.IsSet() { return true } return false } -// SetIncludeUnsubscribed gets a reference to the given bool and assigns it to the IncludeUnsubscribed field. +// SetIncludeUnsubscribed gets a reference to the given NullableBool and assigns it to the IncludeUnsubscribed field. func (o *Notification) SetIncludeUnsubscribed(v bool) { - o.IncludeUnsubscribed = &v + o.IncludeUnsubscribed.Set(&v) +} +// SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil +func (o *Notification) SetIncludeUnsubscribedNil() { + o.IncludeUnsubscribed.Set(nil) +} + +// UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil +func (o *Notification) UnsetIncludeUnsubscribed() { + o.IncludeUnsubscribed.Unset() } // GetEmailBcc returns the EmailBcc field value if set, zero value otherwise (both if not set or set to explicit null). @@ -5193,8 +5203,8 @@ func (o Notification) MarshalJSON() ([]byte, error) { if o.DisableEmailClickTracking.IsSet() { toSerialize["disable_email_click_tracking"] = o.DisableEmailClickTracking.Get() } - if o.IncludeUnsubscribed != nil { - toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed + if o.IncludeUnsubscribed.IsSet() { + toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed.Get() } if o.EmailBcc != nil { toSerialize["email_bcc"] = o.EmailBcc diff --git a/model_notification_with_meta.go b/model_notification_with_meta.go index ab87c72..8e5e35a 100644 --- a/model_notification_with_meta.go +++ b/model_notification_with_meta.go @@ -222,7 +222,7 @@ type NotificationWithMeta struct { // Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. DisableEmailClickTracking NullableBool `json:"disable_email_click_tracking,omitempty"` // Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. - IncludeUnsubscribed *bool `json:"include_unsubscribed,omitempty"` + IncludeUnsubscribed NullableBool `json:"include_unsubscribed,omitempty"` // BCC recipients that were set on this email notification. EmailBcc []string `json:"email_bcc,omitempty"` // Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. @@ -4397,36 +4397,46 @@ func (o *NotificationWithMeta) UnsetDisableEmailClickTracking() { o.DisableEmailClickTracking.Unset() } -// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise. +// GetIncludeUnsubscribed returns the IncludeUnsubscribed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NotificationWithMeta) GetIncludeUnsubscribed() bool { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil || o.IncludeUnsubscribed.Get() == nil { var ret bool return ret } - return *o.IncludeUnsubscribed + return *o.IncludeUnsubscribed.Get() } // GetIncludeUnsubscribedOk returns a tuple with the IncludeUnsubscribed field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NotificationWithMeta) GetIncludeUnsubscribedOk() (*bool, bool) { - if o == nil || o.IncludeUnsubscribed == nil { + if o == nil { return nil, false } - return o.IncludeUnsubscribed, true + return o.IncludeUnsubscribed.Get(), o.IncludeUnsubscribed.IsSet() } // HasIncludeUnsubscribed returns a boolean if a field has been set. func (o *NotificationWithMeta) HasIncludeUnsubscribed() bool { - if o != nil && o.IncludeUnsubscribed != nil { + if o != nil && o.IncludeUnsubscribed.IsSet() { return true } return false } -// SetIncludeUnsubscribed gets a reference to the given bool and assigns it to the IncludeUnsubscribed field. +// SetIncludeUnsubscribed gets a reference to the given NullableBool and assigns it to the IncludeUnsubscribed field. func (o *NotificationWithMeta) SetIncludeUnsubscribed(v bool) { - o.IncludeUnsubscribed = &v + o.IncludeUnsubscribed.Set(&v) +} +// SetIncludeUnsubscribedNil sets the value for IncludeUnsubscribed to be an explicit nil +func (o *NotificationWithMeta) SetIncludeUnsubscribedNil() { + o.IncludeUnsubscribed.Set(nil) +} + +// UnsetIncludeUnsubscribed ensures that no value is present for IncludeUnsubscribed, not even an explicit nil +func (o *NotificationWithMeta) UnsetIncludeUnsubscribed() { + o.IncludeUnsubscribed.Unset() } // GetEmailBcc returns the EmailBcc field value if set, zero value otherwise (both if not set or set to explicit null). @@ -5628,8 +5638,8 @@ func (o NotificationWithMeta) MarshalJSON() ([]byte, error) { if o.DisableEmailClickTracking.IsSet() { toSerialize["disable_email_click_tracking"] = o.DisableEmailClickTracking.Get() } - if o.IncludeUnsubscribed != nil { - toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed + if o.IncludeUnsubscribed.IsSet() { + toSerialize["include_unsubscribed"] = o.IncludeUnsubscribed.Get() } if o.EmailBcc != nil { toSerialize["email_bcc"] = o.EmailBcc