From c67967e77c6d915f7caf4775d3f111d434332d4d Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 5 Dec 2024 14:49:27 +0100 Subject: [PATCH] Use patched OpenAPI spec for Go, too --- go/.gitignore | 1 + .../openapi/model_app_portal_access_in.go | 68 ++--- .../openapi/model_app_usage_stats_in.go | 7 +- go/internal/openapi/model_application_in.go | 64 ++-- go/internal/openapi/model_application_out.go | 64 ++-- .../openapi/model_application_stats.go | 32 +- .../model_application_token_expire_in.go | 32 +- .../openapi/model_attempt_statistics_data.go | 14 +- go/internal/openapi/model_auth_token_out.go | 71 ++--- .../model_client_secret_jwt_params_in.go | 64 ++-- .../openapi/model_create_message_token_in.go | 32 +- .../openapi/model_custom_color_palette.go | 288 ++++++------------ .../openapi/model_custom_strings_override.go | 96 ++---- .../model_endpoint_created_event_data.go | 64 ++-- .../model_endpoint_deleted_event_data.go | 64 ++-- .../model_endpoint_disabled_event_data.go | 64 ++-- go/internal/openapi/model_endpoint_in.go | 146 ++++----- .../openapi/model_endpoint_message_out.go | 78 ++--- .../openapi/model_endpoint_mtls_config_in.go | 32 +- .../openapi/model_endpoint_oauth_config_in.go | 86 ++---- go/internal/openapi/model_endpoint_out.go | 78 ++--- .../model_endpoint_secret_rotate_in.go | 32 +- .../model_endpoint_transformation_in.go | 32 +- .../model_endpoint_transformation_out.go | 32 +- ...del_endpoint_transformation_simulate_in.go | 7 +- go/internal/openapi/model_endpoint_update.go | 114 +++---- .../model_endpoint_updated_event_data.go | 64 ++-- go/internal/openapi/model_environment_in.go | 14 +- .../openapi/model_environment_settings_out.go | 160 ++++------ go/internal/openapi/model_event_in.go | 32 +- go/internal/openapi/model_event_out.go | 32 +- .../openapi/model_event_type_from_open_api.go | 71 ++--- .../model_event_type_import_open_api_in.go | 39 +-- ...del_event_type_import_open_api_out_data.go | 7 +- go/internal/openapi/model_event_type_in.go | 71 ++--- go/internal/openapi/model_event_type_out.go | 71 ++--- .../openapi/model_event_type_update.go | 71 ++--- go/internal/openapi/model_font_size_config.go | 32 +- .../model_incoming_webhook_payload_out.go | 96 ++---- .../model_list_response_application_out_.go | 32 +- .../model_list_response_application_stats_.go | 32 +- ...odel_list_response_background_task_out_.go | 32 +- ...del_list_response_endpoint_message_out_.go | 32 +- .../model_list_response_endpoint_out_.go | 32 +- .../model_list_response_event_type_out_.go | 32 +- .../model_list_response_integration_out_.go | 32 +- ..._response_message_attempt_endpoint_out_.go | 32 +- ...odel_list_response_message_attempt_out_.go | 32 +- ...del_list_response_message_endpoint_out_.go | 32 +- .../model_list_response_message_out_.go | 32 +- ...ponse_operational_webhook_endpoint_out_.go | 32 +- .../openapi/model_list_response_sink_out_.go | 32 +- ...el_list_response_stream_event_type_out_.go | 32 +- .../model_list_response_stream_out_.go | 32 +- .../model_list_response_stream_sink_out_.go | 32 +- .../model_list_response_template_out_.go | 32 +- ...el_message_attempt_exhausted_event_data.go | 64 ++-- ...odel_message_attempt_failing_event_data.go | 64 ++-- .../model_message_attempt_headers_out.go | 7 +- ...el_message_attempt_recovered_event_data.go | 64 ++-- .../openapi/model_message_broadcast_in.go | 107 +++---- .../openapi/model_message_endpoint_out.go | 110 +++---- go/internal/openapi/model_message_in.go | 121 +++----- go/internal/openapi/model_message_out.go | 46 ++- .../openapi/model_o_auth_payload_out.go | 96 ++---- .../model_operational_webhook_endpoint_in.go | 103 +++---- .../model_operational_webhook_endpoint_out.go | 71 ++--- ..._operational_webhook_endpoint_secret_in.go | 32 +- ...del_operational_webhook_endpoint_update.go | 71 ++--- go/internal/openapi/model_recover_in.go | 32 +- go/internal/openapi/model_redshift_config.go | 32 +- go/internal/openapi/model_replay_in.go | 32 +- go/internal/openapi/model_sink_http_config.go | 32 +- .../openapi/model_sink_transform_in.go | 32 +- .../openapi/model_sink_transformation_out.go | 32 +- .../openapi/model_stream_event_type_in.go | 32 +- .../openapi/model_stream_event_type_out.go | 32 +- go/internal/openapi/model_stream_out.go | 32 +- go/internal/openapi/model_template_in.go | 71 ++--- go/internal/openapi/model_template_out.go | 71 ++--- go/internal/openapi/model_template_update.go | 71 ++--- .../model_transformation_simulate_in.go | 7 +- go/svix_test.go | 8 +- regen_openapi.sh | 46 +-- 84 files changed, 1579 insertions(+), 2905 deletions(-) create mode 100644 go/.gitignore diff --git a/go/.gitignore b/go/.gitignore new file mode 100644 index 000000000..d836fdca4 --- /dev/null +++ b/go/.gitignore @@ -0,0 +1 @@ +/openapi.json diff --git a/go/internal/openapi/model_app_portal_access_in.go b/go/internal/openapi/model_app_portal_access_in.go index 59f988a08..3616fffef 100644 --- a/go/internal/openapi/model_app_portal_access_in.go +++ b/go/internal/openapi/model_app_portal_access_in.go @@ -21,11 +21,11 @@ var _ MappedNullable = &AppPortalAccessIn{} type AppPortalAccessIn struct { Application *ApplicationIn `json:"application,omitempty"` // How long the token will be valid for, in seconds. Valid values are between 1 hour and 7 days. The default is 7 days. - Expiry NullableInt32 `json:"expiry,omitempty"` + Expiry *int32 `json:"expiry,omitempty"` // The set of feature flags the created token will have access to. FeatureFlags []string `json:"featureFlags,omitempty"` // Whether the app portal should be in read-only mode. - ReadOnly NullableBool `json:"readOnly,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` } // NewAppPortalAccessIn instantiates a new AppPortalAccessIn object @@ -35,7 +35,7 @@ type AppPortalAccessIn struct { func NewAppPortalAccessIn() *AppPortalAccessIn { this := AppPortalAccessIn{} var expiry int32 = 604800 - this.Expiry = *NewNullableInt32(&expiry) + this.Expiry = &expiry return &this } @@ -45,7 +45,7 @@ func NewAppPortalAccessIn() *AppPortalAccessIn { func NewAppPortalAccessInWithDefaults() *AppPortalAccessIn { this := AppPortalAccessIn{} var expiry int32 = 604800 - this.Expiry = *NewNullableInt32(&expiry) + this.Expiry = &expiry return &this } @@ -81,46 +81,36 @@ func (o *AppPortalAccessIn) SetApplication(v ApplicationIn) { o.Application = &v } -// GetExpiry returns the Expiry field value if set, zero value otherwise (both if not set or set to explicit null). +// GetExpiry returns the Expiry field value if set, zero value otherwise. func (o *AppPortalAccessIn) GetExpiry() int32 { - if o == nil || IsNil(o.Expiry.Get()) { + if o == nil || IsNil(o.Expiry) { var ret int32 return ret } - return *o.Expiry.Get() + return *o.Expiry } // GetExpiryOk returns a tuple with the Expiry 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 *AppPortalAccessIn) GetExpiryOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.Expiry) { return nil, false } - return o.Expiry.Get(), o.Expiry.IsSet() + return o.Expiry, true } // HasExpiry returns a boolean if a field has been set. func (o *AppPortalAccessIn) HasExpiry() bool { - if o != nil && o.Expiry.IsSet() { + if o != nil && !IsNil(o.Expiry) { return true } return false } -// SetExpiry gets a reference to the given NullableInt32 and assigns it to the Expiry field. +// SetExpiry gets a reference to the given int32 and assigns it to the Expiry field. func (o *AppPortalAccessIn) SetExpiry(v int32) { - o.Expiry.Set(&v) -} -// SetExpiryNil sets the value for Expiry to be an explicit nil -func (o *AppPortalAccessIn) SetExpiryNil() { - o.Expiry.Set(nil) -} - -// UnsetExpiry ensures that no value is present for Expiry, not even an explicit nil -func (o *AppPortalAccessIn) UnsetExpiry() { - o.Expiry.Unset() + o.Expiry = &v } // GetFeatureFlags returns the FeatureFlags field value if set, zero value otherwise. @@ -155,46 +145,36 @@ func (o *AppPortalAccessIn) SetFeatureFlags(v []string) { o.FeatureFlags = v } -// GetReadOnly returns the ReadOnly field value if set, zero value otherwise (both if not set or set to explicit null). +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. func (o *AppPortalAccessIn) GetReadOnly() bool { - if o == nil || IsNil(o.ReadOnly.Get()) { + if o == nil || IsNil(o.ReadOnly) { var ret bool return ret } - return *o.ReadOnly.Get() + return *o.ReadOnly } // GetReadOnlyOk returns a tuple with the ReadOnly 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 *AppPortalAccessIn) GetReadOnlyOk() (*bool, bool) { - if o == nil { + if o == nil || IsNil(o.ReadOnly) { return nil, false } - return o.ReadOnly.Get(), o.ReadOnly.IsSet() + return o.ReadOnly, true } // HasReadOnly returns a boolean if a field has been set. func (o *AppPortalAccessIn) HasReadOnly() bool { - if o != nil && o.ReadOnly.IsSet() { + if o != nil && !IsNil(o.ReadOnly) { return true } return false } -// SetReadOnly gets a reference to the given NullableBool and assigns it to the ReadOnly field. +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. func (o *AppPortalAccessIn) SetReadOnly(v bool) { - o.ReadOnly.Set(&v) -} -// SetReadOnlyNil sets the value for ReadOnly to be an explicit nil -func (o *AppPortalAccessIn) SetReadOnlyNil() { - o.ReadOnly.Set(nil) -} - -// UnsetReadOnly ensures that no value is present for ReadOnly, not even an explicit nil -func (o *AppPortalAccessIn) UnsetReadOnly() { - o.ReadOnly.Unset() + o.ReadOnly = &v } func (o AppPortalAccessIn) MarshalJSON() ([]byte, error) { @@ -210,14 +190,14 @@ func (o AppPortalAccessIn) ToMap() (map[string]interface{}, error) { if !IsNil(o.Application) { toSerialize["application"] = o.Application } - if o.Expiry.IsSet() { - toSerialize["expiry"] = o.Expiry.Get() + if !IsNil(o.Expiry) { + toSerialize["expiry"] = o.Expiry } if !IsNil(o.FeatureFlags) { toSerialize["featureFlags"] = o.FeatureFlags } - if o.ReadOnly.IsSet() { - toSerialize["readOnly"] = o.ReadOnly.Get() + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly } return toSerialize, nil } diff --git a/go/internal/openapi/model_app_usage_stats_in.go b/go/internal/openapi/model_app_usage_stats_in.go index a53fe16f4..2fcd6f944 100644 --- a/go/internal/openapi/model_app_usage_stats_in.go +++ b/go/internal/openapi/model_app_usage_stats_in.go @@ -49,9 +49,9 @@ func NewAppUsageStatsInWithDefaults() *AppUsageStatsIn { return &this } -// GetAppIds returns the AppIds field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppIds returns the AppIds field value if set, zero value otherwise. func (o *AppUsageStatsIn) GetAppIds() []string { - if o == nil { + if o == nil || IsNil(o.AppIds) { var ret []string return ret } @@ -60,7 +60,6 @@ func (o *AppUsageStatsIn) GetAppIds() []string { // GetAppIdsOk returns a tuple with the AppIds 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 *AppUsageStatsIn) GetAppIdsOk() ([]string, bool) { if o == nil || IsNil(o.AppIds) { return nil, false @@ -140,7 +139,7 @@ func (o AppUsageStatsIn) MarshalJSON() ([]byte, error) { func (o AppUsageStatsIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.AppIds != nil { + if !IsNil(o.AppIds) { toSerialize["appIds"] = o.AppIds } toSerialize["since"] = o.Since diff --git a/go/internal/openapi/model_application_in.go b/go/internal/openapi/model_application_in.go index 4d48876fa..c3ad28b2f 100644 --- a/go/internal/openapi/model_application_in.go +++ b/go/internal/openapi/model_application_in.go @@ -23,9 +23,9 @@ var _ MappedNullable = &ApplicationIn{} type ApplicationIn struct { Metadata *map[string]string `json:"metadata,omitempty"` Name string `json:"name"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // Optional unique identifier for the application - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` } type _ApplicationIn ApplicationIn @@ -104,88 +104,68 @@ func (o *ApplicationIn) SetName(v string) { o.Name = v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *ApplicationIn) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *ApplicationIn) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *ApplicationIn) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *ApplicationIn) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *ApplicationIn) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *ApplicationIn) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *ApplicationIn) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *ApplicationIn) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *ApplicationIn) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *ApplicationIn) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *ApplicationIn) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *ApplicationIn) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } func (o ApplicationIn) MarshalJSON() ([]byte, error) { @@ -202,11 +182,11 @@ func (o ApplicationIn) ToMap() (map[string]interface{}, error) { toSerialize["metadata"] = o.Metadata } toSerialize["name"] = o.Name - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } return toSerialize, nil } diff --git a/go/internal/openapi/model_application_out.go b/go/internal/openapi/model_application_out.go index 2d66f5c6e..52ff0b8e9 100644 --- a/go/internal/openapi/model_application_out.go +++ b/go/internal/openapi/model_application_out.go @@ -27,9 +27,9 @@ type ApplicationOut struct { Id string `json:"id"` Metadata map[string]string `json:"metadata"` Name string `json:"name"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // The app's UID - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` } @@ -153,88 +153,68 @@ func (o *ApplicationOut) SetName(v string) { o.Name = v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *ApplicationOut) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *ApplicationOut) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *ApplicationOut) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *ApplicationOut) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *ApplicationOut) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *ApplicationOut) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *ApplicationOut) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *ApplicationOut) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *ApplicationOut) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *ApplicationOut) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *ApplicationOut) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *ApplicationOut) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUpdatedAt returns the UpdatedAt field value @@ -275,11 +255,11 @@ func (o ApplicationOut) ToMap() (map[string]interface{}, error) { toSerialize["id"] = o.Id toSerialize["metadata"] = o.Metadata toSerialize["name"] = o.Name - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["updatedAt"] = o.UpdatedAt return toSerialize, nil diff --git a/go/internal/openapi/model_application_stats.go b/go/internal/openapi/model_application_stats.go index a0d6a11b9..0f0379028 100644 --- a/go/internal/openapi/model_application_stats.go +++ b/go/internal/openapi/model_application_stats.go @@ -24,7 +24,7 @@ type ApplicationStats struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` MessageDestinations int32 `json:"messageDestinations"` } @@ -73,46 +73,36 @@ func (o *ApplicationStats) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *ApplicationStats) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *ApplicationStats) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *ApplicationStats) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *ApplicationStats) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *ApplicationStats) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *ApplicationStats) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetMessageDestinations returns the MessageDestinations field value @@ -150,8 +140,8 @@ func (o ApplicationStats) MarshalJSON() ([]byte, error) { func (o ApplicationStats) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["messageDestinations"] = o.MessageDestinations return toSerialize, nil diff --git a/go/internal/openapi/model_application_token_expire_in.go b/go/internal/openapi/model_application_token_expire_in.go index 5d091ed0e..6a7df1623 100644 --- a/go/internal/openapi/model_application_token_expire_in.go +++ b/go/internal/openapi/model_application_token_expire_in.go @@ -20,7 +20,7 @@ var _ MappedNullable = &ApplicationTokenExpireIn{} // ApplicationTokenExpireIn struct for ApplicationTokenExpireIn type ApplicationTokenExpireIn struct { // How many seconds until the old key is expired. - Expiry NullableInt64 `json:"expiry,omitempty"` + Expiry *int64 `json:"expiry,omitempty"` } // NewApplicationTokenExpireIn instantiates a new ApplicationTokenExpireIn object @@ -40,46 +40,36 @@ func NewApplicationTokenExpireInWithDefaults() *ApplicationTokenExpireIn { return &this } -// GetExpiry returns the Expiry field value if set, zero value otherwise (both if not set or set to explicit null). +// GetExpiry returns the Expiry field value if set, zero value otherwise. func (o *ApplicationTokenExpireIn) GetExpiry() int64 { - if o == nil || IsNil(o.Expiry.Get()) { + if o == nil || IsNil(o.Expiry) { var ret int64 return ret } - return *o.Expiry.Get() + return *o.Expiry } // GetExpiryOk returns a tuple with the Expiry 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 *ApplicationTokenExpireIn) GetExpiryOk() (*int64, bool) { - if o == nil { + if o == nil || IsNil(o.Expiry) { return nil, false } - return o.Expiry.Get(), o.Expiry.IsSet() + return o.Expiry, true } // HasExpiry returns a boolean if a field has been set. func (o *ApplicationTokenExpireIn) HasExpiry() bool { - if o != nil && o.Expiry.IsSet() { + if o != nil && !IsNil(o.Expiry) { return true } return false } -// SetExpiry gets a reference to the given NullableInt64 and assigns it to the Expiry field. +// SetExpiry gets a reference to the given int64 and assigns it to the Expiry field. func (o *ApplicationTokenExpireIn) SetExpiry(v int64) { - o.Expiry.Set(&v) -} -// SetExpiryNil sets the value for Expiry to be an explicit nil -func (o *ApplicationTokenExpireIn) SetExpiryNil() { - o.Expiry.Set(nil) -} - -// UnsetExpiry ensures that no value is present for Expiry, not even an explicit nil -func (o *ApplicationTokenExpireIn) UnsetExpiry() { - o.Expiry.Unset() + o.Expiry = &v } func (o ApplicationTokenExpireIn) MarshalJSON() ([]byte, error) { @@ -92,8 +82,8 @@ func (o ApplicationTokenExpireIn) MarshalJSON() ([]byte, error) { func (o ApplicationTokenExpireIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Expiry.IsSet() { - toSerialize["expiry"] = o.Expiry.Get() + if !IsNil(o.Expiry) { + toSerialize["expiry"] = o.Expiry } return toSerialize, nil } diff --git a/go/internal/openapi/model_attempt_statistics_data.go b/go/internal/openapi/model_attempt_statistics_data.go index 67e0fb92e..566a853e2 100644 --- a/go/internal/openapi/model_attempt_statistics_data.go +++ b/go/internal/openapi/model_attempt_statistics_data.go @@ -40,9 +40,9 @@ func NewAttemptStatisticsDataWithDefaults() *AttemptStatisticsData { return &this } -// GetFailureCount returns the FailureCount field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFailureCount returns the FailureCount field value if set, zero value otherwise. func (o *AttemptStatisticsData) GetFailureCount() []int32 { - if o == nil { + if o == nil || IsNil(o.FailureCount) { var ret []int32 return ret } @@ -51,7 +51,6 @@ func (o *AttemptStatisticsData) GetFailureCount() []int32 { // GetFailureCountOk returns a tuple with the FailureCount 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 *AttemptStatisticsData) GetFailureCountOk() ([]int32, bool) { if o == nil || IsNil(o.FailureCount) { return nil, false @@ -73,9 +72,9 @@ func (o *AttemptStatisticsData) SetFailureCount(v []int32) { o.FailureCount = v } -// GetSuccessCount returns the SuccessCount field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSuccessCount returns the SuccessCount field value if set, zero value otherwise. func (o *AttemptStatisticsData) GetSuccessCount() []int32 { - if o == nil { + if o == nil || IsNil(o.SuccessCount) { var ret []int32 return ret } @@ -84,7 +83,6 @@ func (o *AttemptStatisticsData) GetSuccessCount() []int32 { // GetSuccessCountOk returns a tuple with the SuccessCount 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 *AttemptStatisticsData) GetSuccessCountOk() ([]int32, bool) { if o == nil || IsNil(o.SuccessCount) { return nil, false @@ -116,10 +114,10 @@ func (o AttemptStatisticsData) MarshalJSON() ([]byte, error) { func (o AttemptStatisticsData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.FailureCount != nil { + if !IsNil(o.FailureCount) { toSerialize["failureCount"] = o.FailureCount } - if o.SuccessCount != nil { + if !IsNil(o.SuccessCount) { toSerialize["successCount"] = o.SuccessCount } return toSerialize, nil diff --git a/go/internal/openapi/model_auth_token_out.go b/go/internal/openapi/model_auth_token_out.go index eb749e36e..710f0906f 100644 --- a/go/internal/openapi/model_auth_token_out.go +++ b/go/internal/openapi/model_auth_token_out.go @@ -23,10 +23,10 @@ var _ MappedNullable = &AuthTokenOut{} // AuthTokenOut struct for AuthTokenOut type AuthTokenOut struct { CreatedAt time.Time `json:"createdAt"` - ExpiresAt NullableTime `json:"expiresAt,omitempty"` + ExpiresAt *time.Time `json:"expiresAt,omitempty"` // The key's ID Id string `json:"id"` - Name NullableString `json:"name,omitempty"` + Name *string `json:"name,omitempty"` Scopes []string `json:"scopes,omitempty"` Token string `json:"token"` } @@ -77,46 +77,36 @@ func (o *AuthTokenOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. func (o *AuthTokenOut) GetExpiresAt() time.Time { - if o == nil || IsNil(o.ExpiresAt.Get()) { + if o == nil || IsNil(o.ExpiresAt) { var ret time.Time return ret } - return *o.ExpiresAt.Get() + return *o.ExpiresAt } // GetExpiresAtOk returns a tuple with the ExpiresAt 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 *AuthTokenOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { + if o == nil || IsNil(o.ExpiresAt) { return nil, false } - return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() + return o.ExpiresAt, true } // HasExpiresAt returns a boolean if a field has been set. func (o *AuthTokenOut) HasExpiresAt() bool { - if o != nil && o.ExpiresAt.IsSet() { + if o != nil && !IsNil(o.ExpiresAt) { return true } return false } -// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. +// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field. func (o *AuthTokenOut) SetExpiresAt(v time.Time) { - o.ExpiresAt.Set(&v) -} -// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -func (o *AuthTokenOut) SetExpiresAtNil() { - o.ExpiresAt.Set(nil) -} - -// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -func (o *AuthTokenOut) UnsetExpiresAt() { - o.ExpiresAt.Unset() + o.ExpiresAt = &v } // GetId returns the Id field value @@ -143,51 +133,41 @@ func (o *AuthTokenOut) SetId(v string) { o.Id = v } -// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +// GetName returns the Name field value if set, zero value otherwise. func (o *AuthTokenOut) GetName() string { - if o == nil || IsNil(o.Name.Get()) { + if o == nil || IsNil(o.Name) { var ret string return ret } - return *o.Name.Get() + return *o.Name } // GetNameOk returns a tuple with the Name 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 *AuthTokenOut) GetNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Name) { return nil, false } - return o.Name.Get(), o.Name.IsSet() + return o.Name, true } // HasName returns a boolean if a field has been set. func (o *AuthTokenOut) HasName() bool { - if o != nil && o.Name.IsSet() { + if o != nil && !IsNil(o.Name) { return true } return false } -// SetName gets a reference to the given NullableString and assigns it to the Name field. +// SetName gets a reference to the given string and assigns it to the Name field. func (o *AuthTokenOut) SetName(v string) { - o.Name.Set(&v) -} -// SetNameNil sets the value for Name to be an explicit nil -func (o *AuthTokenOut) SetNameNil() { - o.Name.Set(nil) -} - -// UnsetName ensures that no value is present for Name, not even an explicit nil -func (o *AuthTokenOut) UnsetName() { - o.Name.Unset() + o.Name = &v } -// GetScopes returns the Scopes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetScopes returns the Scopes field value if set, zero value otherwise. func (o *AuthTokenOut) GetScopes() []string { - if o == nil { + if o == nil || IsNil(o.Scopes) { var ret []string return ret } @@ -196,7 +176,6 @@ func (o *AuthTokenOut) GetScopes() []string { // GetScopesOk returns a tuple with the Scopes 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 *AuthTokenOut) GetScopesOk() ([]string, bool) { if o == nil || IsNil(o.Scopes) { return nil, false @@ -253,14 +232,14 @@ func (o AuthTokenOut) MarshalJSON() ([]byte, error) { func (o AuthTokenOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["createdAt"] = o.CreatedAt - if o.ExpiresAt.IsSet() { - toSerialize["expiresAt"] = o.ExpiresAt.Get() + if !IsNil(o.ExpiresAt) { + toSerialize["expiresAt"] = o.ExpiresAt } toSerialize["id"] = o.Id - if o.Name.IsSet() { - toSerialize["name"] = o.Name.Get() + if !IsNil(o.Name) { + toSerialize["name"] = o.Name } - if o.Scopes != nil { + if !IsNil(o.Scopes) { toSerialize["scopes"] = o.Scopes } toSerialize["token"] = o.Token diff --git a/go/internal/openapi/model_client_secret_jwt_params_in.go b/go/internal/openapi/model_client_secret_jwt_params_in.go index c0c932893..7a48b3e84 100644 --- a/go/internal/openapi/model_client_secret_jwt_params_in.go +++ b/go/internal/openapi/model_client_secret_jwt_params_in.go @@ -24,10 +24,10 @@ type ClientSecretJwtParamsIn struct { // The base64-encoded secret used for signing the JWT. SecretBase64 string `json:"secretBase64"` // Optional secret identifier. If supplied, this will be populated in the JWT header in the `kid` field. - SecretId NullableString `json:"secretId,omitempty"` + SecretId *string `json:"secretId,omitempty"` SigningAlgorithm OauthJwsSigningAlgorithm `json:"signingAlgorithm"` // Optional number of seconds after which the JWT should expire. Defaults to 300 seconds. - TokenExpirySecs NullableInt32 `json:"tokenExpirySecs,omitempty"` + TokenExpirySecs *int32 `json:"tokenExpirySecs,omitempty"` } type _ClientSecretJwtParamsIn ClientSecretJwtParamsIn @@ -75,46 +75,36 @@ func (o *ClientSecretJwtParamsIn) SetSecretBase64(v string) { o.SecretBase64 = v } -// GetSecretId returns the SecretId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSecretId returns the SecretId field value if set, zero value otherwise. func (o *ClientSecretJwtParamsIn) GetSecretId() string { - if o == nil || IsNil(o.SecretId.Get()) { + if o == nil || IsNil(o.SecretId) { var ret string return ret } - return *o.SecretId.Get() + return *o.SecretId } // GetSecretIdOk returns a tuple with the SecretId 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 *ClientSecretJwtParamsIn) GetSecretIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.SecretId) { return nil, false } - return o.SecretId.Get(), o.SecretId.IsSet() + return o.SecretId, true } // HasSecretId returns a boolean if a field has been set. func (o *ClientSecretJwtParamsIn) HasSecretId() bool { - if o != nil && o.SecretId.IsSet() { + if o != nil && !IsNil(o.SecretId) { return true } return false } -// SetSecretId gets a reference to the given NullableString and assigns it to the SecretId field. +// SetSecretId gets a reference to the given string and assigns it to the SecretId field. func (o *ClientSecretJwtParamsIn) SetSecretId(v string) { - o.SecretId.Set(&v) -} -// SetSecretIdNil sets the value for SecretId to be an explicit nil -func (o *ClientSecretJwtParamsIn) SetSecretIdNil() { - o.SecretId.Set(nil) -} - -// UnsetSecretId ensures that no value is present for SecretId, not even an explicit nil -func (o *ClientSecretJwtParamsIn) UnsetSecretId() { - o.SecretId.Unset() + o.SecretId = &v } // GetSigningAlgorithm returns the SigningAlgorithm field value @@ -141,46 +131,36 @@ func (o *ClientSecretJwtParamsIn) SetSigningAlgorithm(v OauthJwsSigningAlgorithm o.SigningAlgorithm = v } -// GetTokenExpirySecs returns the TokenExpirySecs field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTokenExpirySecs returns the TokenExpirySecs field value if set, zero value otherwise. func (o *ClientSecretJwtParamsIn) GetTokenExpirySecs() int32 { - if o == nil || IsNil(o.TokenExpirySecs.Get()) { + if o == nil || IsNil(o.TokenExpirySecs) { var ret int32 return ret } - return *o.TokenExpirySecs.Get() + return *o.TokenExpirySecs } // GetTokenExpirySecsOk returns a tuple with the TokenExpirySecs 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 *ClientSecretJwtParamsIn) GetTokenExpirySecsOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.TokenExpirySecs) { return nil, false } - return o.TokenExpirySecs.Get(), o.TokenExpirySecs.IsSet() + return o.TokenExpirySecs, true } // HasTokenExpirySecs returns a boolean if a field has been set. func (o *ClientSecretJwtParamsIn) HasTokenExpirySecs() bool { - if o != nil && o.TokenExpirySecs.IsSet() { + if o != nil && !IsNil(o.TokenExpirySecs) { return true } return false } -// SetTokenExpirySecs gets a reference to the given NullableInt32 and assigns it to the TokenExpirySecs field. +// SetTokenExpirySecs gets a reference to the given int32 and assigns it to the TokenExpirySecs field. func (o *ClientSecretJwtParamsIn) SetTokenExpirySecs(v int32) { - o.TokenExpirySecs.Set(&v) -} -// SetTokenExpirySecsNil sets the value for TokenExpirySecs to be an explicit nil -func (o *ClientSecretJwtParamsIn) SetTokenExpirySecsNil() { - o.TokenExpirySecs.Set(nil) -} - -// UnsetTokenExpirySecs ensures that no value is present for TokenExpirySecs, not even an explicit nil -func (o *ClientSecretJwtParamsIn) UnsetTokenExpirySecs() { - o.TokenExpirySecs.Unset() + o.TokenExpirySecs = &v } func (o ClientSecretJwtParamsIn) MarshalJSON() ([]byte, error) { @@ -194,12 +174,12 @@ func (o ClientSecretJwtParamsIn) MarshalJSON() ([]byte, error) { func (o ClientSecretJwtParamsIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["secretBase64"] = o.SecretBase64 - if o.SecretId.IsSet() { - toSerialize["secretId"] = o.SecretId.Get() + if !IsNil(o.SecretId) { + toSerialize["secretId"] = o.SecretId } toSerialize["signingAlgorithm"] = o.SigningAlgorithm - if o.TokenExpirySecs.IsSet() { - toSerialize["tokenExpirySecs"] = o.TokenExpirySecs.Get() + if !IsNil(o.TokenExpirySecs) { + toSerialize["tokenExpirySecs"] = o.TokenExpirySecs } return toSerialize, nil } diff --git a/go/internal/openapi/model_create_message_token_in.go b/go/internal/openapi/model_create_message_token_in.go index 408779834..3bd9b529a 100644 --- a/go/internal/openapi/model_create_message_token_in.go +++ b/go/internal/openapi/model_create_message_token_in.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CreateMessageTokenIn{} // CreateMessageTokenIn struct for CreateMessageTokenIn type CreateMessageTokenIn struct { // How long the token will be valid for, in seconds. - Expiry NullableInt32 `json:"expiry,omitempty"` + Expiry *int32 `json:"expiry,omitempty"` // The name of the token. Name string `json:"name"` } @@ -47,46 +47,36 @@ func NewCreateMessageTokenInWithDefaults() *CreateMessageTokenIn { return &this } -// GetExpiry returns the Expiry field value if set, zero value otherwise (both if not set or set to explicit null). +// GetExpiry returns the Expiry field value if set, zero value otherwise. func (o *CreateMessageTokenIn) GetExpiry() int32 { - if o == nil || IsNil(o.Expiry.Get()) { + if o == nil || IsNil(o.Expiry) { var ret int32 return ret } - return *o.Expiry.Get() + return *o.Expiry } // GetExpiryOk returns a tuple with the Expiry 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 *CreateMessageTokenIn) GetExpiryOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.Expiry) { return nil, false } - return o.Expiry.Get(), o.Expiry.IsSet() + return o.Expiry, true } // HasExpiry returns a boolean if a field has been set. func (o *CreateMessageTokenIn) HasExpiry() bool { - if o != nil && o.Expiry.IsSet() { + if o != nil && !IsNil(o.Expiry) { return true } return false } -// SetExpiry gets a reference to the given NullableInt32 and assigns it to the Expiry field. +// SetExpiry gets a reference to the given int32 and assigns it to the Expiry field. func (o *CreateMessageTokenIn) SetExpiry(v int32) { - o.Expiry.Set(&v) -} -// SetExpiryNil sets the value for Expiry to be an explicit nil -func (o *CreateMessageTokenIn) SetExpiryNil() { - o.Expiry.Set(nil) -} - -// UnsetExpiry ensures that no value is present for Expiry, not even an explicit nil -func (o *CreateMessageTokenIn) UnsetExpiry() { - o.Expiry.Unset() + o.Expiry = &v } // GetName returns the Name field value @@ -123,8 +113,8 @@ func (o CreateMessageTokenIn) MarshalJSON() ([]byte, error) { func (o CreateMessageTokenIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Expiry.IsSet() { - toSerialize["expiry"] = o.Expiry.Get() + if !IsNil(o.Expiry) { + toSerialize["expiry"] = o.Expiry } toSerialize["name"] = o.Name return toSerialize, nil diff --git a/go/internal/openapi/model_custom_color_palette.go b/go/internal/openapi/model_custom_color_palette.go index 533508fc4..8a27fc5f6 100644 --- a/go/internal/openapi/model_custom_color_palette.go +++ b/go/internal/openapi/model_custom_color_palette.go @@ -19,15 +19,15 @@ var _ MappedNullable = &CustomColorPalette{} // CustomColorPalette struct for CustomColorPalette type CustomColorPalette struct { - BackgroundHover NullableString `json:"backgroundHover,omitempty"` - BackgroundPrimary NullableString `json:"backgroundPrimary,omitempty"` - BackgroundSecondary NullableString `json:"backgroundSecondary,omitempty"` - ButtonPrimary NullableString `json:"buttonPrimary,omitempty"` - InteractiveAccent NullableString `json:"interactiveAccent,omitempty"` - NavigationAccent NullableString `json:"navigationAccent,omitempty"` - Primary NullableString `json:"primary,omitempty"` - TextDanger NullableString `json:"textDanger,omitempty"` - TextPrimary NullableString `json:"textPrimary,omitempty"` + BackgroundHover *string `json:"backgroundHover,omitempty"` + BackgroundPrimary *string `json:"backgroundPrimary,omitempty"` + BackgroundSecondary *string `json:"backgroundSecondary,omitempty"` + ButtonPrimary *string `json:"buttonPrimary,omitempty"` + InteractiveAccent *string `json:"interactiveAccent,omitempty"` + NavigationAccent *string `json:"navigationAccent,omitempty"` + Primary *string `json:"primary,omitempty"` + TextDanger *string `json:"textDanger,omitempty"` + TextPrimary *string `json:"textPrimary,omitempty"` } // NewCustomColorPalette instantiates a new CustomColorPalette object @@ -47,382 +47,292 @@ func NewCustomColorPaletteWithDefaults() *CustomColorPalette { return &this } -// GetBackgroundHover returns the BackgroundHover field value if set, zero value otherwise (both if not set or set to explicit null). +// GetBackgroundHover returns the BackgroundHover field value if set, zero value otherwise. func (o *CustomColorPalette) GetBackgroundHover() string { - if o == nil || IsNil(o.BackgroundHover.Get()) { + if o == nil || IsNil(o.BackgroundHover) { var ret string return ret } - return *o.BackgroundHover.Get() + return *o.BackgroundHover } // GetBackgroundHoverOk returns a tuple with the BackgroundHover 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 *CustomColorPalette) GetBackgroundHoverOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.BackgroundHover) { return nil, false } - return o.BackgroundHover.Get(), o.BackgroundHover.IsSet() + return o.BackgroundHover, true } // HasBackgroundHover returns a boolean if a field has been set. func (o *CustomColorPalette) HasBackgroundHover() bool { - if o != nil && o.BackgroundHover.IsSet() { + if o != nil && !IsNil(o.BackgroundHover) { return true } return false } -// SetBackgroundHover gets a reference to the given NullableString and assigns it to the BackgroundHover field. +// SetBackgroundHover gets a reference to the given string and assigns it to the BackgroundHover field. func (o *CustomColorPalette) SetBackgroundHover(v string) { - o.BackgroundHover.Set(&v) -} -// SetBackgroundHoverNil sets the value for BackgroundHover to be an explicit nil -func (o *CustomColorPalette) SetBackgroundHoverNil() { - o.BackgroundHover.Set(nil) -} - -// UnsetBackgroundHover ensures that no value is present for BackgroundHover, not even an explicit nil -func (o *CustomColorPalette) UnsetBackgroundHover() { - o.BackgroundHover.Unset() + o.BackgroundHover = &v } -// GetBackgroundPrimary returns the BackgroundPrimary field value if set, zero value otherwise (both if not set or set to explicit null). +// GetBackgroundPrimary returns the BackgroundPrimary field value if set, zero value otherwise. func (o *CustomColorPalette) GetBackgroundPrimary() string { - if o == nil || IsNil(o.BackgroundPrimary.Get()) { + if o == nil || IsNil(o.BackgroundPrimary) { var ret string return ret } - return *o.BackgroundPrimary.Get() + return *o.BackgroundPrimary } // GetBackgroundPrimaryOk returns a tuple with the BackgroundPrimary 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 *CustomColorPalette) GetBackgroundPrimaryOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.BackgroundPrimary) { return nil, false } - return o.BackgroundPrimary.Get(), o.BackgroundPrimary.IsSet() + return o.BackgroundPrimary, true } // HasBackgroundPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasBackgroundPrimary() bool { - if o != nil && o.BackgroundPrimary.IsSet() { + if o != nil && !IsNil(o.BackgroundPrimary) { return true } return false } -// SetBackgroundPrimary gets a reference to the given NullableString and assigns it to the BackgroundPrimary field. +// SetBackgroundPrimary gets a reference to the given string and assigns it to the BackgroundPrimary field. func (o *CustomColorPalette) SetBackgroundPrimary(v string) { - o.BackgroundPrimary.Set(&v) -} -// SetBackgroundPrimaryNil sets the value for BackgroundPrimary to be an explicit nil -func (o *CustomColorPalette) SetBackgroundPrimaryNil() { - o.BackgroundPrimary.Set(nil) + o.BackgroundPrimary = &v } -// UnsetBackgroundPrimary ensures that no value is present for BackgroundPrimary, not even an explicit nil -func (o *CustomColorPalette) UnsetBackgroundPrimary() { - o.BackgroundPrimary.Unset() -} - -// GetBackgroundSecondary returns the BackgroundSecondary field value if set, zero value otherwise (both if not set or set to explicit null). +// GetBackgroundSecondary returns the BackgroundSecondary field value if set, zero value otherwise. func (o *CustomColorPalette) GetBackgroundSecondary() string { - if o == nil || IsNil(o.BackgroundSecondary.Get()) { + if o == nil || IsNil(o.BackgroundSecondary) { var ret string return ret } - return *o.BackgroundSecondary.Get() + return *o.BackgroundSecondary } // GetBackgroundSecondaryOk returns a tuple with the BackgroundSecondary 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 *CustomColorPalette) GetBackgroundSecondaryOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.BackgroundSecondary) { return nil, false } - return o.BackgroundSecondary.Get(), o.BackgroundSecondary.IsSet() + return o.BackgroundSecondary, true } // HasBackgroundSecondary returns a boolean if a field has been set. func (o *CustomColorPalette) HasBackgroundSecondary() bool { - if o != nil && o.BackgroundSecondary.IsSet() { + if o != nil && !IsNil(o.BackgroundSecondary) { return true } return false } -// SetBackgroundSecondary gets a reference to the given NullableString and assigns it to the BackgroundSecondary field. +// SetBackgroundSecondary gets a reference to the given string and assigns it to the BackgroundSecondary field. func (o *CustomColorPalette) SetBackgroundSecondary(v string) { - o.BackgroundSecondary.Set(&v) -} -// SetBackgroundSecondaryNil sets the value for BackgroundSecondary to be an explicit nil -func (o *CustomColorPalette) SetBackgroundSecondaryNil() { - o.BackgroundSecondary.Set(nil) + o.BackgroundSecondary = &v } -// UnsetBackgroundSecondary ensures that no value is present for BackgroundSecondary, not even an explicit nil -func (o *CustomColorPalette) UnsetBackgroundSecondary() { - o.BackgroundSecondary.Unset() -} - -// GetButtonPrimary returns the ButtonPrimary field value if set, zero value otherwise (both if not set or set to explicit null). +// GetButtonPrimary returns the ButtonPrimary field value if set, zero value otherwise. func (o *CustomColorPalette) GetButtonPrimary() string { - if o == nil || IsNil(o.ButtonPrimary.Get()) { + if o == nil || IsNil(o.ButtonPrimary) { var ret string return ret } - return *o.ButtonPrimary.Get() + return *o.ButtonPrimary } // GetButtonPrimaryOk returns a tuple with the ButtonPrimary 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 *CustomColorPalette) GetButtonPrimaryOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ButtonPrimary) { return nil, false } - return o.ButtonPrimary.Get(), o.ButtonPrimary.IsSet() + return o.ButtonPrimary, true } // HasButtonPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasButtonPrimary() bool { - if o != nil && o.ButtonPrimary.IsSet() { + if o != nil && !IsNil(o.ButtonPrimary) { return true } return false } -// SetButtonPrimary gets a reference to the given NullableString and assigns it to the ButtonPrimary field. +// SetButtonPrimary gets a reference to the given string and assigns it to the ButtonPrimary field. func (o *CustomColorPalette) SetButtonPrimary(v string) { - o.ButtonPrimary.Set(&v) -} -// SetButtonPrimaryNil sets the value for ButtonPrimary to be an explicit nil -func (o *CustomColorPalette) SetButtonPrimaryNil() { - o.ButtonPrimary.Set(nil) + o.ButtonPrimary = &v } -// UnsetButtonPrimary ensures that no value is present for ButtonPrimary, not even an explicit nil -func (o *CustomColorPalette) UnsetButtonPrimary() { - o.ButtonPrimary.Unset() -} - -// GetInteractiveAccent returns the InteractiveAccent field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInteractiveAccent returns the InteractiveAccent field value if set, zero value otherwise. func (o *CustomColorPalette) GetInteractiveAccent() string { - if o == nil || IsNil(o.InteractiveAccent.Get()) { + if o == nil || IsNil(o.InteractiveAccent) { var ret string return ret } - return *o.InteractiveAccent.Get() + return *o.InteractiveAccent } // GetInteractiveAccentOk returns a tuple with the InteractiveAccent 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 *CustomColorPalette) GetInteractiveAccentOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.InteractiveAccent) { return nil, false } - return o.InteractiveAccent.Get(), o.InteractiveAccent.IsSet() + return o.InteractiveAccent, true } // HasInteractiveAccent returns a boolean if a field has been set. func (o *CustomColorPalette) HasInteractiveAccent() bool { - if o != nil && o.InteractiveAccent.IsSet() { + if o != nil && !IsNil(o.InteractiveAccent) { return true } return false } -// SetInteractiveAccent gets a reference to the given NullableString and assigns it to the InteractiveAccent field. +// SetInteractiveAccent gets a reference to the given string and assigns it to the InteractiveAccent field. func (o *CustomColorPalette) SetInteractiveAccent(v string) { - o.InteractiveAccent.Set(&v) -} -// SetInteractiveAccentNil sets the value for InteractiveAccent to be an explicit nil -func (o *CustomColorPalette) SetInteractiveAccentNil() { - o.InteractiveAccent.Set(nil) + o.InteractiveAccent = &v } -// UnsetInteractiveAccent ensures that no value is present for InteractiveAccent, not even an explicit nil -func (o *CustomColorPalette) UnsetInteractiveAccent() { - o.InteractiveAccent.Unset() -} - -// GetNavigationAccent returns the NavigationAccent field value if set, zero value otherwise (both if not set or set to explicit null). +// GetNavigationAccent returns the NavigationAccent field value if set, zero value otherwise. func (o *CustomColorPalette) GetNavigationAccent() string { - if o == nil || IsNil(o.NavigationAccent.Get()) { + if o == nil || IsNil(o.NavigationAccent) { var ret string return ret } - return *o.NavigationAccent.Get() + return *o.NavigationAccent } // GetNavigationAccentOk returns a tuple with the NavigationAccent 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 *CustomColorPalette) GetNavigationAccentOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.NavigationAccent) { return nil, false } - return o.NavigationAccent.Get(), o.NavigationAccent.IsSet() + return o.NavigationAccent, true } // HasNavigationAccent returns a boolean if a field has been set. func (o *CustomColorPalette) HasNavigationAccent() bool { - if o != nil && o.NavigationAccent.IsSet() { + if o != nil && !IsNil(o.NavigationAccent) { return true } return false } -// SetNavigationAccent gets a reference to the given NullableString and assigns it to the NavigationAccent field. +// SetNavigationAccent gets a reference to the given string and assigns it to the NavigationAccent field. func (o *CustomColorPalette) SetNavigationAccent(v string) { - o.NavigationAccent.Set(&v) -} -// SetNavigationAccentNil sets the value for NavigationAccent to be an explicit nil -func (o *CustomColorPalette) SetNavigationAccentNil() { - o.NavigationAccent.Set(nil) -} - -// UnsetNavigationAccent ensures that no value is present for NavigationAccent, not even an explicit nil -func (o *CustomColorPalette) UnsetNavigationAccent() { - o.NavigationAccent.Unset() + o.NavigationAccent = &v } -// GetPrimary returns the Primary field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrimary returns the Primary field value if set, zero value otherwise. func (o *CustomColorPalette) GetPrimary() string { - if o == nil || IsNil(o.Primary.Get()) { + if o == nil || IsNil(o.Primary) { var ret string return ret } - return *o.Primary.Get() + return *o.Primary } // GetPrimaryOk returns a tuple with the Primary 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 *CustomColorPalette) GetPrimaryOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Primary) { return nil, false } - return o.Primary.Get(), o.Primary.IsSet() + return o.Primary, true } // HasPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasPrimary() bool { - if o != nil && o.Primary.IsSet() { + if o != nil && !IsNil(o.Primary) { return true } return false } -// SetPrimary gets a reference to the given NullableString and assigns it to the Primary field. +// SetPrimary gets a reference to the given string and assigns it to the Primary field. func (o *CustomColorPalette) SetPrimary(v string) { - o.Primary.Set(&v) -} -// SetPrimaryNil sets the value for Primary to be an explicit nil -func (o *CustomColorPalette) SetPrimaryNil() { - o.Primary.Set(nil) -} - -// UnsetPrimary ensures that no value is present for Primary, not even an explicit nil -func (o *CustomColorPalette) UnsetPrimary() { - o.Primary.Unset() + o.Primary = &v } -// GetTextDanger returns the TextDanger field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTextDanger returns the TextDanger field value if set, zero value otherwise. func (o *CustomColorPalette) GetTextDanger() string { - if o == nil || IsNil(o.TextDanger.Get()) { + if o == nil || IsNil(o.TextDanger) { var ret string return ret } - return *o.TextDanger.Get() + return *o.TextDanger } // GetTextDangerOk returns a tuple with the TextDanger 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 *CustomColorPalette) GetTextDangerOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.TextDanger) { return nil, false } - return o.TextDanger.Get(), o.TextDanger.IsSet() + return o.TextDanger, true } // HasTextDanger returns a boolean if a field has been set. func (o *CustomColorPalette) HasTextDanger() bool { - if o != nil && o.TextDanger.IsSet() { + if o != nil && !IsNil(o.TextDanger) { return true } return false } -// SetTextDanger gets a reference to the given NullableString and assigns it to the TextDanger field. +// SetTextDanger gets a reference to the given string and assigns it to the TextDanger field. func (o *CustomColorPalette) SetTextDanger(v string) { - o.TextDanger.Set(&v) -} -// SetTextDangerNil sets the value for TextDanger to be an explicit nil -func (o *CustomColorPalette) SetTextDangerNil() { - o.TextDanger.Set(nil) -} - -// UnsetTextDanger ensures that no value is present for TextDanger, not even an explicit nil -func (o *CustomColorPalette) UnsetTextDanger() { - o.TextDanger.Unset() + o.TextDanger = &v } -// GetTextPrimary returns the TextPrimary field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTextPrimary returns the TextPrimary field value if set, zero value otherwise. func (o *CustomColorPalette) GetTextPrimary() string { - if o == nil || IsNil(o.TextPrimary.Get()) { + if o == nil || IsNil(o.TextPrimary) { var ret string return ret } - return *o.TextPrimary.Get() + return *o.TextPrimary } // GetTextPrimaryOk returns a tuple with the TextPrimary 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 *CustomColorPalette) GetTextPrimaryOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.TextPrimary) { return nil, false } - return o.TextPrimary.Get(), o.TextPrimary.IsSet() + return o.TextPrimary, true } // HasTextPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasTextPrimary() bool { - if o != nil && o.TextPrimary.IsSet() { + if o != nil && !IsNil(o.TextPrimary) { return true } return false } -// SetTextPrimary gets a reference to the given NullableString and assigns it to the TextPrimary field. +// SetTextPrimary gets a reference to the given string and assigns it to the TextPrimary field. func (o *CustomColorPalette) SetTextPrimary(v string) { - o.TextPrimary.Set(&v) -} -// SetTextPrimaryNil sets the value for TextPrimary to be an explicit nil -func (o *CustomColorPalette) SetTextPrimaryNil() { - o.TextPrimary.Set(nil) -} - -// UnsetTextPrimary ensures that no value is present for TextPrimary, not even an explicit nil -func (o *CustomColorPalette) UnsetTextPrimary() { - o.TextPrimary.Unset() + o.TextPrimary = &v } func (o CustomColorPalette) MarshalJSON() ([]byte, error) { @@ -435,32 +345,32 @@ func (o CustomColorPalette) MarshalJSON() ([]byte, error) { func (o CustomColorPalette) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.BackgroundHover.IsSet() { - toSerialize["backgroundHover"] = o.BackgroundHover.Get() + if !IsNil(o.BackgroundHover) { + toSerialize["backgroundHover"] = o.BackgroundHover } - if o.BackgroundPrimary.IsSet() { - toSerialize["backgroundPrimary"] = o.BackgroundPrimary.Get() + if !IsNil(o.BackgroundPrimary) { + toSerialize["backgroundPrimary"] = o.BackgroundPrimary } - if o.BackgroundSecondary.IsSet() { - toSerialize["backgroundSecondary"] = o.BackgroundSecondary.Get() + if !IsNil(o.BackgroundSecondary) { + toSerialize["backgroundSecondary"] = o.BackgroundSecondary } - if o.ButtonPrimary.IsSet() { - toSerialize["buttonPrimary"] = o.ButtonPrimary.Get() + if !IsNil(o.ButtonPrimary) { + toSerialize["buttonPrimary"] = o.ButtonPrimary } - if o.InteractiveAccent.IsSet() { - toSerialize["interactiveAccent"] = o.InteractiveAccent.Get() + if !IsNil(o.InteractiveAccent) { + toSerialize["interactiveAccent"] = o.InteractiveAccent } - if o.NavigationAccent.IsSet() { - toSerialize["navigationAccent"] = o.NavigationAccent.Get() + if !IsNil(o.NavigationAccent) { + toSerialize["navigationAccent"] = o.NavigationAccent } - if o.Primary.IsSet() { - toSerialize["primary"] = o.Primary.Get() + if !IsNil(o.Primary) { + toSerialize["primary"] = o.Primary } - if o.TextDanger.IsSet() { - toSerialize["textDanger"] = o.TextDanger.Get() + if !IsNil(o.TextDanger) { + toSerialize["textDanger"] = o.TextDanger } - if o.TextPrimary.IsSet() { - toSerialize["textPrimary"] = o.TextPrimary.Get() + if !IsNil(o.TextPrimary) { + toSerialize["textPrimary"] = o.TextPrimary } return toSerialize, nil } diff --git a/go/internal/openapi/model_custom_strings_override.go b/go/internal/openapi/model_custom_strings_override.go index f7e2c738c..451acbc4b 100644 --- a/go/internal/openapi/model_custom_strings_override.go +++ b/go/internal/openapi/model_custom_strings_override.go @@ -19,9 +19,9 @@ var _ MappedNullable = &CustomStringsOverride{} // CustomStringsOverride struct for CustomStringsOverride type CustomStringsOverride struct { - ChannelsHelp NullableString `json:"channelsHelp,omitempty"` - ChannelsMany NullableString `json:"channelsMany,omitempty"` - ChannelsOne NullableString `json:"channelsOne,omitempty"` + ChannelsHelp *string `json:"channelsHelp,omitempty"` + ChannelsMany *string `json:"channelsMany,omitempty"` + ChannelsOne *string `json:"channelsOne,omitempty"` } // NewCustomStringsOverride instantiates a new CustomStringsOverride object @@ -41,130 +41,100 @@ func NewCustomStringsOverrideWithDefaults() *CustomStringsOverride { return &this } -// GetChannelsHelp returns the ChannelsHelp field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannelsHelp returns the ChannelsHelp field value if set, zero value otherwise. func (o *CustomStringsOverride) GetChannelsHelp() string { - if o == nil || IsNil(o.ChannelsHelp.Get()) { + if o == nil || IsNil(o.ChannelsHelp) { var ret string return ret } - return *o.ChannelsHelp.Get() + return *o.ChannelsHelp } // GetChannelsHelpOk returns a tuple with the ChannelsHelp 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 *CustomStringsOverride) GetChannelsHelpOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ChannelsHelp) { return nil, false } - return o.ChannelsHelp.Get(), o.ChannelsHelp.IsSet() + return o.ChannelsHelp, true } // HasChannelsHelp returns a boolean if a field has been set. func (o *CustomStringsOverride) HasChannelsHelp() bool { - if o != nil && o.ChannelsHelp.IsSet() { + if o != nil && !IsNil(o.ChannelsHelp) { return true } return false } -// SetChannelsHelp gets a reference to the given NullableString and assigns it to the ChannelsHelp field. +// SetChannelsHelp gets a reference to the given string and assigns it to the ChannelsHelp field. func (o *CustomStringsOverride) SetChannelsHelp(v string) { - o.ChannelsHelp.Set(&v) -} -// SetChannelsHelpNil sets the value for ChannelsHelp to be an explicit nil -func (o *CustomStringsOverride) SetChannelsHelpNil() { - o.ChannelsHelp.Set(nil) -} - -// UnsetChannelsHelp ensures that no value is present for ChannelsHelp, not even an explicit nil -func (o *CustomStringsOverride) UnsetChannelsHelp() { - o.ChannelsHelp.Unset() + o.ChannelsHelp = &v } -// GetChannelsMany returns the ChannelsMany field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannelsMany returns the ChannelsMany field value if set, zero value otherwise. func (o *CustomStringsOverride) GetChannelsMany() string { - if o == nil || IsNil(o.ChannelsMany.Get()) { + if o == nil || IsNil(o.ChannelsMany) { var ret string return ret } - return *o.ChannelsMany.Get() + return *o.ChannelsMany } // GetChannelsManyOk returns a tuple with the ChannelsMany 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 *CustomStringsOverride) GetChannelsManyOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ChannelsMany) { return nil, false } - return o.ChannelsMany.Get(), o.ChannelsMany.IsSet() + return o.ChannelsMany, true } // HasChannelsMany returns a boolean if a field has been set. func (o *CustomStringsOverride) HasChannelsMany() bool { - if o != nil && o.ChannelsMany.IsSet() { + if o != nil && !IsNil(o.ChannelsMany) { return true } return false } -// SetChannelsMany gets a reference to the given NullableString and assigns it to the ChannelsMany field. +// SetChannelsMany gets a reference to the given string and assigns it to the ChannelsMany field. func (o *CustomStringsOverride) SetChannelsMany(v string) { - o.ChannelsMany.Set(&v) -} -// SetChannelsManyNil sets the value for ChannelsMany to be an explicit nil -func (o *CustomStringsOverride) SetChannelsManyNil() { - o.ChannelsMany.Set(nil) + o.ChannelsMany = &v } -// UnsetChannelsMany ensures that no value is present for ChannelsMany, not even an explicit nil -func (o *CustomStringsOverride) UnsetChannelsMany() { - o.ChannelsMany.Unset() -} - -// GetChannelsOne returns the ChannelsOne field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannelsOne returns the ChannelsOne field value if set, zero value otherwise. func (o *CustomStringsOverride) GetChannelsOne() string { - if o == nil || IsNil(o.ChannelsOne.Get()) { + if o == nil || IsNil(o.ChannelsOne) { var ret string return ret } - return *o.ChannelsOne.Get() + return *o.ChannelsOne } // GetChannelsOneOk returns a tuple with the ChannelsOne 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 *CustomStringsOverride) GetChannelsOneOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ChannelsOne) { return nil, false } - return o.ChannelsOne.Get(), o.ChannelsOne.IsSet() + return o.ChannelsOne, true } // HasChannelsOne returns a boolean if a field has been set. func (o *CustomStringsOverride) HasChannelsOne() bool { - if o != nil && o.ChannelsOne.IsSet() { + if o != nil && !IsNil(o.ChannelsOne) { return true } return false } -// SetChannelsOne gets a reference to the given NullableString and assigns it to the ChannelsOne field. +// SetChannelsOne gets a reference to the given string and assigns it to the ChannelsOne field. func (o *CustomStringsOverride) SetChannelsOne(v string) { - o.ChannelsOne.Set(&v) -} -// SetChannelsOneNil sets the value for ChannelsOne to be an explicit nil -func (o *CustomStringsOverride) SetChannelsOneNil() { - o.ChannelsOne.Set(nil) -} - -// UnsetChannelsOne ensures that no value is present for ChannelsOne, not even an explicit nil -func (o *CustomStringsOverride) UnsetChannelsOne() { - o.ChannelsOne.Unset() + o.ChannelsOne = &v } func (o CustomStringsOverride) MarshalJSON() ([]byte, error) { @@ -177,14 +147,14 @@ func (o CustomStringsOverride) MarshalJSON() ([]byte, error) { func (o CustomStringsOverride) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ChannelsHelp.IsSet() { - toSerialize["channelsHelp"] = o.ChannelsHelp.Get() + if !IsNil(o.ChannelsHelp) { + toSerialize["channelsHelp"] = o.ChannelsHelp } - if o.ChannelsMany.IsSet() { - toSerialize["channelsMany"] = o.ChannelsMany.Get() + if !IsNil(o.ChannelsMany) { + toSerialize["channelsMany"] = o.ChannelsMany } - if o.ChannelsOne.IsSet() { - toSerialize["channelsOne"] = o.ChannelsOne.Get() + if !IsNil(o.ChannelsOne) { + toSerialize["channelsOne"] = o.ChannelsOne } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_created_event_data.go b/go/internal/openapi/model_endpoint_created_event_data.go index 33a905abe..1aa49c50d 100644 --- a/go/internal/openapi/model_endpoint_created_event_data.go +++ b/go/internal/openapi/model_endpoint_created_event_data.go @@ -24,11 +24,11 @@ type EndpointCreatedEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` // The ep's UID - EndpointUid NullableString `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EndpointUid *string `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` } type _EndpointCreatedEventData EndpointCreatedEventData @@ -76,46 +76,36 @@ func (o *EndpointCreatedEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *EndpointCreatedEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *EndpointCreatedEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *EndpointCreatedEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *EndpointCreatedEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *EndpointCreatedEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *EndpointCreatedEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -142,46 +132,36 @@ func (o *EndpointCreatedEventData) SetEndpointId(v string) { o.EndpointId = v } -// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise. func (o *EndpointCreatedEventData) GetEndpointUid() string { - if o == nil || IsNil(o.EndpointUid.Get()) { + if o == nil || IsNil(o.EndpointUid) { var ret string return ret } - return *o.EndpointUid.Get() + return *o.EndpointUid } // GetEndpointUidOk returns a tuple with the EndpointUid 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 *EndpointCreatedEventData) GetEndpointUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EndpointUid) { return nil, false } - return o.EndpointUid.Get(), o.EndpointUid.IsSet() + return o.EndpointUid, true } // HasEndpointUid returns a boolean if a field has been set. func (o *EndpointCreatedEventData) HasEndpointUid() bool { - if o != nil && o.EndpointUid.IsSet() { + if o != nil && !IsNil(o.EndpointUid) { return true } return false } -// SetEndpointUid gets a reference to the given NullableString and assigns it to the EndpointUid field. +// SetEndpointUid gets a reference to the given string and assigns it to the EndpointUid field. func (o *EndpointCreatedEventData) SetEndpointUid(v string) { - o.EndpointUid.Set(&v) -} -// SetEndpointUidNil sets the value for EndpointUid to be an explicit nil -func (o *EndpointCreatedEventData) SetEndpointUidNil() { - o.EndpointUid.Set(nil) -} - -// UnsetEndpointUid ensures that no value is present for EndpointUid, not even an explicit nil -func (o *EndpointCreatedEventData) UnsetEndpointUid() { - o.EndpointUid.Unset() + o.EndpointUid = &v } func (o EndpointCreatedEventData) MarshalJSON() ([]byte, error) { @@ -195,12 +175,12 @@ func (o EndpointCreatedEventData) MarshalJSON() ([]byte, error) { func (o EndpointCreatedEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId - if o.EndpointUid.IsSet() { - toSerialize["endpointUid"] = o.EndpointUid.Get() + if !IsNil(o.EndpointUid) { + toSerialize["endpointUid"] = o.EndpointUid } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_deleted_event_data.go b/go/internal/openapi/model_endpoint_deleted_event_data.go index d89af5aa5..ddef5b38f 100644 --- a/go/internal/openapi/model_endpoint_deleted_event_data.go +++ b/go/internal/openapi/model_endpoint_deleted_event_data.go @@ -24,11 +24,11 @@ type EndpointDeletedEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` // The ep's UID - EndpointUid NullableString `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EndpointUid *string `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` } type _EndpointDeletedEventData EndpointDeletedEventData @@ -76,46 +76,36 @@ func (o *EndpointDeletedEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *EndpointDeletedEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *EndpointDeletedEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *EndpointDeletedEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *EndpointDeletedEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *EndpointDeletedEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *EndpointDeletedEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -142,46 +132,36 @@ func (o *EndpointDeletedEventData) SetEndpointId(v string) { o.EndpointId = v } -// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise. func (o *EndpointDeletedEventData) GetEndpointUid() string { - if o == nil || IsNil(o.EndpointUid.Get()) { + if o == nil || IsNil(o.EndpointUid) { var ret string return ret } - return *o.EndpointUid.Get() + return *o.EndpointUid } // GetEndpointUidOk returns a tuple with the EndpointUid 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 *EndpointDeletedEventData) GetEndpointUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EndpointUid) { return nil, false } - return o.EndpointUid.Get(), o.EndpointUid.IsSet() + return o.EndpointUid, true } // HasEndpointUid returns a boolean if a field has been set. func (o *EndpointDeletedEventData) HasEndpointUid() bool { - if o != nil && o.EndpointUid.IsSet() { + if o != nil && !IsNil(o.EndpointUid) { return true } return false } -// SetEndpointUid gets a reference to the given NullableString and assigns it to the EndpointUid field. +// SetEndpointUid gets a reference to the given string and assigns it to the EndpointUid field. func (o *EndpointDeletedEventData) SetEndpointUid(v string) { - o.EndpointUid.Set(&v) -} -// SetEndpointUidNil sets the value for EndpointUid to be an explicit nil -func (o *EndpointDeletedEventData) SetEndpointUidNil() { - o.EndpointUid.Set(nil) -} - -// UnsetEndpointUid ensures that no value is present for EndpointUid, not even an explicit nil -func (o *EndpointDeletedEventData) UnsetEndpointUid() { - o.EndpointUid.Unset() + o.EndpointUid = &v } func (o EndpointDeletedEventData) MarshalJSON() ([]byte, error) { @@ -195,12 +175,12 @@ func (o EndpointDeletedEventData) MarshalJSON() ([]byte, error) { func (o EndpointDeletedEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId - if o.EndpointUid.IsSet() { - toSerialize["endpointUid"] = o.EndpointUid.Get() + if !IsNil(o.EndpointUid) { + toSerialize["endpointUid"] = o.EndpointUid } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_disabled_event_data.go b/go/internal/openapi/model_endpoint_disabled_event_data.go index d89cd8e35..11ca1d9d5 100644 --- a/go/internal/openapi/model_endpoint_disabled_event_data.go +++ b/go/internal/openapi/model_endpoint_disabled_event_data.go @@ -25,11 +25,11 @@ type EndpointDisabledEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` // The ep's UID - EndpointUid NullableString `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EndpointUid *string `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` FailSince time.Time `json:"failSince"` } @@ -79,46 +79,36 @@ func (o *EndpointDisabledEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *EndpointDisabledEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *EndpointDisabledEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *EndpointDisabledEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *EndpointDisabledEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *EndpointDisabledEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *EndpointDisabledEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -145,46 +135,36 @@ func (o *EndpointDisabledEventData) SetEndpointId(v string) { o.EndpointId = v } -// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise. func (o *EndpointDisabledEventData) GetEndpointUid() string { - if o == nil || IsNil(o.EndpointUid.Get()) { + if o == nil || IsNil(o.EndpointUid) { var ret string return ret } - return *o.EndpointUid.Get() + return *o.EndpointUid } // GetEndpointUidOk returns a tuple with the EndpointUid 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 *EndpointDisabledEventData) GetEndpointUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EndpointUid) { return nil, false } - return o.EndpointUid.Get(), o.EndpointUid.IsSet() + return o.EndpointUid, true } // HasEndpointUid returns a boolean if a field has been set. func (o *EndpointDisabledEventData) HasEndpointUid() bool { - if o != nil && o.EndpointUid.IsSet() { + if o != nil && !IsNil(o.EndpointUid) { return true } return false } -// SetEndpointUid gets a reference to the given NullableString and assigns it to the EndpointUid field. +// SetEndpointUid gets a reference to the given string and assigns it to the EndpointUid field. func (o *EndpointDisabledEventData) SetEndpointUid(v string) { - o.EndpointUid.Set(&v) -} -// SetEndpointUidNil sets the value for EndpointUid to be an explicit nil -func (o *EndpointDisabledEventData) SetEndpointUidNil() { - o.EndpointUid.Set(nil) -} - -// UnsetEndpointUid ensures that no value is present for EndpointUid, not even an explicit nil -func (o *EndpointDisabledEventData) UnsetEndpointUid() { - o.EndpointUid.Unset() + o.EndpointUid = &v } // GetFailSince returns the FailSince field value @@ -222,12 +202,12 @@ func (o EndpointDisabledEventData) MarshalJSON() ([]byte, error) { func (o EndpointDisabledEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId - if o.EndpointUid.IsSet() { - toSerialize["endpointUid"] = o.EndpointUid.Get() + if !IsNil(o.EndpointUid) { + toSerialize["endpointUid"] = o.EndpointUid } toSerialize["failSince"] = o.FailSince return toSerialize, nil diff --git a/go/internal/openapi/model_endpoint_in.go b/go/internal/openapi/model_endpoint_in.go index 6b67cfd26..51ccca752 100644 --- a/go/internal/openapi/model_endpoint_in.go +++ b/go/internal/openapi/model_endpoint_in.go @@ -27,14 +27,14 @@ type EndpointIn struct { Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24. - Secret NullableString `json:"secret,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` + Secret *string `json:"secret,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` // Deprecated - Version NullableInt32 `json:"version,omitempty"` + Version *int32 `json:"version,omitempty"` } type _EndpointIn EndpointIn @@ -51,7 +51,7 @@ func NewEndpointIn(url string) *EndpointIn { this.Disabled = &disabled this.Url = url var version int32 = 1 - this.Version = *NewNullableInt32(&version) + this.Version = &version return &this } @@ -65,13 +65,13 @@ func NewEndpointInWithDefaults() *EndpointIn { var disabled bool = false this.Disabled = &disabled var version int32 = 1 - this.Version = *NewNullableInt32(&version) + this.Version = &version return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *EndpointIn) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -80,7 +80,6 @@ func (o *EndpointIn) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *EndpointIn) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -166,9 +165,9 @@ func (o *EndpointIn) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *EndpointIn) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -177,7 +176,6 @@ func (o *EndpointIn) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *EndpointIn) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -231,130 +229,100 @@ func (o *EndpointIn) SetMetadata(v map[string]string) { o.Metadata = &v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *EndpointIn) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *EndpointIn) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *EndpointIn) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *EndpointIn) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *EndpointIn) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *EndpointIn) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } -// GetSecret returns the Secret field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSecret returns the Secret field value if set, zero value otherwise. func (o *EndpointIn) GetSecret() string { - if o == nil || IsNil(o.Secret.Get()) { + if o == nil || IsNil(o.Secret) { var ret string return ret } - return *o.Secret.Get() + return *o.Secret } // GetSecretOk returns a tuple with the Secret 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 *EndpointIn) GetSecretOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Secret) { return nil, false } - return o.Secret.Get(), o.Secret.IsSet() + return o.Secret, true } // HasSecret returns a boolean if a field has been set. func (o *EndpointIn) HasSecret() bool { - if o != nil && o.Secret.IsSet() { + if o != nil && !IsNil(o.Secret) { return true } return false } -// SetSecret gets a reference to the given NullableString and assigns it to the Secret field. +// SetSecret gets a reference to the given string and assigns it to the Secret field. func (o *EndpointIn) SetSecret(v string) { - o.Secret.Set(&v) -} -// SetSecretNil sets the value for Secret to be an explicit nil -func (o *EndpointIn) SetSecretNil() { - o.Secret.Set(nil) + o.Secret = &v } -// UnsetSecret ensures that no value is present for Secret, not even an explicit nil -func (o *EndpointIn) UnsetSecret() { - o.Secret.Unset() -} - -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *EndpointIn) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *EndpointIn) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *EndpointIn) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *EndpointIn) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *EndpointIn) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *EndpointIn) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUrl returns the Url field value @@ -381,49 +349,39 @@ func (o *EndpointIn) SetUrl(v string) { o.Url = v } -// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). +// GetVersion returns the Version field value if set, zero value otherwise. // Deprecated func (o *EndpointIn) GetVersion() int32 { - if o == nil || IsNil(o.Version.Get()) { + if o == nil || IsNil(o.Version) { var ret int32 return ret } - return *o.Version.Get() + return *o.Version } // GetVersionOk returns a tuple with the Version 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 // Deprecated func (o *EndpointIn) GetVersionOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.Version) { return nil, false } - return o.Version.Get(), o.Version.IsSet() + return o.Version, true } // HasVersion returns a boolean if a field has been set. func (o *EndpointIn) HasVersion() bool { - if o != nil && o.Version.IsSet() { + if o != nil && !IsNil(o.Version) { return true } return false } -// SetVersion gets a reference to the given NullableInt32 and assigns it to the Version field. +// SetVersion gets a reference to the given int32 and assigns it to the Version field. // Deprecated func (o *EndpointIn) SetVersion(v int32) { - o.Version.Set(&v) -} -// SetVersionNil sets the value for Version to be an explicit nil -func (o *EndpointIn) SetVersionNil() { - o.Version.Set(nil) -} - -// UnsetVersion ensures that no value is present for Version, not even an explicit nil -func (o *EndpointIn) UnsetVersion() { - o.Version.Unset() + o.Version = &v } func (o EndpointIn) MarshalJSON() ([]byte, error) { @@ -436,7 +394,7 @@ func (o EndpointIn) MarshalJSON() ([]byte, error) { func (o EndpointIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } if !IsNil(o.Description) { @@ -445,24 +403,24 @@ func (o EndpointIn) ToMap() (map[string]interface{}, error) { if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } if !IsNil(o.Metadata) { toSerialize["metadata"] = o.Metadata } - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Secret.IsSet() { - toSerialize["secret"] = o.Secret.Get() + if !IsNil(o.Secret) { + toSerialize["secret"] = o.Secret } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["url"] = o.Url - if o.Version.IsSet() { - toSerialize["version"] = o.Version.Get() + if !IsNil(o.Version) { + toSerialize["version"] = o.Version } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_message_out.go b/go/internal/openapi/model_endpoint_message_out.go index df388e3ed..ad1bf0d96 100644 --- a/go/internal/openapi/model_endpoint_message_out.go +++ b/go/internal/openapi/model_endpoint_message_out.go @@ -25,12 +25,12 @@ type EndpointMessageOut struct { // List of free-form identifiers that endpoints can filter by Channels []string `json:"channels,omitempty"` // Optional unique identifier for the message - EventId NullableString `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EventId *string `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name EventType string `json:"eventType" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The msg's ID Id string `json:"id"` - NextAttempt NullableTime `json:"nextAttempt,omitempty"` + NextAttempt *time.Time `json:"nextAttempt,omitempty"` Payload map[string]interface{} `json:"payload"` Status MessageStatus `json:"status"` Tags []string `json:"tags,omitempty"` @@ -61,9 +61,9 @@ func NewEndpointMessageOutWithDefaults() *EndpointMessageOut { return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *EndpointMessageOut) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -72,7 +72,6 @@ func (o *EndpointMessageOut) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *EndpointMessageOut) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -94,46 +93,36 @@ func (o *EndpointMessageOut) SetChannels(v []string) { o.Channels = v } -// GetEventId returns the EventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventId returns the EventId field value if set, zero value otherwise. func (o *EndpointMessageOut) GetEventId() string { - if o == nil || IsNil(o.EventId.Get()) { + if o == nil || IsNil(o.EventId) { var ret string return ret } - return *o.EventId.Get() + return *o.EventId } // GetEventIdOk returns a tuple with the EventId 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 *EndpointMessageOut) GetEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EventId) { return nil, false } - return o.EventId.Get(), o.EventId.IsSet() + return o.EventId, true } // HasEventId returns a boolean if a field has been set. func (o *EndpointMessageOut) HasEventId() bool { - if o != nil && o.EventId.IsSet() { + if o != nil && !IsNil(o.EventId) { return true } return false } -// SetEventId gets a reference to the given NullableString and assigns it to the EventId field. +// SetEventId gets a reference to the given string and assigns it to the EventId field. func (o *EndpointMessageOut) SetEventId(v string) { - o.EventId.Set(&v) -} -// SetEventIdNil sets the value for EventId to be an explicit nil -func (o *EndpointMessageOut) SetEventIdNil() { - o.EventId.Set(nil) -} - -// UnsetEventId ensures that no value is present for EventId, not even an explicit nil -func (o *EndpointMessageOut) UnsetEventId() { - o.EventId.Unset() + o.EventId = &v } // GetEventType returns the EventType field value @@ -184,46 +173,36 @@ func (o *EndpointMessageOut) SetId(v string) { o.Id = v } -// GetNextAttempt returns the NextAttempt field value if set, zero value otherwise (both if not set or set to explicit null). +// GetNextAttempt returns the NextAttempt field value if set, zero value otherwise. func (o *EndpointMessageOut) GetNextAttempt() time.Time { - if o == nil || IsNil(o.NextAttempt.Get()) { + if o == nil || IsNil(o.NextAttempt) { var ret time.Time return ret } - return *o.NextAttempt.Get() + return *o.NextAttempt } // GetNextAttemptOk returns a tuple with the NextAttempt 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 *EndpointMessageOut) GetNextAttemptOk() (*time.Time, bool) { - if o == nil { + if o == nil || IsNil(o.NextAttempt) { return nil, false } - return o.NextAttempt.Get(), o.NextAttempt.IsSet() + return o.NextAttempt, true } // HasNextAttempt returns a boolean if a field has been set. func (o *EndpointMessageOut) HasNextAttempt() bool { - if o != nil && o.NextAttempt.IsSet() { + if o != nil && !IsNil(o.NextAttempt) { return true } return false } -// SetNextAttempt gets a reference to the given NullableTime and assigns it to the NextAttempt field. +// SetNextAttempt gets a reference to the given time.Time and assigns it to the NextAttempt field. func (o *EndpointMessageOut) SetNextAttempt(v time.Time) { - o.NextAttempt.Set(&v) -} -// SetNextAttemptNil sets the value for NextAttempt to be an explicit nil -func (o *EndpointMessageOut) SetNextAttemptNil() { - o.NextAttempt.Set(nil) -} - -// UnsetNextAttempt ensures that no value is present for NextAttempt, not even an explicit nil -func (o *EndpointMessageOut) UnsetNextAttempt() { - o.NextAttempt.Unset() + o.NextAttempt = &v } // GetPayload returns the Payload field value @@ -274,9 +253,9 @@ func (o *EndpointMessageOut) SetStatus(v MessageStatus) { o.Status = v } -// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTags returns the Tags field value if set, zero value otherwise. func (o *EndpointMessageOut) GetTags() []string { - if o == nil { + if o == nil || IsNil(o.Tags) { var ret []string return ret } @@ -285,7 +264,6 @@ func (o *EndpointMessageOut) GetTags() []string { // GetTagsOk returns a tuple with the Tags 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 *EndpointMessageOut) GetTagsOk() ([]string, bool) { if o == nil || IsNil(o.Tags) { return nil, false @@ -341,20 +319,20 @@ func (o EndpointMessageOut) MarshalJSON() ([]byte, error) { func (o EndpointMessageOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } - if o.EventId.IsSet() { - toSerialize["eventId"] = o.EventId.Get() + if !IsNil(o.EventId) { + toSerialize["eventId"] = o.EventId } toSerialize["eventType"] = o.EventType toSerialize["id"] = o.Id - if o.NextAttempt.IsSet() { - toSerialize["nextAttempt"] = o.NextAttempt.Get() + if !IsNil(o.NextAttempt) { + toSerialize["nextAttempt"] = o.NextAttempt } toSerialize["payload"] = o.Payload toSerialize["status"] = o.Status - if o.Tags != nil { + if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } toSerialize["timestamp"] = o.Timestamp diff --git a/go/internal/openapi/model_endpoint_mtls_config_in.go b/go/internal/openapi/model_endpoint_mtls_config_in.go index a0194ba01..2b2b33451 100644 --- a/go/internal/openapi/model_endpoint_mtls_config_in.go +++ b/go/internal/openapi/model_endpoint_mtls_config_in.go @@ -24,7 +24,7 @@ type EndpointMtlsConfigIn struct { // A PEM encoded private key and X509 certificate to identify the webhook sender. Identity string `json:"identity"` // A PEM encoded X509 certificate used to verify the webhook receiver's certificate. - ServerCaCert NullableString `json:"serverCaCert,omitempty"` + ServerCaCert *string `json:"serverCaCert,omitempty"` } type _EndpointMtlsConfigIn EndpointMtlsConfigIn @@ -71,46 +71,36 @@ func (o *EndpointMtlsConfigIn) SetIdentity(v string) { o.Identity = v } -// GetServerCaCert returns the ServerCaCert field value if set, zero value otherwise (both if not set or set to explicit null). +// GetServerCaCert returns the ServerCaCert field value if set, zero value otherwise. func (o *EndpointMtlsConfigIn) GetServerCaCert() string { - if o == nil || IsNil(o.ServerCaCert.Get()) { + if o == nil || IsNil(o.ServerCaCert) { var ret string return ret } - return *o.ServerCaCert.Get() + return *o.ServerCaCert } // GetServerCaCertOk returns a tuple with the ServerCaCert 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 *EndpointMtlsConfigIn) GetServerCaCertOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ServerCaCert) { return nil, false } - return o.ServerCaCert.Get(), o.ServerCaCert.IsSet() + return o.ServerCaCert, true } // HasServerCaCert returns a boolean if a field has been set. func (o *EndpointMtlsConfigIn) HasServerCaCert() bool { - if o != nil && o.ServerCaCert.IsSet() { + if o != nil && !IsNil(o.ServerCaCert) { return true } return false } -// SetServerCaCert gets a reference to the given NullableString and assigns it to the ServerCaCert field. +// SetServerCaCert gets a reference to the given string and assigns it to the ServerCaCert field. func (o *EndpointMtlsConfigIn) SetServerCaCert(v string) { - o.ServerCaCert.Set(&v) -} -// SetServerCaCertNil sets the value for ServerCaCert to be an explicit nil -func (o *EndpointMtlsConfigIn) SetServerCaCertNil() { - o.ServerCaCert.Set(nil) -} - -// UnsetServerCaCert ensures that no value is present for ServerCaCert, not even an explicit nil -func (o *EndpointMtlsConfigIn) UnsetServerCaCert() { - o.ServerCaCert.Unset() + o.ServerCaCert = &v } func (o EndpointMtlsConfigIn) MarshalJSON() ([]byte, error) { @@ -124,8 +114,8 @@ func (o EndpointMtlsConfigIn) MarshalJSON() ([]byte, error) { func (o EndpointMtlsConfigIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["identity"] = o.Identity - if o.ServerCaCert.IsSet() { - toSerialize["serverCaCert"] = o.ServerCaCert.Get() + if !IsNil(o.ServerCaCert) { + toSerialize["serverCaCert"] = o.ServerCaCert } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_oauth_config_in.go b/go/internal/openapi/model_endpoint_oauth_config_in.go index 7037d6732..60b27a036 100644 --- a/go/internal/openapi/model_endpoint_oauth_config_in.go +++ b/go/internal/openapi/model_endpoint_oauth_config_in.go @@ -25,13 +25,13 @@ type EndpointOauthConfigIn struct { // The client ID. Required for all authentication types. ClientId string `json:"clientId"` // Optional client secret. This is only used for `clientSecretBasic` and `clientSecretPost`. For `clientSecretBasic`, the secret will be appended to the `Authorization` header. For `clientSecretPost`, this will be added to the body in a `client_secret` parameter. - ClientSecret NullableString `json:"clientSecret,omitempty"` + ClientSecret *string `json:"clientSecret,omitempty"` // Extra parameters added to the request body as key-value pairs. - ExtraParams map[string]string `json:"extraParams,omitempty"` + ExtraParams *map[string]string `json:"extraParams,omitempty"` GrantType Oauth2GrantTypeIn `json:"grantType"` JwtParams *ClientSecretJwtParamsIn `json:"jwtParams,omitempty"` // For `refreshToken` grant type - RefreshToken NullableString `json:"refreshToken,omitempty"` + RefreshToken *string `json:"refreshToken,omitempty"` // Optional OAuth scopes added to the request body. Scopes []string `json:"scopes,omitempty"` // The URL of the authorization server. @@ -109,65 +109,54 @@ func (o *EndpointOauthConfigIn) SetClientId(v string) { o.ClientId = v } -// GetClientSecret returns the ClientSecret field value if set, zero value otherwise (both if not set or set to explicit null). +// GetClientSecret returns the ClientSecret field value if set, zero value otherwise. func (o *EndpointOauthConfigIn) GetClientSecret() string { - if o == nil || IsNil(o.ClientSecret.Get()) { + if o == nil || IsNil(o.ClientSecret) { var ret string return ret } - return *o.ClientSecret.Get() + return *o.ClientSecret } // GetClientSecretOk returns a tuple with the ClientSecret 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 *EndpointOauthConfigIn) GetClientSecretOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ClientSecret) { return nil, false } - return o.ClientSecret.Get(), o.ClientSecret.IsSet() + return o.ClientSecret, true } // HasClientSecret returns a boolean if a field has been set. func (o *EndpointOauthConfigIn) HasClientSecret() bool { - if o != nil && o.ClientSecret.IsSet() { + if o != nil && !IsNil(o.ClientSecret) { return true } return false } -// SetClientSecret gets a reference to the given NullableString and assigns it to the ClientSecret field. +// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field. func (o *EndpointOauthConfigIn) SetClientSecret(v string) { - o.ClientSecret.Set(&v) -} -// SetClientSecretNil sets the value for ClientSecret to be an explicit nil -func (o *EndpointOauthConfigIn) SetClientSecretNil() { - o.ClientSecret.Set(nil) -} - -// UnsetClientSecret ensures that no value is present for ClientSecret, not even an explicit nil -func (o *EndpointOauthConfigIn) UnsetClientSecret() { - o.ClientSecret.Unset() + o.ClientSecret = &v } -// GetExtraParams returns the ExtraParams field value if set, zero value otherwise (both if not set or set to explicit null). +// GetExtraParams returns the ExtraParams field value if set, zero value otherwise. func (o *EndpointOauthConfigIn) GetExtraParams() map[string]string { - if o == nil { + if o == nil || IsNil(o.ExtraParams) { var ret map[string]string return ret } - return o.ExtraParams + return *o.ExtraParams } // GetExtraParamsOk returns a tuple with the ExtraParams 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 *EndpointOauthConfigIn) GetExtraParamsOk() (*map[string]string, bool) { if o == nil || IsNil(o.ExtraParams) { return nil, false } - return &o.ExtraParams, true + return o.ExtraParams, true } // HasExtraParams returns a boolean if a field has been set. @@ -181,7 +170,7 @@ func (o *EndpointOauthConfigIn) HasExtraParams() bool { // SetExtraParams gets a reference to the given map[string]string and assigns it to the ExtraParams field. func (o *EndpointOauthConfigIn) SetExtraParams(v map[string]string) { - o.ExtraParams = v + o.ExtraParams = &v } // GetGrantType returns the GrantType field value @@ -240,51 +229,41 @@ func (o *EndpointOauthConfigIn) SetJwtParams(v ClientSecretJwtParamsIn) { o.JwtParams = &v } -// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. func (o *EndpointOauthConfigIn) GetRefreshToken() string { - if o == nil || IsNil(o.RefreshToken.Get()) { + if o == nil || IsNil(o.RefreshToken) { var ret string return ret } - return *o.RefreshToken.Get() + return *o.RefreshToken } // GetRefreshTokenOk returns a tuple with the RefreshToken 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 *EndpointOauthConfigIn) GetRefreshTokenOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.RefreshToken) { return nil, false } - return o.RefreshToken.Get(), o.RefreshToken.IsSet() + return o.RefreshToken, true } // HasRefreshToken returns a boolean if a field has been set. func (o *EndpointOauthConfigIn) HasRefreshToken() bool { - if o != nil && o.RefreshToken.IsSet() { + if o != nil && !IsNil(o.RefreshToken) { return true } return false } -// SetRefreshToken gets a reference to the given NullableString and assigns it to the RefreshToken field. +// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. func (o *EndpointOauthConfigIn) SetRefreshToken(v string) { - o.RefreshToken.Set(&v) -} -// SetRefreshTokenNil sets the value for RefreshToken to be an explicit nil -func (o *EndpointOauthConfigIn) SetRefreshTokenNil() { - o.RefreshToken.Set(nil) -} - -// UnsetRefreshToken ensures that no value is present for RefreshToken, not even an explicit nil -func (o *EndpointOauthConfigIn) UnsetRefreshToken() { - o.RefreshToken.Unset() + o.RefreshToken = &v } -// GetScopes returns the Scopes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetScopes returns the Scopes field value if set, zero value otherwise. func (o *EndpointOauthConfigIn) GetScopes() []string { - if o == nil { + if o == nil || IsNil(o.Scopes) { var ret []string return ret } @@ -293,7 +272,6 @@ func (o *EndpointOauthConfigIn) GetScopes() []string { // GetScopesOk returns a tuple with the Scopes 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 *EndpointOauthConfigIn) GetScopesOk() ([]string, bool) { if o == nil || IsNil(o.Scopes) { return nil, false @@ -351,20 +329,20 @@ func (o EndpointOauthConfigIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["authMethod"] = o.AuthMethod toSerialize["clientId"] = o.ClientId - if o.ClientSecret.IsSet() { - toSerialize["clientSecret"] = o.ClientSecret.Get() + if !IsNil(o.ClientSecret) { + toSerialize["clientSecret"] = o.ClientSecret } - if o.ExtraParams != nil { + if !IsNil(o.ExtraParams) { toSerialize["extraParams"] = o.ExtraParams } toSerialize["grantType"] = o.GrantType if !IsNil(o.JwtParams) { toSerialize["jwtParams"] = o.JwtParams } - if o.RefreshToken.IsSet() { - toSerialize["refreshToken"] = o.RefreshToken.Get() + if !IsNil(o.RefreshToken) { + toSerialize["refreshToken"] = o.RefreshToken } - if o.Scopes != nil { + if !IsNil(o.Scopes) { toSerialize["scopes"] = o.Scopes } toSerialize["tokenUrl"] = o.TokenUrl diff --git a/go/internal/openapi/model_endpoint_out.go b/go/internal/openapi/model_endpoint_out.go index 6f6eaaa3f..efa6cdd1e 100644 --- a/go/internal/openapi/model_endpoint_out.go +++ b/go/internal/openapi/model_endpoint_out.go @@ -32,9 +32,9 @@ type EndpointOut struct { // The ep's ID Id string `json:"id"` Metadata map[string]string `json:"metadata"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` Url string `json:"url"` // Deprecated @@ -71,9 +71,9 @@ func NewEndpointOutWithDefaults() *EndpointOut { return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *EndpointOut) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -82,7 +82,6 @@ func (o *EndpointOut) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *EndpointOut) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -184,9 +183,9 @@ func (o *EndpointOut) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *EndpointOut) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -195,7 +194,6 @@ func (o *EndpointOut) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *EndpointOut) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -265,88 +263,68 @@ func (o *EndpointOut) SetMetadata(v map[string]string) { o.Metadata = v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *EndpointOut) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *EndpointOut) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *EndpointOut) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *EndpointOut) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *EndpointOut) SetRateLimitNil() { - o.RateLimit.Set(nil) + o.RateLimit = &v } -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *EndpointOut) UnsetRateLimit() { - o.RateLimit.Unset() -} - -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *EndpointOut) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *EndpointOut) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *EndpointOut) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *EndpointOut) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *EndpointOut) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *EndpointOut) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUpdatedAt returns the UpdatedAt field value @@ -434,7 +412,7 @@ func (o EndpointOut) MarshalJSON() ([]byte, error) { func (o EndpointOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } toSerialize["createdAt"] = o.CreatedAt @@ -442,16 +420,16 @@ func (o EndpointOut) ToMap() (map[string]interface{}, error) { if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } toSerialize["id"] = o.Id toSerialize["metadata"] = o.Metadata - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["updatedAt"] = o.UpdatedAt toSerialize["url"] = o.Url diff --git a/go/internal/openapi/model_endpoint_secret_rotate_in.go b/go/internal/openapi/model_endpoint_secret_rotate_in.go index 4b0b0af2f..4d1e8938a 100644 --- a/go/internal/openapi/model_endpoint_secret_rotate_in.go +++ b/go/internal/openapi/model_endpoint_secret_rotate_in.go @@ -20,7 +20,7 @@ var _ MappedNullable = &EndpointSecretRotateIn{} // EndpointSecretRotateIn struct for EndpointSecretRotateIn type EndpointSecretRotateIn struct { // The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24. - Key NullableString `json:"key,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` + Key *string `json:"key,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` } // NewEndpointSecretRotateIn instantiates a new EndpointSecretRotateIn object @@ -40,46 +40,36 @@ func NewEndpointSecretRotateInWithDefaults() *EndpointSecretRotateIn { return &this } -// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +// GetKey returns the Key field value if set, zero value otherwise. func (o *EndpointSecretRotateIn) GetKey() string { - if o == nil || IsNil(o.Key.Get()) { + if o == nil || IsNil(o.Key) { var ret string return ret } - return *o.Key.Get() + return *o.Key } // GetKeyOk returns a tuple with the Key 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 *EndpointSecretRotateIn) GetKeyOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Key) { return nil, false } - return o.Key.Get(), o.Key.IsSet() + return o.Key, true } // HasKey returns a boolean if a field has been set. func (o *EndpointSecretRotateIn) HasKey() bool { - if o != nil && o.Key.IsSet() { + if o != nil && !IsNil(o.Key) { return true } return false } -// SetKey gets a reference to the given NullableString and assigns it to the Key field. +// SetKey gets a reference to the given string and assigns it to the Key field. func (o *EndpointSecretRotateIn) SetKey(v string) { - o.Key.Set(&v) -} -// SetKeyNil sets the value for Key to be an explicit nil -func (o *EndpointSecretRotateIn) SetKeyNil() { - o.Key.Set(nil) -} - -// UnsetKey ensures that no value is present for Key, not even an explicit nil -func (o *EndpointSecretRotateIn) UnsetKey() { - o.Key.Unset() + o.Key = &v } func (o EndpointSecretRotateIn) MarshalJSON() ([]byte, error) { @@ -92,8 +82,8 @@ func (o EndpointSecretRotateIn) MarshalJSON() ([]byte, error) { func (o EndpointSecretRotateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Key.IsSet() { - toSerialize["key"] = o.Key.Get() + if !IsNil(o.Key) { + toSerialize["key"] = o.Key } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_transformation_in.go b/go/internal/openapi/model_endpoint_transformation_in.go index 1a584bc34..ac0292bc5 100644 --- a/go/internal/openapi/model_endpoint_transformation_in.go +++ b/go/internal/openapi/model_endpoint_transformation_in.go @@ -19,7 +19,7 @@ var _ MappedNullable = &EndpointTransformationIn{} // EndpointTransformationIn struct for EndpointTransformationIn type EndpointTransformationIn struct { - Code NullableString `json:"code,omitempty"` + Code *string `json:"code,omitempty"` Enabled *bool `json:"enabled,omitempty"` } @@ -40,46 +40,36 @@ func NewEndpointTransformationInWithDefaults() *EndpointTransformationIn { return &this } -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCode returns the Code field value if set, zero value otherwise. func (o *EndpointTransformationIn) GetCode() string { - if o == nil || IsNil(o.Code.Get()) { + if o == nil || IsNil(o.Code) { var ret string return ret } - return *o.Code.Get() + return *o.Code } // GetCodeOk returns a tuple with the Code 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 *EndpointTransformationIn) GetCodeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Code) { return nil, false } - return o.Code.Get(), o.Code.IsSet() + return o.Code, true } // HasCode returns a boolean if a field has been set. func (o *EndpointTransformationIn) HasCode() bool { - if o != nil && o.Code.IsSet() { + if o != nil && !IsNil(o.Code) { return true } return false } -// SetCode gets a reference to the given NullableString and assigns it to the Code field. +// SetCode gets a reference to the given string and assigns it to the Code field. func (o *EndpointTransformationIn) SetCode(v string) { - o.Code.Set(&v) -} -// SetCodeNil sets the value for Code to be an explicit nil -func (o *EndpointTransformationIn) SetCodeNil() { - o.Code.Set(nil) -} - -// UnsetCode ensures that no value is present for Code, not even an explicit nil -func (o *EndpointTransformationIn) UnsetCode() { - o.Code.Unset() + o.Code = &v } // GetEnabled returns the Enabled field value if set, zero value otherwise. @@ -124,8 +114,8 @@ func (o EndpointTransformationIn) MarshalJSON() ([]byte, error) { func (o EndpointTransformationIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Code.IsSet() { - toSerialize["code"] = o.Code.Get() + if !IsNil(o.Code) { + toSerialize["code"] = o.Code } if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled diff --git a/go/internal/openapi/model_endpoint_transformation_out.go b/go/internal/openapi/model_endpoint_transformation_out.go index 4b420ad25..50785af26 100644 --- a/go/internal/openapi/model_endpoint_transformation_out.go +++ b/go/internal/openapi/model_endpoint_transformation_out.go @@ -19,7 +19,7 @@ var _ MappedNullable = &EndpointTransformationOut{} // EndpointTransformationOut struct for EndpointTransformationOut type EndpointTransformationOut struct { - Code NullableString `json:"code,omitempty"` + Code *string `json:"code,omitempty"` Enabled *bool `json:"enabled,omitempty"` } @@ -44,46 +44,36 @@ func NewEndpointTransformationOutWithDefaults() *EndpointTransformationOut { return &this } -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCode returns the Code field value if set, zero value otherwise. func (o *EndpointTransformationOut) GetCode() string { - if o == nil || IsNil(o.Code.Get()) { + if o == nil || IsNil(o.Code) { var ret string return ret } - return *o.Code.Get() + return *o.Code } // GetCodeOk returns a tuple with the Code 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 *EndpointTransformationOut) GetCodeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Code) { return nil, false } - return o.Code.Get(), o.Code.IsSet() + return o.Code, true } // HasCode returns a boolean if a field has been set. func (o *EndpointTransformationOut) HasCode() bool { - if o != nil && o.Code.IsSet() { + if o != nil && !IsNil(o.Code) { return true } return false } -// SetCode gets a reference to the given NullableString and assigns it to the Code field. +// SetCode gets a reference to the given string and assigns it to the Code field. func (o *EndpointTransformationOut) SetCode(v string) { - o.Code.Set(&v) -} -// SetCodeNil sets the value for Code to be an explicit nil -func (o *EndpointTransformationOut) SetCodeNil() { - o.Code.Set(nil) -} - -// UnsetCode ensures that no value is present for Code, not even an explicit nil -func (o *EndpointTransformationOut) UnsetCode() { - o.Code.Unset() + o.Code = &v } // GetEnabled returns the Enabled field value if set, zero value otherwise. @@ -128,8 +118,8 @@ func (o EndpointTransformationOut) MarshalJSON() ([]byte, error) { func (o EndpointTransformationOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Code.IsSet() { - toSerialize["code"] = o.Code.Get() + if !IsNil(o.Code) { + toSerialize["code"] = o.Code } if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled diff --git a/go/internal/openapi/model_endpoint_transformation_simulate_in.go b/go/internal/openapi/model_endpoint_transformation_simulate_in.go index 722c31684..949dcf181 100644 --- a/go/internal/openapi/model_endpoint_transformation_simulate_in.go +++ b/go/internal/openapi/model_endpoint_transformation_simulate_in.go @@ -50,9 +50,9 @@ func NewEndpointTransformationSimulateInWithDefaults() *EndpointTransformationSi return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *EndpointTransformationSimulateIn) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -61,7 +61,6 @@ func (o *EndpointTransformationSimulateIn) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *EndpointTransformationSimulateIn) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -165,7 +164,7 @@ func (o EndpointTransformationSimulateIn) MarshalJSON() ([]byte, error) { func (o EndpointTransformationSimulateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } toSerialize["code"] = o.Code diff --git a/go/internal/openapi/model_endpoint_update.go b/go/internal/openapi/model_endpoint_update.go index daa0a594b..726bff501 100644 --- a/go/internal/openapi/model_endpoint_update.go +++ b/go/internal/openapi/model_endpoint_update.go @@ -27,12 +27,12 @@ type EndpointUpdate struct { Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` // Deprecated - Version NullableInt32 `json:"version,omitempty"` + Version *int32 `json:"version,omitempty"` } type _EndpointUpdate EndpointUpdate @@ -49,7 +49,7 @@ func NewEndpointUpdate(url string) *EndpointUpdate { this.Disabled = &disabled this.Url = url var version int32 = 1 - this.Version = *NewNullableInt32(&version) + this.Version = &version return &this } @@ -63,13 +63,13 @@ func NewEndpointUpdateWithDefaults() *EndpointUpdate { var disabled bool = false this.Disabled = &disabled var version int32 = 1 - this.Version = *NewNullableInt32(&version) + this.Version = &version return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *EndpointUpdate) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -78,7 +78,6 @@ func (o *EndpointUpdate) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *EndpointUpdate) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -164,9 +163,9 @@ func (o *EndpointUpdate) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *EndpointUpdate) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -175,7 +174,6 @@ func (o *EndpointUpdate) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *EndpointUpdate) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -229,88 +227,68 @@ func (o *EndpointUpdate) SetMetadata(v map[string]string) { o.Metadata = &v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *EndpointUpdate) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *EndpointUpdate) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *EndpointUpdate) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *EndpointUpdate) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *EndpointUpdate) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *EndpointUpdate) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *EndpointUpdate) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *EndpointUpdate) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *EndpointUpdate) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *EndpointUpdate) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *EndpointUpdate) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *EndpointUpdate) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUrl returns the Url field value @@ -337,49 +315,39 @@ func (o *EndpointUpdate) SetUrl(v string) { o.Url = v } -// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). +// GetVersion returns the Version field value if set, zero value otherwise. // Deprecated func (o *EndpointUpdate) GetVersion() int32 { - if o == nil || IsNil(o.Version.Get()) { + if o == nil || IsNil(o.Version) { var ret int32 return ret } - return *o.Version.Get() + return *o.Version } // GetVersionOk returns a tuple with the Version 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 // Deprecated func (o *EndpointUpdate) GetVersionOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.Version) { return nil, false } - return o.Version.Get(), o.Version.IsSet() + return o.Version, true } // HasVersion returns a boolean if a field has been set. func (o *EndpointUpdate) HasVersion() bool { - if o != nil && o.Version.IsSet() { + if o != nil && !IsNil(o.Version) { return true } return false } -// SetVersion gets a reference to the given NullableInt32 and assigns it to the Version field. +// SetVersion gets a reference to the given int32 and assigns it to the Version field. // Deprecated func (o *EndpointUpdate) SetVersion(v int32) { - o.Version.Set(&v) -} -// SetVersionNil sets the value for Version to be an explicit nil -func (o *EndpointUpdate) SetVersionNil() { - o.Version.Set(nil) -} - -// UnsetVersion ensures that no value is present for Version, not even an explicit nil -func (o *EndpointUpdate) UnsetVersion() { - o.Version.Unset() + o.Version = &v } func (o EndpointUpdate) MarshalJSON() ([]byte, error) { @@ -392,7 +360,7 @@ func (o EndpointUpdate) MarshalJSON() ([]byte, error) { func (o EndpointUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } if !IsNil(o.Description) { @@ -401,21 +369,21 @@ func (o EndpointUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } if !IsNil(o.Metadata) { toSerialize["metadata"] = o.Metadata } - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["url"] = o.Url - if o.Version.IsSet() { - toSerialize["version"] = o.Version.Get() + if !IsNil(o.Version) { + toSerialize["version"] = o.Version } return toSerialize, nil } diff --git a/go/internal/openapi/model_endpoint_updated_event_data.go b/go/internal/openapi/model_endpoint_updated_event_data.go index b52fb0269..28e2b4a40 100644 --- a/go/internal/openapi/model_endpoint_updated_event_data.go +++ b/go/internal/openapi/model_endpoint_updated_event_data.go @@ -24,11 +24,11 @@ type EndpointUpdatedEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` // The ep's UID - EndpointUid NullableString `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EndpointUid *string `json:"endpointUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` } type _EndpointUpdatedEventData EndpointUpdatedEventData @@ -76,46 +76,36 @@ func (o *EndpointUpdatedEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *EndpointUpdatedEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *EndpointUpdatedEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *EndpointUpdatedEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *EndpointUpdatedEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *EndpointUpdatedEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *EndpointUpdatedEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -142,46 +132,36 @@ func (o *EndpointUpdatedEventData) SetEndpointId(v string) { o.EndpointId = v } -// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise. func (o *EndpointUpdatedEventData) GetEndpointUid() string { - if o == nil || IsNil(o.EndpointUid.Get()) { + if o == nil || IsNil(o.EndpointUid) { var ret string return ret } - return *o.EndpointUid.Get() + return *o.EndpointUid } // GetEndpointUidOk returns a tuple with the EndpointUid 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 *EndpointUpdatedEventData) GetEndpointUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EndpointUid) { return nil, false } - return o.EndpointUid.Get(), o.EndpointUid.IsSet() + return o.EndpointUid, true } // HasEndpointUid returns a boolean if a field has been set. func (o *EndpointUpdatedEventData) HasEndpointUid() bool { - if o != nil && o.EndpointUid.IsSet() { + if o != nil && !IsNil(o.EndpointUid) { return true } return false } -// SetEndpointUid gets a reference to the given NullableString and assigns it to the EndpointUid field. +// SetEndpointUid gets a reference to the given string and assigns it to the EndpointUid field. func (o *EndpointUpdatedEventData) SetEndpointUid(v string) { - o.EndpointUid.Set(&v) -} -// SetEndpointUidNil sets the value for EndpointUid to be an explicit nil -func (o *EndpointUpdatedEventData) SetEndpointUidNil() { - o.EndpointUid.Set(nil) -} - -// UnsetEndpointUid ensures that no value is present for EndpointUid, not even an explicit nil -func (o *EndpointUpdatedEventData) UnsetEndpointUid() { - o.EndpointUid.Unset() + o.EndpointUid = &v } func (o EndpointUpdatedEventData) MarshalJSON() ([]byte, error) { @@ -195,12 +175,12 @@ func (o EndpointUpdatedEventData) MarshalJSON() ([]byte, error) { func (o EndpointUpdatedEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId - if o.EndpointUid.IsSet() { - toSerialize["endpointUid"] = o.EndpointUid.Get() + if !IsNil(o.EndpointUid) { + toSerialize["endpointUid"] = o.EndpointUid } return toSerialize, nil } diff --git a/go/internal/openapi/model_environment_in.go b/go/internal/openapi/model_environment_in.go index 8a916b095..f20a89920 100644 --- a/go/internal/openapi/model_environment_in.go +++ b/go/internal/openapi/model_environment_in.go @@ -46,9 +46,9 @@ func NewEnvironmentInWithDefaults() *EnvironmentIn { return &this } -// GetEventTypes returns the EventTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventTypes returns the EventTypes field value if set, zero value otherwise. func (o *EnvironmentIn) GetEventTypes() []EventTypeIn { - if o == nil { + if o == nil || IsNil(o.EventTypes) { var ret []EventTypeIn return ret } @@ -57,7 +57,6 @@ func (o *EnvironmentIn) GetEventTypes() []EventTypeIn { // GetEventTypesOk returns a tuple with the EventTypes 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 *EnvironmentIn) GetEventTypesOk() ([]EventTypeIn, bool) { if o == nil || IsNil(o.EventTypes) { return nil, false @@ -105,9 +104,9 @@ func (o *EnvironmentIn) SetSettings(v map[string]map[string]interface{}) { o.Settings = v } -// GetTransformationTemplates returns the TransformationTemplates field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTransformationTemplates returns the TransformationTemplates field value if set, zero value otherwise. func (o *EnvironmentIn) GetTransformationTemplates() []TemplateIn { - if o == nil { + if o == nil || IsNil(o.TransformationTemplates) { var ret []TemplateIn return ret } @@ -116,7 +115,6 @@ func (o *EnvironmentIn) GetTransformationTemplates() []TemplateIn { // GetTransformationTemplatesOk returns a tuple with the TransformationTemplates 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 *EnvironmentIn) GetTransformationTemplatesOk() ([]TemplateIn, bool) { if o == nil || IsNil(o.TransformationTemplates) { return nil, false @@ -148,13 +146,13 @@ func (o EnvironmentIn) MarshalJSON() ([]byte, error) { func (o EnvironmentIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.EventTypes != nil { + if !IsNil(o.EventTypes) { toSerialize["eventTypes"] = o.EventTypes } if o.Settings != nil { toSerialize["settings"] = o.Settings } - if o.TransformationTemplates != nil { + if !IsNil(o.TransformationTemplates) { toSerialize["transformationTemplates"] = o.TransformationTemplates } return toSerialize, nil diff --git a/go/internal/openapi/model_environment_settings_out.go b/go/internal/openapi/model_environment_settings_out.go index e3ab9fe22..60522f719 100644 --- a/go/internal/openapi/model_environment_settings_out.go +++ b/go/internal/openapi/model_environment_settings_out.go @@ -21,13 +21,13 @@ var _ MappedNullable = &EnvironmentSettingsOut{} type EnvironmentSettingsOut struct { ColorPaletteDark *CustomColorPalette `json:"colorPaletteDark,omitempty"` ColorPaletteLight *CustomColorPalette `json:"colorPaletteLight,omitempty"` - CustomColor NullableString `json:"customColor,omitempty"` - CustomFontFamily NullableString `json:"customFontFamily,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_ ]+$"` - CustomFontFamilyUrl NullableString `json:"customFontFamilyUrl,omitempty"` - CustomLogoUrl NullableString `json:"customLogoUrl,omitempty"` + CustomColor *string `json:"customColor,omitempty"` + CustomFontFamily *string `json:"customFontFamily,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_ ]+$"` + CustomFontFamilyUrl *string `json:"customFontFamilyUrl,omitempty"` + CustomLogoUrl *string `json:"customLogoUrl,omitempty"` CustomStringsOverride *CustomStringsOverride `json:"customStringsOverride,omitempty"` CustomThemeOverride *CustomThemeOverride `json:"customThemeOverride,omitempty"` - DisplayName NullableString `json:"displayName,omitempty"` + DisplayName *string `json:"displayName,omitempty"` EnableChannels *bool `json:"enableChannels,omitempty"` EnableIntegrationManagement *bool `json:"enableIntegrationManagement,omitempty"` EnableMessageTags *bool `json:"enableMessageTags,omitempty"` @@ -141,172 +141,132 @@ func (o *EnvironmentSettingsOut) SetColorPaletteLight(v CustomColorPalette) { o.ColorPaletteLight = &v } -// GetCustomColor returns the CustomColor field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCustomColor returns the CustomColor field value if set, zero value otherwise. func (o *EnvironmentSettingsOut) GetCustomColor() string { - if o == nil || IsNil(o.CustomColor.Get()) { + if o == nil || IsNil(o.CustomColor) { var ret string return ret } - return *o.CustomColor.Get() + return *o.CustomColor } // GetCustomColorOk returns a tuple with the CustomColor 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 *EnvironmentSettingsOut) GetCustomColorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.CustomColor) { return nil, false } - return o.CustomColor.Get(), o.CustomColor.IsSet() + return o.CustomColor, true } // HasCustomColor returns a boolean if a field has been set. func (o *EnvironmentSettingsOut) HasCustomColor() bool { - if o != nil && o.CustomColor.IsSet() { + if o != nil && !IsNil(o.CustomColor) { return true } return false } -// SetCustomColor gets a reference to the given NullableString and assigns it to the CustomColor field. +// SetCustomColor gets a reference to the given string and assigns it to the CustomColor field. func (o *EnvironmentSettingsOut) SetCustomColor(v string) { - o.CustomColor.Set(&v) -} -// SetCustomColorNil sets the value for CustomColor to be an explicit nil -func (o *EnvironmentSettingsOut) SetCustomColorNil() { - o.CustomColor.Set(nil) -} - -// UnsetCustomColor ensures that no value is present for CustomColor, not even an explicit nil -func (o *EnvironmentSettingsOut) UnsetCustomColor() { - o.CustomColor.Unset() + o.CustomColor = &v } -// GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise. func (o *EnvironmentSettingsOut) GetCustomFontFamily() string { - if o == nil || IsNil(o.CustomFontFamily.Get()) { + if o == nil || IsNil(o.CustomFontFamily) { var ret string return ret } - return *o.CustomFontFamily.Get() + return *o.CustomFontFamily } // GetCustomFontFamilyOk returns a tuple with the CustomFontFamily 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 *EnvironmentSettingsOut) GetCustomFontFamilyOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.CustomFontFamily) { return nil, false } - return o.CustomFontFamily.Get(), o.CustomFontFamily.IsSet() + return o.CustomFontFamily, true } // HasCustomFontFamily returns a boolean if a field has been set. func (o *EnvironmentSettingsOut) HasCustomFontFamily() bool { - if o != nil && o.CustomFontFamily.IsSet() { + if o != nil && !IsNil(o.CustomFontFamily) { return true } return false } -// SetCustomFontFamily gets a reference to the given NullableString and assigns it to the CustomFontFamily field. +// SetCustomFontFamily gets a reference to the given string and assigns it to the CustomFontFamily field. func (o *EnvironmentSettingsOut) SetCustomFontFamily(v string) { - o.CustomFontFamily.Set(&v) -} -// SetCustomFontFamilyNil sets the value for CustomFontFamily to be an explicit nil -func (o *EnvironmentSettingsOut) SetCustomFontFamilyNil() { - o.CustomFontFamily.Set(nil) + o.CustomFontFamily = &v } -// UnsetCustomFontFamily ensures that no value is present for CustomFontFamily, not even an explicit nil -func (o *EnvironmentSettingsOut) UnsetCustomFontFamily() { - o.CustomFontFamily.Unset() -} - -// GetCustomFontFamilyUrl returns the CustomFontFamilyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCustomFontFamilyUrl returns the CustomFontFamilyUrl field value if set, zero value otherwise. func (o *EnvironmentSettingsOut) GetCustomFontFamilyUrl() string { - if o == nil || IsNil(o.CustomFontFamilyUrl.Get()) { + if o == nil || IsNil(o.CustomFontFamilyUrl) { var ret string return ret } - return *o.CustomFontFamilyUrl.Get() + return *o.CustomFontFamilyUrl } // GetCustomFontFamilyUrlOk returns a tuple with the CustomFontFamilyUrl 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 *EnvironmentSettingsOut) GetCustomFontFamilyUrlOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.CustomFontFamilyUrl) { return nil, false } - return o.CustomFontFamilyUrl.Get(), o.CustomFontFamilyUrl.IsSet() + return o.CustomFontFamilyUrl, true } // HasCustomFontFamilyUrl returns a boolean if a field has been set. func (o *EnvironmentSettingsOut) HasCustomFontFamilyUrl() bool { - if o != nil && o.CustomFontFamilyUrl.IsSet() { + if o != nil && !IsNil(o.CustomFontFamilyUrl) { return true } return false } -// SetCustomFontFamilyUrl gets a reference to the given NullableString and assigns it to the CustomFontFamilyUrl field. +// SetCustomFontFamilyUrl gets a reference to the given string and assigns it to the CustomFontFamilyUrl field. func (o *EnvironmentSettingsOut) SetCustomFontFamilyUrl(v string) { - o.CustomFontFamilyUrl.Set(&v) -} -// SetCustomFontFamilyUrlNil sets the value for CustomFontFamilyUrl to be an explicit nil -func (o *EnvironmentSettingsOut) SetCustomFontFamilyUrlNil() { - o.CustomFontFamilyUrl.Set(nil) + o.CustomFontFamilyUrl = &v } -// UnsetCustomFontFamilyUrl ensures that no value is present for CustomFontFamilyUrl, not even an explicit nil -func (o *EnvironmentSettingsOut) UnsetCustomFontFamilyUrl() { - o.CustomFontFamilyUrl.Unset() -} - -// GetCustomLogoUrl returns the CustomLogoUrl field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCustomLogoUrl returns the CustomLogoUrl field value if set, zero value otherwise. func (o *EnvironmentSettingsOut) GetCustomLogoUrl() string { - if o == nil || IsNil(o.CustomLogoUrl.Get()) { + if o == nil || IsNil(o.CustomLogoUrl) { var ret string return ret } - return *o.CustomLogoUrl.Get() + return *o.CustomLogoUrl } // GetCustomLogoUrlOk returns a tuple with the CustomLogoUrl 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 *EnvironmentSettingsOut) GetCustomLogoUrlOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.CustomLogoUrl) { return nil, false } - return o.CustomLogoUrl.Get(), o.CustomLogoUrl.IsSet() + return o.CustomLogoUrl, true } // HasCustomLogoUrl returns a boolean if a field has been set. func (o *EnvironmentSettingsOut) HasCustomLogoUrl() bool { - if o != nil && o.CustomLogoUrl.IsSet() { + if o != nil && !IsNil(o.CustomLogoUrl) { return true } return false } -// SetCustomLogoUrl gets a reference to the given NullableString and assigns it to the CustomLogoUrl field. +// SetCustomLogoUrl gets a reference to the given string and assigns it to the CustomLogoUrl field. func (o *EnvironmentSettingsOut) SetCustomLogoUrl(v string) { - o.CustomLogoUrl.Set(&v) -} -// SetCustomLogoUrlNil sets the value for CustomLogoUrl to be an explicit nil -func (o *EnvironmentSettingsOut) SetCustomLogoUrlNil() { - o.CustomLogoUrl.Set(nil) -} - -// UnsetCustomLogoUrl ensures that no value is present for CustomLogoUrl, not even an explicit nil -func (o *EnvironmentSettingsOut) UnsetCustomLogoUrl() { - o.CustomLogoUrl.Unset() + o.CustomLogoUrl = &v } // GetCustomStringsOverride returns the CustomStringsOverride field value if set, zero value otherwise. @@ -373,46 +333,36 @@ func (o *EnvironmentSettingsOut) SetCustomThemeOverride(v CustomThemeOverride) { o.CustomThemeOverride = &v } -// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. func (o *EnvironmentSettingsOut) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName.Get()) { + if o == nil || IsNil(o.DisplayName) { var ret string return ret } - return *o.DisplayName.Get() + return *o.DisplayName } // GetDisplayNameOk returns a tuple with the DisplayName 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 *EnvironmentSettingsOut) GetDisplayNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.DisplayName) { return nil, false } - return o.DisplayName.Get(), o.DisplayName.IsSet() + return o.DisplayName, true } // HasDisplayName returns a boolean if a field has been set. func (o *EnvironmentSettingsOut) HasDisplayName() bool { - if o != nil && o.DisplayName.IsSet() { + if o != nil && !IsNil(o.DisplayName) { return true } return false } -// SetDisplayName gets a reference to the given NullableString and assigns it to the DisplayName field. +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. func (o *EnvironmentSettingsOut) SetDisplayName(v string) { - o.DisplayName.Set(&v) -} -// SetDisplayNameNil sets the value for DisplayName to be an explicit nil -func (o *EnvironmentSettingsOut) SetDisplayNameNil() { - o.DisplayName.Set(nil) -} - -// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil -func (o *EnvironmentSettingsOut) UnsetDisplayName() { - o.DisplayName.Unset() + o.DisplayName = &v } // GetEnableChannels returns the EnableChannels field value if set, zero value otherwise. @@ -623,17 +573,17 @@ func (o EnvironmentSettingsOut) ToMap() (map[string]interface{}, error) { if !IsNil(o.ColorPaletteLight) { toSerialize["colorPaletteLight"] = o.ColorPaletteLight } - if o.CustomColor.IsSet() { - toSerialize["customColor"] = o.CustomColor.Get() + if !IsNil(o.CustomColor) { + toSerialize["customColor"] = o.CustomColor } - if o.CustomFontFamily.IsSet() { - toSerialize["customFontFamily"] = o.CustomFontFamily.Get() + if !IsNil(o.CustomFontFamily) { + toSerialize["customFontFamily"] = o.CustomFontFamily } - if o.CustomFontFamilyUrl.IsSet() { - toSerialize["customFontFamilyUrl"] = o.CustomFontFamilyUrl.Get() + if !IsNil(o.CustomFontFamilyUrl) { + toSerialize["customFontFamilyUrl"] = o.CustomFontFamilyUrl } - if o.CustomLogoUrl.IsSet() { - toSerialize["customLogoUrl"] = o.CustomLogoUrl.Get() + if !IsNil(o.CustomLogoUrl) { + toSerialize["customLogoUrl"] = o.CustomLogoUrl } if !IsNil(o.CustomStringsOverride) { toSerialize["customStringsOverride"] = o.CustomStringsOverride @@ -641,8 +591,8 @@ func (o EnvironmentSettingsOut) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomThemeOverride) { toSerialize["customThemeOverride"] = o.CustomThemeOverride } - if o.DisplayName.IsSet() { - toSerialize["displayName"] = o.DisplayName.Get() + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName } if !IsNil(o.EnableChannels) { toSerialize["enableChannels"] = o.EnableChannels diff --git a/go/internal/openapi/model_event_in.go b/go/internal/openapi/model_event_in.go index bab91a18f..d00740391 100644 --- a/go/internal/openapi/model_event_in.go +++ b/go/internal/openapi/model_event_in.go @@ -22,7 +22,7 @@ var _ MappedNullable = &EventIn{} // EventIn struct for EventIn type EventIn struct { // The event type's name - EventType NullableString `json:"eventType,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EventType *string `json:"eventType,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Payload string `json:"payload"` } @@ -46,46 +46,36 @@ func NewEventInWithDefaults() *EventIn { return &this } -// GetEventType returns the EventType field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventType returns the EventType field value if set, zero value otherwise. func (o *EventIn) GetEventType() string { - if o == nil || IsNil(o.EventType.Get()) { + if o == nil || IsNil(o.EventType) { var ret string return ret } - return *o.EventType.Get() + return *o.EventType } // GetEventTypeOk returns a tuple with the EventType 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 *EventIn) GetEventTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EventType) { return nil, false } - return o.EventType.Get(), o.EventType.IsSet() + return o.EventType, true } // HasEventType returns a boolean if a field has been set. func (o *EventIn) HasEventType() bool { - if o != nil && o.EventType.IsSet() { + if o != nil && !IsNil(o.EventType) { return true } return false } -// SetEventType gets a reference to the given NullableString and assigns it to the EventType field. +// SetEventType gets a reference to the given string and assigns it to the EventType field. func (o *EventIn) SetEventType(v string) { - o.EventType.Set(&v) -} -// SetEventTypeNil sets the value for EventType to be an explicit nil -func (o *EventIn) SetEventTypeNil() { - o.EventType.Set(nil) -} - -// UnsetEventType ensures that no value is present for EventType, not even an explicit nil -func (o *EventIn) UnsetEventType() { - o.EventType.Unset() + o.EventType = &v } // GetPayload returns the Payload field value @@ -122,8 +112,8 @@ func (o EventIn) MarshalJSON() ([]byte, error) { func (o EventIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.EventType.IsSet() { - toSerialize["eventType"] = o.EventType.Get() + if !IsNil(o.EventType) { + toSerialize["eventType"] = o.EventType } toSerialize["payload"] = o.Payload return toSerialize, nil diff --git a/go/internal/openapi/model_event_out.go b/go/internal/openapi/model_event_out.go index da165c8e2..614664d98 100644 --- a/go/internal/openapi/model_event_out.go +++ b/go/internal/openapi/model_event_out.go @@ -23,7 +23,7 @@ var _ MappedNullable = &EventOut{} // EventOut struct for EventOut type EventOut struct { // The event type's name - EventType NullableString `json:"eventType,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EventType *string `json:"eventType,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Payload string `json:"payload"` Timestamp time.Time `json:"timestamp"` } @@ -49,46 +49,36 @@ func NewEventOutWithDefaults() *EventOut { return &this } -// GetEventType returns the EventType field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventType returns the EventType field value if set, zero value otherwise. func (o *EventOut) GetEventType() string { - if o == nil || IsNil(o.EventType.Get()) { + if o == nil || IsNil(o.EventType) { var ret string return ret } - return *o.EventType.Get() + return *o.EventType } // GetEventTypeOk returns a tuple with the EventType 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 *EventOut) GetEventTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EventType) { return nil, false } - return o.EventType.Get(), o.EventType.IsSet() + return o.EventType, true } // HasEventType returns a boolean if a field has been set. func (o *EventOut) HasEventType() bool { - if o != nil && o.EventType.IsSet() { + if o != nil && !IsNil(o.EventType) { return true } return false } -// SetEventType gets a reference to the given NullableString and assigns it to the EventType field. +// SetEventType gets a reference to the given string and assigns it to the EventType field. func (o *EventOut) SetEventType(v string) { - o.EventType.Set(&v) -} -// SetEventTypeNil sets the value for EventType to be an explicit nil -func (o *EventOut) SetEventTypeNil() { - o.EventType.Set(nil) -} - -// UnsetEventType ensures that no value is present for EventType, not even an explicit nil -func (o *EventOut) UnsetEventType() { - o.EventType.Unset() + o.EventType = &v } // GetPayload returns the Payload field value @@ -149,8 +139,8 @@ func (o EventOut) MarshalJSON() ([]byte, error) { func (o EventOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.EventType.IsSet() { - toSerialize["eventType"] = o.EventType.Get() + if !IsNil(o.EventType) { + toSerialize["eventType"] = o.EventType } toSerialize["payload"] = o.Payload toSerialize["timestamp"] = o.Timestamp diff --git a/go/internal/openapi/model_event_type_from_open_api.go b/go/internal/openapi/model_event_type_from_open_api.go index af10fd88c..bccb44116 100644 --- a/go/internal/openapi/model_event_type_from_open_api.go +++ b/go/internal/openapi/model_event_type_from_open_api.go @@ -23,9 +23,9 @@ var _ MappedNullable = &EventTypeFromOpenApi{} type EventTypeFromOpenApi struct { Deprecated bool `json:"deprecated"` Description string `json:"description"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type group's name - GroupName NullableString `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + GroupName *string `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name Name string `json:"name" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Schemas map[string]map[string]interface{} `json:"schemas,omitempty"` @@ -101,88 +101,68 @@ func (o *EventTypeFromOpenApi) SetDescription(v string) { o.Description = v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *EventTypeFromOpenApi) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *EventTypeFromOpenApi) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *EventTypeFromOpenApi) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *EventTypeFromOpenApi) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *EventTypeFromOpenApi) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *EventTypeFromOpenApi) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetGroupName returns the GroupName field value if set, zero value otherwise (both if not set or set to explicit null). +// GetGroupName returns the GroupName field value if set, zero value otherwise. func (o *EventTypeFromOpenApi) GetGroupName() string { - if o == nil || IsNil(o.GroupName.Get()) { + if o == nil || IsNil(o.GroupName) { var ret string return ret } - return *o.GroupName.Get() + return *o.GroupName } // GetGroupNameOk returns a tuple with the GroupName 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 *EventTypeFromOpenApi) GetGroupNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.GroupName) { return nil, false } - return o.GroupName.Get(), o.GroupName.IsSet() + return o.GroupName, true } // HasGroupName returns a boolean if a field has been set. func (o *EventTypeFromOpenApi) HasGroupName() bool { - if o != nil && o.GroupName.IsSet() { + if o != nil && !IsNil(o.GroupName) { return true } return false } -// SetGroupName gets a reference to the given NullableString and assigns it to the GroupName field. +// SetGroupName gets a reference to the given string and assigns it to the GroupName field. func (o *EventTypeFromOpenApi) SetGroupName(v string) { - o.GroupName.Set(&v) -} -// SetGroupNameNil sets the value for GroupName to be an explicit nil -func (o *EventTypeFromOpenApi) SetGroupNameNil() { - o.GroupName.Set(nil) -} - -// UnsetGroupName ensures that no value is present for GroupName, not even an explicit nil -func (o *EventTypeFromOpenApi) UnsetGroupName() { - o.GroupName.Unset() + o.GroupName = &v } // GetName returns the Name field value @@ -209,9 +189,9 @@ func (o *EventTypeFromOpenApi) SetName(v string) { o.Name = v } -// GetSchemas returns the Schemas field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSchemas returns the Schemas field value if set, zero value otherwise. func (o *EventTypeFromOpenApi) GetSchemas() map[string]map[string]interface{} { - if o == nil { + if o == nil || IsNil(o.Schemas) { var ret map[string]map[string]interface{} return ret } @@ -220,7 +200,6 @@ func (o *EventTypeFromOpenApi) GetSchemas() map[string]map[string]interface{} { // GetSchemasOk returns a tuple with the Schemas 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 *EventTypeFromOpenApi) GetSchemasOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Schemas) { return map[string]map[string]interface{}{}, false @@ -254,14 +233,14 @@ func (o EventTypeFromOpenApi) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["deprecated"] = o.Deprecated toSerialize["description"] = o.Description - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.GroupName.IsSet() { - toSerialize["groupName"] = o.GroupName.Get() + if !IsNil(o.GroupName) { + toSerialize["groupName"] = o.GroupName } toSerialize["name"] = o.Name - if o.Schemas != nil { + if !IsNil(o.Schemas) { toSerialize["schemas"] = o.Schemas } return toSerialize, nil diff --git a/go/internal/openapi/model_event_type_import_open_api_in.go b/go/internal/openapi/model_event_type_import_open_api_in.go index 6141a39cb..046536caf 100644 --- a/go/internal/openapi/model_event_type_import_open_api_in.go +++ b/go/internal/openapi/model_event_type_import_open_api_in.go @@ -24,7 +24,7 @@ type EventTypeImportOpenApiIn struct { // A pre-parsed JSON spec. Spec map[string]map[string]interface{} `json:"spec,omitempty"` // A string, parsed by the server as YAML or JSON. - SpecRaw NullableString `json:"specRaw,omitempty"` + SpecRaw *string `json:"specRaw,omitempty"` } // NewEventTypeImportOpenApiIn instantiates a new EventTypeImportOpenApiIn object @@ -80,9 +80,9 @@ func (o *EventTypeImportOpenApiIn) SetDryRun(v bool) { o.DryRun = &v } -// GetSpec returns the Spec field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSpec returns the Spec field value if set, zero value otherwise. func (o *EventTypeImportOpenApiIn) GetSpec() map[string]map[string]interface{} { - if o == nil { + if o == nil || IsNil(o.Spec) { var ret map[string]map[string]interface{} return ret } @@ -91,7 +91,6 @@ func (o *EventTypeImportOpenApiIn) GetSpec() map[string]map[string]interface{} { // GetSpecOk returns a tuple with the Spec 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 *EventTypeImportOpenApiIn) GetSpecOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Spec) { return map[string]map[string]interface{}{}, false @@ -113,46 +112,36 @@ func (o *EventTypeImportOpenApiIn) SetSpec(v map[string]map[string]interface{}) o.Spec = v } -// GetSpecRaw returns the SpecRaw field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSpecRaw returns the SpecRaw field value if set, zero value otherwise. func (o *EventTypeImportOpenApiIn) GetSpecRaw() string { - if o == nil || IsNil(o.SpecRaw.Get()) { + if o == nil || IsNil(o.SpecRaw) { var ret string return ret } - return *o.SpecRaw.Get() + return *o.SpecRaw } // GetSpecRawOk returns a tuple with the SpecRaw 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 *EventTypeImportOpenApiIn) GetSpecRawOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.SpecRaw) { return nil, false } - return o.SpecRaw.Get(), o.SpecRaw.IsSet() + return o.SpecRaw, true } // HasSpecRaw returns a boolean if a field has been set. func (o *EventTypeImportOpenApiIn) HasSpecRaw() bool { - if o != nil && o.SpecRaw.IsSet() { + if o != nil && !IsNil(o.SpecRaw) { return true } return false } -// SetSpecRaw gets a reference to the given NullableString and assigns it to the SpecRaw field. +// SetSpecRaw gets a reference to the given string and assigns it to the SpecRaw field. func (o *EventTypeImportOpenApiIn) SetSpecRaw(v string) { - o.SpecRaw.Set(&v) -} -// SetSpecRawNil sets the value for SpecRaw to be an explicit nil -func (o *EventTypeImportOpenApiIn) SetSpecRawNil() { - o.SpecRaw.Set(nil) -} - -// UnsetSpecRaw ensures that no value is present for SpecRaw, not even an explicit nil -func (o *EventTypeImportOpenApiIn) UnsetSpecRaw() { - o.SpecRaw.Unset() + o.SpecRaw = &v } func (o EventTypeImportOpenApiIn) MarshalJSON() ([]byte, error) { @@ -168,11 +157,11 @@ func (o EventTypeImportOpenApiIn) ToMap() (map[string]interface{}, error) { if !IsNil(o.DryRun) { toSerialize["dry_run"] = o.DryRun } - if o.Spec != nil { + if !IsNil(o.Spec) { toSerialize["spec"] = o.Spec } - if o.SpecRaw.IsSet() { - toSerialize["specRaw"] = o.SpecRaw.Get() + if !IsNil(o.SpecRaw) { + toSerialize["specRaw"] = o.SpecRaw } return toSerialize, nil } diff --git a/go/internal/openapi/model_event_type_import_open_api_out_data.go b/go/internal/openapi/model_event_type_import_open_api_out_data.go index d3a56fb80..696e67f3c 100644 --- a/go/internal/openapi/model_event_type_import_open_api_out_data.go +++ b/go/internal/openapi/model_event_type_import_open_api_out_data.go @@ -69,9 +69,9 @@ func (o *EventTypeImportOpenApiOutData) SetModified(v []string) { o.Modified = v } -// GetToModify returns the ToModify field value if set, zero value otherwise (both if not set or set to explicit null). +// GetToModify returns the ToModify field value if set, zero value otherwise. func (o *EventTypeImportOpenApiOutData) GetToModify() []EventTypeFromOpenApi { - if o == nil { + if o == nil || IsNil(o.ToModify) { var ret []EventTypeFromOpenApi return ret } @@ -80,7 +80,6 @@ func (o *EventTypeImportOpenApiOutData) GetToModify() []EventTypeFromOpenApi { // GetToModifyOk returns a tuple with the ToModify 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 *EventTypeImportOpenApiOutData) GetToModifyOk() ([]EventTypeFromOpenApi, bool) { if o == nil || IsNil(o.ToModify) { return nil, false @@ -113,7 +112,7 @@ func (o EventTypeImportOpenApiOutData) MarshalJSON() ([]byte, error) { func (o EventTypeImportOpenApiOutData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["modified"] = o.Modified - if o.ToModify != nil { + if !IsNil(o.ToModify) { toSerialize["to_modify"] = o.ToModify } return toSerialize, nil diff --git a/go/internal/openapi/model_event_type_in.go b/go/internal/openapi/model_event_type_in.go index c426625a3..50edd7927 100644 --- a/go/internal/openapi/model_event_type_in.go +++ b/go/internal/openapi/model_event_type_in.go @@ -24,9 +24,9 @@ type EventTypeIn struct { Archived *bool `json:"archived,omitempty"` Deprecated *bool `json:"deprecated,omitempty"` Description string `json:"description"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type group's name - GroupName NullableString `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + GroupName *string `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name Name string `json:"name" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The schema for the event type for a specific version as a JSON schema. @@ -150,88 +150,68 @@ func (o *EventTypeIn) SetDescription(v string) { o.Description = v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *EventTypeIn) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *EventTypeIn) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *EventTypeIn) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *EventTypeIn) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *EventTypeIn) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *EventTypeIn) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetGroupName returns the GroupName field value if set, zero value otherwise (both if not set or set to explicit null). +// GetGroupName returns the GroupName field value if set, zero value otherwise. func (o *EventTypeIn) GetGroupName() string { - if o == nil || IsNil(o.GroupName.Get()) { + if o == nil || IsNil(o.GroupName) { var ret string return ret } - return *o.GroupName.Get() + return *o.GroupName } // GetGroupNameOk returns a tuple with the GroupName 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 *EventTypeIn) GetGroupNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.GroupName) { return nil, false } - return o.GroupName.Get(), o.GroupName.IsSet() + return o.GroupName, true } // HasGroupName returns a boolean if a field has been set. func (o *EventTypeIn) HasGroupName() bool { - if o != nil && o.GroupName.IsSet() { + if o != nil && !IsNil(o.GroupName) { return true } return false } -// SetGroupName gets a reference to the given NullableString and assigns it to the GroupName field. +// SetGroupName gets a reference to the given string and assigns it to the GroupName field. func (o *EventTypeIn) SetGroupName(v string) { - o.GroupName.Set(&v) -} -// SetGroupNameNil sets the value for GroupName to be an explicit nil -func (o *EventTypeIn) SetGroupNameNil() { - o.GroupName.Set(nil) -} - -// UnsetGroupName ensures that no value is present for GroupName, not even an explicit nil -func (o *EventTypeIn) UnsetGroupName() { - o.GroupName.Unset() + o.GroupName = &v } // GetName returns the Name field value @@ -258,9 +238,9 @@ func (o *EventTypeIn) SetName(v string) { o.Name = v } -// GetSchemas returns the Schemas field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSchemas returns the Schemas field value if set, zero value otherwise. func (o *EventTypeIn) GetSchemas() map[string]map[string]interface{} { - if o == nil { + if o == nil || IsNil(o.Schemas) { var ret map[string]map[string]interface{} return ret } @@ -269,7 +249,6 @@ func (o *EventTypeIn) GetSchemas() map[string]map[string]interface{} { // GetSchemasOk returns a tuple with the Schemas 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 *EventTypeIn) GetSchemasOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Schemas) { return map[string]map[string]interface{}{}, false @@ -308,14 +287,14 @@ func (o EventTypeIn) ToMap() (map[string]interface{}, error) { toSerialize["deprecated"] = o.Deprecated } toSerialize["description"] = o.Description - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.GroupName.IsSet() { - toSerialize["groupName"] = o.GroupName.Get() + if !IsNil(o.GroupName) { + toSerialize["groupName"] = o.GroupName } toSerialize["name"] = o.Name - if o.Schemas != nil { + if !IsNil(o.Schemas) { toSerialize["schemas"] = o.Schemas } return toSerialize, nil diff --git a/go/internal/openapi/model_event_type_out.go b/go/internal/openapi/model_event_type_out.go index 3cbbd0277..0ede7cbc0 100644 --- a/go/internal/openapi/model_event_type_out.go +++ b/go/internal/openapi/model_event_type_out.go @@ -26,9 +26,9 @@ type EventTypeOut struct { CreatedAt time.Time `json:"createdAt"` Deprecated bool `json:"deprecated"` Description string `json:"description"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type group's name - GroupName NullableString `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + GroupName *string `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name Name string `json:"name" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The schema for the event type for a specific version as a JSON schema. @@ -168,88 +168,68 @@ func (o *EventTypeOut) SetDescription(v string) { o.Description = v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *EventTypeOut) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *EventTypeOut) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *EventTypeOut) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *EventTypeOut) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *EventTypeOut) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *EventTypeOut) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetGroupName returns the GroupName field value if set, zero value otherwise (both if not set or set to explicit null). +// GetGroupName returns the GroupName field value if set, zero value otherwise. func (o *EventTypeOut) GetGroupName() string { - if o == nil || IsNil(o.GroupName.Get()) { + if o == nil || IsNil(o.GroupName) { var ret string return ret } - return *o.GroupName.Get() + return *o.GroupName } // GetGroupNameOk returns a tuple with the GroupName 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 *EventTypeOut) GetGroupNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.GroupName) { return nil, false } - return o.GroupName.Get(), o.GroupName.IsSet() + return o.GroupName, true } // HasGroupName returns a boolean if a field has been set. func (o *EventTypeOut) HasGroupName() bool { - if o != nil && o.GroupName.IsSet() { + if o != nil && !IsNil(o.GroupName) { return true } return false } -// SetGroupName gets a reference to the given NullableString and assigns it to the GroupName field. +// SetGroupName gets a reference to the given string and assigns it to the GroupName field. func (o *EventTypeOut) SetGroupName(v string) { - o.GroupName.Set(&v) -} -// SetGroupNameNil sets the value for GroupName to be an explicit nil -func (o *EventTypeOut) SetGroupNameNil() { - o.GroupName.Set(nil) -} - -// UnsetGroupName ensures that no value is present for GroupName, not even an explicit nil -func (o *EventTypeOut) UnsetGroupName() { - o.GroupName.Unset() + o.GroupName = &v } // GetName returns the Name field value @@ -276,9 +256,9 @@ func (o *EventTypeOut) SetName(v string) { o.Name = v } -// GetSchemas returns the Schemas field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSchemas returns the Schemas field value if set, zero value otherwise. func (o *EventTypeOut) GetSchemas() map[string]map[string]interface{} { - if o == nil { + if o == nil || IsNil(o.Schemas) { var ret map[string]map[string]interface{} return ret } @@ -287,7 +267,6 @@ func (o *EventTypeOut) GetSchemas() map[string]map[string]interface{} { // GetSchemasOk returns a tuple with the Schemas 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 *EventTypeOut) GetSchemasOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Schemas) { return map[string]map[string]interface{}{}, false @@ -349,14 +328,14 @@ func (o EventTypeOut) ToMap() (map[string]interface{}, error) { toSerialize["createdAt"] = o.CreatedAt toSerialize["deprecated"] = o.Deprecated toSerialize["description"] = o.Description - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.GroupName.IsSet() { - toSerialize["groupName"] = o.GroupName.Get() + if !IsNil(o.GroupName) { + toSerialize["groupName"] = o.GroupName } toSerialize["name"] = o.Name - if o.Schemas != nil { + if !IsNil(o.Schemas) { toSerialize["schemas"] = o.Schemas } toSerialize["updatedAt"] = o.UpdatedAt diff --git a/go/internal/openapi/model_event_type_update.go b/go/internal/openapi/model_event_type_update.go index 8c505e54b..cc74aee29 100644 --- a/go/internal/openapi/model_event_type_update.go +++ b/go/internal/openapi/model_event_type_update.go @@ -24,9 +24,9 @@ type EventTypeUpdate struct { Archived *bool `json:"archived,omitempty"` Deprecated *bool `json:"deprecated,omitempty"` Description string `json:"description"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type group's name - GroupName NullableString `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + GroupName *string `json:"groupName,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The schema for the event type for a specific version as a JSON schema. Schemas map[string]map[string]interface{} `json:"schemas,omitempty"` } @@ -147,93 +147,73 @@ func (o *EventTypeUpdate) SetDescription(v string) { o.Description = v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *EventTypeUpdate) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *EventTypeUpdate) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *EventTypeUpdate) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *EventTypeUpdate) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *EventTypeUpdate) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *EventTypeUpdate) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetGroupName returns the GroupName field value if set, zero value otherwise (both if not set or set to explicit null). +// GetGroupName returns the GroupName field value if set, zero value otherwise. func (o *EventTypeUpdate) GetGroupName() string { - if o == nil || IsNil(o.GroupName.Get()) { + if o == nil || IsNil(o.GroupName) { var ret string return ret } - return *o.GroupName.Get() + return *o.GroupName } // GetGroupNameOk returns a tuple with the GroupName 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 *EventTypeUpdate) GetGroupNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.GroupName) { return nil, false } - return o.GroupName.Get(), o.GroupName.IsSet() + return o.GroupName, true } // HasGroupName returns a boolean if a field has been set. func (o *EventTypeUpdate) HasGroupName() bool { - if o != nil && o.GroupName.IsSet() { + if o != nil && !IsNil(o.GroupName) { return true } return false } -// SetGroupName gets a reference to the given NullableString and assigns it to the GroupName field. +// SetGroupName gets a reference to the given string and assigns it to the GroupName field. func (o *EventTypeUpdate) SetGroupName(v string) { - o.GroupName.Set(&v) -} -// SetGroupNameNil sets the value for GroupName to be an explicit nil -func (o *EventTypeUpdate) SetGroupNameNil() { - o.GroupName.Set(nil) -} - -// UnsetGroupName ensures that no value is present for GroupName, not even an explicit nil -func (o *EventTypeUpdate) UnsetGroupName() { - o.GroupName.Unset() + o.GroupName = &v } -// GetSchemas returns the Schemas field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSchemas returns the Schemas field value if set, zero value otherwise. func (o *EventTypeUpdate) GetSchemas() map[string]map[string]interface{} { - if o == nil { + if o == nil || IsNil(o.Schemas) { var ret map[string]map[string]interface{} return ret } @@ -242,7 +222,6 @@ func (o *EventTypeUpdate) GetSchemas() map[string]map[string]interface{} { // GetSchemasOk returns a tuple with the Schemas 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 *EventTypeUpdate) GetSchemasOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Schemas) { return map[string]map[string]interface{}{}, false @@ -281,13 +260,13 @@ func (o EventTypeUpdate) ToMap() (map[string]interface{}, error) { toSerialize["deprecated"] = o.Deprecated } toSerialize["description"] = o.Description - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.GroupName.IsSet() { - toSerialize["groupName"] = o.GroupName.Get() + if !IsNil(o.GroupName) { + toSerialize["groupName"] = o.GroupName } - if o.Schemas != nil { + if !IsNil(o.Schemas) { toSerialize["schemas"] = o.Schemas } return toSerialize, nil diff --git a/go/internal/openapi/model_font_size_config.go b/go/internal/openapi/model_font_size_config.go index 7adff4080..064c084de 100644 --- a/go/internal/openapi/model_font_size_config.go +++ b/go/internal/openapi/model_font_size_config.go @@ -19,7 +19,7 @@ var _ MappedNullable = &FontSizeConfig{} // FontSizeConfig struct for FontSizeConfig type FontSizeConfig struct { - Base NullableInt32 `json:"base,omitempty"` + Base *int32 `json:"base,omitempty"` } // NewFontSizeConfig instantiates a new FontSizeConfig object @@ -39,46 +39,36 @@ func NewFontSizeConfigWithDefaults() *FontSizeConfig { return &this } -// GetBase returns the Base field value if set, zero value otherwise (both if not set or set to explicit null). +// GetBase returns the Base field value if set, zero value otherwise. func (o *FontSizeConfig) GetBase() int32 { - if o == nil || IsNil(o.Base.Get()) { + if o == nil || IsNil(o.Base) { var ret int32 return ret } - return *o.Base.Get() + return *o.Base } // GetBaseOk returns a tuple with the Base 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 *FontSizeConfig) GetBaseOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.Base) { return nil, false } - return o.Base.Get(), o.Base.IsSet() + return o.Base, true } // HasBase returns a boolean if a field has been set. func (o *FontSizeConfig) HasBase() bool { - if o != nil && o.Base.IsSet() { + if o != nil && !IsNil(o.Base) { return true } return false } -// SetBase gets a reference to the given NullableInt32 and assigns it to the Base field. +// SetBase gets a reference to the given int32 and assigns it to the Base field. func (o *FontSizeConfig) SetBase(v int32) { - o.Base.Set(&v) -} -// SetBaseNil sets the value for Base to be an explicit nil -func (o *FontSizeConfig) SetBaseNil() { - o.Base.Set(nil) -} - -// UnsetBase ensures that no value is present for Base, not even an explicit nil -func (o *FontSizeConfig) UnsetBase() { - o.Base.Unset() + o.Base = &v } func (o FontSizeConfig) MarshalJSON() ([]byte, error) { @@ -91,8 +81,8 @@ func (o FontSizeConfig) MarshalJSON() ([]byte, error) { func (o FontSizeConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Base.IsSet() { - toSerialize["base"] = o.Base.Get() + if !IsNil(o.Base) { + toSerialize["base"] = o.Base } return toSerialize, nil } diff --git a/go/internal/openapi/model_incoming_webhook_payload_out.go b/go/internal/openapi/model_incoming_webhook_payload_out.go index f585d224c..ff3cd3cba 100644 --- a/go/internal/openapi/model_incoming_webhook_payload_out.go +++ b/go/internal/openapi/model_incoming_webhook_payload_out.go @@ -19,9 +19,9 @@ var _ MappedNullable = &IncomingWebhookPayloadOut{} // IncomingWebhookPayloadOut struct for IncomingWebhookPayloadOut type IncomingWebhookPayloadOut struct { - Channel NullableString `json:"channel,omitempty"` - Error NullableString `json:"error,omitempty"` - IncomingWebhookUrl NullableString `json:"incomingWebhookUrl,omitempty"` + Channel *string `json:"channel,omitempty"` + Error *string `json:"error,omitempty"` + IncomingWebhookUrl *string `json:"incomingWebhookUrl,omitempty"` } // NewIncomingWebhookPayloadOut instantiates a new IncomingWebhookPayloadOut object @@ -41,130 +41,100 @@ func NewIncomingWebhookPayloadOutWithDefaults() *IncomingWebhookPayloadOut { return &this } -// GetChannel returns the Channel field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannel returns the Channel field value if set, zero value otherwise. func (o *IncomingWebhookPayloadOut) GetChannel() string { - if o == nil || IsNil(o.Channel.Get()) { + if o == nil || IsNil(o.Channel) { var ret string return ret } - return *o.Channel.Get() + return *o.Channel } // GetChannelOk returns a tuple with the Channel 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 *IncomingWebhookPayloadOut) GetChannelOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Channel) { return nil, false } - return o.Channel.Get(), o.Channel.IsSet() + return o.Channel, true } // HasChannel returns a boolean if a field has been set. func (o *IncomingWebhookPayloadOut) HasChannel() bool { - if o != nil && o.Channel.IsSet() { + if o != nil && !IsNil(o.Channel) { return true } return false } -// SetChannel gets a reference to the given NullableString and assigns it to the Channel field. +// SetChannel gets a reference to the given string and assigns it to the Channel field. func (o *IncomingWebhookPayloadOut) SetChannel(v string) { - o.Channel.Set(&v) -} -// SetChannelNil sets the value for Channel to be an explicit nil -func (o *IncomingWebhookPayloadOut) SetChannelNil() { - o.Channel.Set(nil) -} - -// UnsetChannel ensures that no value is present for Channel, not even an explicit nil -func (o *IncomingWebhookPayloadOut) UnsetChannel() { - o.Channel.Unset() + o.Channel = &v } -// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +// GetError returns the Error field value if set, zero value otherwise. func (o *IncomingWebhookPayloadOut) GetError() string { - if o == nil || IsNil(o.Error.Get()) { + if o == nil || IsNil(o.Error) { var ret string return ret } - return *o.Error.Get() + 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. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IncomingWebhookPayloadOut) GetErrorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Error) { return nil, false } - return o.Error.Get(), o.Error.IsSet() + return o.Error, true } // HasError returns a boolean if a field has been set. func (o *IncomingWebhookPayloadOut) HasError() bool { - if o != nil && o.Error.IsSet() { + if o != nil && !IsNil(o.Error) { return true } return false } -// SetError gets a reference to the given NullableString and assigns it to the Error field. +// SetError gets a reference to the given string and assigns it to the Error field. func (o *IncomingWebhookPayloadOut) SetError(v string) { - o.Error.Set(&v) -} -// SetErrorNil sets the value for Error to be an explicit nil -func (o *IncomingWebhookPayloadOut) SetErrorNil() { - o.Error.Set(nil) + o.Error = &v } -// UnsetError ensures that no value is present for Error, not even an explicit nil -func (o *IncomingWebhookPayloadOut) UnsetError() { - o.Error.Unset() -} - -// GetIncomingWebhookUrl returns the IncomingWebhookUrl field value if set, zero value otherwise (both if not set or set to explicit null). +// GetIncomingWebhookUrl returns the IncomingWebhookUrl field value if set, zero value otherwise. func (o *IncomingWebhookPayloadOut) GetIncomingWebhookUrl() string { - if o == nil || IsNil(o.IncomingWebhookUrl.Get()) { + if o == nil || IsNil(o.IncomingWebhookUrl) { var ret string return ret } - return *o.IncomingWebhookUrl.Get() + return *o.IncomingWebhookUrl } // GetIncomingWebhookUrlOk returns a tuple with the IncomingWebhookUrl 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 *IncomingWebhookPayloadOut) GetIncomingWebhookUrlOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.IncomingWebhookUrl) { return nil, false } - return o.IncomingWebhookUrl.Get(), o.IncomingWebhookUrl.IsSet() + return o.IncomingWebhookUrl, true } // HasIncomingWebhookUrl returns a boolean if a field has been set. func (o *IncomingWebhookPayloadOut) HasIncomingWebhookUrl() bool { - if o != nil && o.IncomingWebhookUrl.IsSet() { + if o != nil && !IsNil(o.IncomingWebhookUrl) { return true } return false } -// SetIncomingWebhookUrl gets a reference to the given NullableString and assigns it to the IncomingWebhookUrl field. +// SetIncomingWebhookUrl gets a reference to the given string and assigns it to the IncomingWebhookUrl field. func (o *IncomingWebhookPayloadOut) SetIncomingWebhookUrl(v string) { - o.IncomingWebhookUrl.Set(&v) -} -// SetIncomingWebhookUrlNil sets the value for IncomingWebhookUrl to be an explicit nil -func (o *IncomingWebhookPayloadOut) SetIncomingWebhookUrlNil() { - o.IncomingWebhookUrl.Set(nil) -} - -// UnsetIncomingWebhookUrl ensures that no value is present for IncomingWebhookUrl, not even an explicit nil -func (o *IncomingWebhookPayloadOut) UnsetIncomingWebhookUrl() { - o.IncomingWebhookUrl.Unset() + o.IncomingWebhookUrl = &v } func (o IncomingWebhookPayloadOut) MarshalJSON() ([]byte, error) { @@ -177,14 +147,14 @@ func (o IncomingWebhookPayloadOut) MarshalJSON() ([]byte, error) { func (o IncomingWebhookPayloadOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channel.IsSet() { - toSerialize["channel"] = o.Channel.Get() + if !IsNil(o.Channel) { + toSerialize["channel"] = o.Channel } - if o.Error.IsSet() { - toSerialize["error"] = o.Error.Get() + if !IsNil(o.Error) { + toSerialize["error"] = o.Error } - if o.IncomingWebhookUrl.IsSet() { - toSerialize["incomingWebhookUrl"] = o.IncomingWebhookUrl.Get() + if !IsNil(o.IncomingWebhookUrl) { + toSerialize["incomingWebhookUrl"] = o.IncomingWebhookUrl } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_application_out_.go b/go/internal/openapi/model_list_response_application_out_.go index 293fd123e..7467e595b 100644 --- a/go/internal/openapi/model_list_response_application_out_.go +++ b/go/internal/openapi/model_list_response_application_out_.go @@ -24,7 +24,7 @@ type ListResponseApplicationOut struct { Data []ApplicationOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseApplicationOut ListResponseApplicationOut @@ -123,46 +123,36 @@ func (o *ListResponseApplicationOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseApplicationOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseApplicationOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseApplicationOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseApplicationOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseApplicationOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseApplicationOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseApplicationOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseApplicationOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_application_stats_.go b/go/internal/openapi/model_list_response_application_stats_.go index a143249ad..be731cb9d 100644 --- a/go/internal/openapi/model_list_response_application_stats_.go +++ b/go/internal/openapi/model_list_response_application_stats_.go @@ -24,7 +24,7 @@ type ListResponseApplicationStats struct { Data []ApplicationStats `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseApplicationStats ListResponseApplicationStats @@ -123,46 +123,36 @@ func (o *ListResponseApplicationStats) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseApplicationStats) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseApplicationStats) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseApplicationStats) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseApplicationStats) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseApplicationStats) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseApplicationStats) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseApplicationStats) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseApplicationStats) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_background_task_out_.go b/go/internal/openapi/model_list_response_background_task_out_.go index 007c7978f..c42ddbfb8 100644 --- a/go/internal/openapi/model_list_response_background_task_out_.go +++ b/go/internal/openapi/model_list_response_background_task_out_.go @@ -24,7 +24,7 @@ type ListResponseBackgroundTaskOut struct { Data []BackgroundTaskOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseBackgroundTaskOut ListResponseBackgroundTaskOut @@ -123,46 +123,36 @@ func (o *ListResponseBackgroundTaskOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseBackgroundTaskOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseBackgroundTaskOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseBackgroundTaskOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseBackgroundTaskOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseBackgroundTaskOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseBackgroundTaskOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseBackgroundTaskOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseBackgroundTaskOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_endpoint_message_out_.go b/go/internal/openapi/model_list_response_endpoint_message_out_.go index f5a5466cf..de2930729 100644 --- a/go/internal/openapi/model_list_response_endpoint_message_out_.go +++ b/go/internal/openapi/model_list_response_endpoint_message_out_.go @@ -24,7 +24,7 @@ type ListResponseEndpointMessageOut struct { Data []EndpointMessageOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseEndpointMessageOut ListResponseEndpointMessageOut @@ -123,46 +123,36 @@ func (o *ListResponseEndpointMessageOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseEndpointMessageOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseEndpointMessageOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseEndpointMessageOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseEndpointMessageOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseEndpointMessageOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseEndpointMessageOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseEndpointMessageOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseEndpointMessageOut) ToMap() (map[string]interface{}, error) toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_endpoint_out_.go b/go/internal/openapi/model_list_response_endpoint_out_.go index a49850468..de0eb4951 100644 --- a/go/internal/openapi/model_list_response_endpoint_out_.go +++ b/go/internal/openapi/model_list_response_endpoint_out_.go @@ -24,7 +24,7 @@ type ListResponseEndpointOut struct { Data []EndpointOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseEndpointOut ListResponseEndpointOut @@ -123,46 +123,36 @@ func (o *ListResponseEndpointOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseEndpointOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseEndpointOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseEndpointOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseEndpointOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseEndpointOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseEndpointOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseEndpointOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseEndpointOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_event_type_out_.go b/go/internal/openapi/model_list_response_event_type_out_.go index 5ecd90eb4..68762285d 100644 --- a/go/internal/openapi/model_list_response_event_type_out_.go +++ b/go/internal/openapi/model_list_response_event_type_out_.go @@ -24,7 +24,7 @@ type ListResponseEventTypeOut struct { Data []EventTypeOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseEventTypeOut ListResponseEventTypeOut @@ -123,46 +123,36 @@ func (o *ListResponseEventTypeOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseEventTypeOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseEventTypeOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseEventTypeOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseEventTypeOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseEventTypeOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseEventTypeOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseEventTypeOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseEventTypeOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_integration_out_.go b/go/internal/openapi/model_list_response_integration_out_.go index 90d222012..f1743ee91 100644 --- a/go/internal/openapi/model_list_response_integration_out_.go +++ b/go/internal/openapi/model_list_response_integration_out_.go @@ -24,7 +24,7 @@ type ListResponseIntegrationOut struct { Data []IntegrationOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseIntegrationOut ListResponseIntegrationOut @@ -123,46 +123,36 @@ func (o *ListResponseIntegrationOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseIntegrationOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseIntegrationOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseIntegrationOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseIntegrationOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseIntegrationOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseIntegrationOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseIntegrationOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseIntegrationOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_message_attempt_endpoint_out_.go b/go/internal/openapi/model_list_response_message_attempt_endpoint_out_.go index a1345bd93..2dba424a7 100644 --- a/go/internal/openapi/model_list_response_message_attempt_endpoint_out_.go +++ b/go/internal/openapi/model_list_response_message_attempt_endpoint_out_.go @@ -24,7 +24,7 @@ type ListResponseMessageAttemptEndpointOut struct { Data []MessageAttemptEndpointOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseMessageAttemptEndpointOut ListResponseMessageAttemptEndpointOut @@ -123,46 +123,36 @@ func (o *ListResponseMessageAttemptEndpointOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseMessageAttemptEndpointOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseMessageAttemptEndpointOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseMessageAttemptEndpointOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseMessageAttemptEndpointOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseMessageAttemptEndpointOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseMessageAttemptEndpointOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseMessageAttemptEndpointOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseMessageAttemptEndpointOut) ToMap() (map[string]interface{}, toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_message_attempt_out_.go b/go/internal/openapi/model_list_response_message_attempt_out_.go index b17a92a98..099b0c9d3 100644 --- a/go/internal/openapi/model_list_response_message_attempt_out_.go +++ b/go/internal/openapi/model_list_response_message_attempt_out_.go @@ -24,7 +24,7 @@ type ListResponseMessageAttemptOut struct { Data []MessageAttemptOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseMessageAttemptOut ListResponseMessageAttemptOut @@ -123,46 +123,36 @@ func (o *ListResponseMessageAttemptOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseMessageAttemptOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseMessageAttemptOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseMessageAttemptOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseMessageAttemptOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseMessageAttemptOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseMessageAttemptOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseMessageAttemptOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseMessageAttemptOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_message_endpoint_out_.go b/go/internal/openapi/model_list_response_message_endpoint_out_.go index d7382d6db..cd1d72780 100644 --- a/go/internal/openapi/model_list_response_message_endpoint_out_.go +++ b/go/internal/openapi/model_list_response_message_endpoint_out_.go @@ -24,7 +24,7 @@ type ListResponseMessageEndpointOut struct { Data []MessageEndpointOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseMessageEndpointOut ListResponseMessageEndpointOut @@ -123,46 +123,36 @@ func (o *ListResponseMessageEndpointOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseMessageEndpointOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseMessageEndpointOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseMessageEndpointOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseMessageEndpointOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseMessageEndpointOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseMessageEndpointOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseMessageEndpointOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseMessageEndpointOut) ToMap() (map[string]interface{}, error) toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_message_out_.go b/go/internal/openapi/model_list_response_message_out_.go index f3c29cec6..b73012a1f 100644 --- a/go/internal/openapi/model_list_response_message_out_.go +++ b/go/internal/openapi/model_list_response_message_out_.go @@ -24,7 +24,7 @@ type ListResponseMessageOut struct { Data []MessageOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseMessageOut ListResponseMessageOut @@ -123,46 +123,36 @@ func (o *ListResponseMessageOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseMessageOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseMessageOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseMessageOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseMessageOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseMessageOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseMessageOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseMessageOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseMessageOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_operational_webhook_endpoint_out_.go b/go/internal/openapi/model_list_response_operational_webhook_endpoint_out_.go index ae4dbd518..42bf99370 100644 --- a/go/internal/openapi/model_list_response_operational_webhook_endpoint_out_.go +++ b/go/internal/openapi/model_list_response_operational_webhook_endpoint_out_.go @@ -24,7 +24,7 @@ type ListResponseOperationalWebhookEndpointOut struct { Data []OperationalWebhookEndpointOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseOperationalWebhookEndpointOut ListResponseOperationalWebhookEndpointOut @@ -123,46 +123,36 @@ func (o *ListResponseOperationalWebhookEndpointOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseOperationalWebhookEndpointOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseOperationalWebhookEndpointOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseOperationalWebhookEndpointOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseOperationalWebhookEndpointOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseOperationalWebhookEndpointOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseOperationalWebhookEndpointOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseOperationalWebhookEndpointOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseOperationalWebhookEndpointOut) ToMap() (map[string]interface toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_sink_out_.go b/go/internal/openapi/model_list_response_sink_out_.go index 3d0cc7978..f0a9aec0c 100644 --- a/go/internal/openapi/model_list_response_sink_out_.go +++ b/go/internal/openapi/model_list_response_sink_out_.go @@ -24,7 +24,7 @@ type ListResponseSinkOut struct { Data []SinkOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseSinkOut ListResponseSinkOut @@ -123,46 +123,36 @@ func (o *ListResponseSinkOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseSinkOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseSinkOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseSinkOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseSinkOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseSinkOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseSinkOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseSinkOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseSinkOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_stream_event_type_out_.go b/go/internal/openapi/model_list_response_stream_event_type_out_.go index 10123ac62..46e79258a 100644 --- a/go/internal/openapi/model_list_response_stream_event_type_out_.go +++ b/go/internal/openapi/model_list_response_stream_event_type_out_.go @@ -24,7 +24,7 @@ type ListResponseStreamEventTypeOut struct { Data []StreamEventTypeOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseStreamEventTypeOut ListResponseStreamEventTypeOut @@ -123,46 +123,36 @@ func (o *ListResponseStreamEventTypeOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseStreamEventTypeOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseStreamEventTypeOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseStreamEventTypeOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseStreamEventTypeOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseStreamEventTypeOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseStreamEventTypeOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseStreamEventTypeOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseStreamEventTypeOut) ToMap() (map[string]interface{}, error) toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_stream_out_.go b/go/internal/openapi/model_list_response_stream_out_.go index 22f6b7d25..b51caf037 100644 --- a/go/internal/openapi/model_list_response_stream_out_.go +++ b/go/internal/openapi/model_list_response_stream_out_.go @@ -24,7 +24,7 @@ type ListResponseStreamOut struct { Data []StreamOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseStreamOut ListResponseStreamOut @@ -123,46 +123,36 @@ func (o *ListResponseStreamOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseStreamOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseStreamOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseStreamOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseStreamOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseStreamOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseStreamOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseStreamOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseStreamOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_stream_sink_out_.go b/go/internal/openapi/model_list_response_stream_sink_out_.go index 9085ec001..3e77e87f0 100644 --- a/go/internal/openapi/model_list_response_stream_sink_out_.go +++ b/go/internal/openapi/model_list_response_stream_sink_out_.go @@ -24,7 +24,7 @@ type ListResponseStreamSinkOut struct { Data []StreamSinkOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseStreamSinkOut ListResponseStreamSinkOut @@ -123,46 +123,36 @@ func (o *ListResponseStreamSinkOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseStreamSinkOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseStreamSinkOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseStreamSinkOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseStreamSinkOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseStreamSinkOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseStreamSinkOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseStreamSinkOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseStreamSinkOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_list_response_template_out_.go b/go/internal/openapi/model_list_response_template_out_.go index 962c1ecf0..c9754002c 100644 --- a/go/internal/openapi/model_list_response_template_out_.go +++ b/go/internal/openapi/model_list_response_template_out_.go @@ -24,7 +24,7 @@ type ListResponseTemplateOut struct { Data []TemplateOut `json:"data"` Done bool `json:"done"` Iterator NullableString `json:"iterator"` - PrevIterator NullableString `json:"prevIterator,omitempty"` + PrevIterator *string `json:"prevIterator,omitempty"` } type _ListResponseTemplateOut ListResponseTemplateOut @@ -123,46 +123,36 @@ func (o *ListResponseTemplateOut) SetIterator(v string) { o.Iterator.Set(&v) } -// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise. func (o *ListResponseTemplateOut) GetPrevIterator() string { - if o == nil || IsNil(o.PrevIterator.Get()) { + if o == nil || IsNil(o.PrevIterator) { var ret string return ret } - return *o.PrevIterator.Get() + return *o.PrevIterator } // GetPrevIteratorOk returns a tuple with the PrevIterator 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 *ListResponseTemplateOut) GetPrevIteratorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrevIterator) { return nil, false } - return o.PrevIterator.Get(), o.PrevIterator.IsSet() + return o.PrevIterator, true } // HasPrevIterator returns a boolean if a field has been set. func (o *ListResponseTemplateOut) HasPrevIterator() bool { - if o != nil && o.PrevIterator.IsSet() { + if o != nil && !IsNil(o.PrevIterator) { return true } return false } -// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field. +// SetPrevIterator gets a reference to the given string and assigns it to the PrevIterator field. func (o *ListResponseTemplateOut) SetPrevIterator(v string) { - o.PrevIterator.Set(&v) -} -// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil -func (o *ListResponseTemplateOut) SetPrevIteratorNil() { - o.PrevIterator.Set(nil) -} - -// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil -func (o *ListResponseTemplateOut) UnsetPrevIterator() { - o.PrevIterator.Unset() + o.PrevIterator = &v } func (o ListResponseTemplateOut) MarshalJSON() ([]byte, error) { @@ -178,8 +168,8 @@ func (o ListResponseTemplateOut) ToMap() (map[string]interface{}, error) { toSerialize["data"] = o.Data toSerialize["done"] = o.Done toSerialize["iterator"] = o.Iterator.Get() - if o.PrevIterator.IsSet() { - toSerialize["prevIterator"] = o.PrevIterator.Get() + if !IsNil(o.PrevIterator) { + toSerialize["prevIterator"] = o.PrevIterator } return toSerialize, nil } diff --git a/go/internal/openapi/model_message_attempt_exhausted_event_data.go b/go/internal/openapi/model_message_attempt_exhausted_event_data.go index e1e9e57d0..d054f3dd3 100644 --- a/go/internal/openapi/model_message_attempt_exhausted_event_data.go +++ b/go/internal/openapi/model_message_attempt_exhausted_event_data.go @@ -24,12 +24,12 @@ type MessageAttemptExhaustedEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` LastAttempt MessageAttemptFailedData `json:"lastAttempt"` // The msg's UID - MsgEventId NullableString `json:"msgEventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + MsgEventId *string `json:"msgEventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The msg's ID MsgId string `json:"msgId"` } @@ -81,46 +81,36 @@ func (o *MessageAttemptExhaustedEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *MessageAttemptExhaustedEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *MessageAttemptExhaustedEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *MessageAttemptExhaustedEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *MessageAttemptExhaustedEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *MessageAttemptExhaustedEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *MessageAttemptExhaustedEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -171,46 +161,36 @@ func (o *MessageAttemptExhaustedEventData) SetLastAttempt(v MessageAttemptFailed o.LastAttempt = v } -// GetMsgEventId returns the MsgEventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMsgEventId returns the MsgEventId field value if set, zero value otherwise. func (o *MessageAttemptExhaustedEventData) GetMsgEventId() string { - if o == nil || IsNil(o.MsgEventId.Get()) { + if o == nil || IsNil(o.MsgEventId) { var ret string return ret } - return *o.MsgEventId.Get() + return *o.MsgEventId } // GetMsgEventIdOk returns a tuple with the MsgEventId 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 *MessageAttemptExhaustedEventData) GetMsgEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.MsgEventId) { return nil, false } - return o.MsgEventId.Get(), o.MsgEventId.IsSet() + return o.MsgEventId, true } // HasMsgEventId returns a boolean if a field has been set. func (o *MessageAttemptExhaustedEventData) HasMsgEventId() bool { - if o != nil && o.MsgEventId.IsSet() { + if o != nil && !IsNil(o.MsgEventId) { return true } return false } -// SetMsgEventId gets a reference to the given NullableString and assigns it to the MsgEventId field. +// SetMsgEventId gets a reference to the given string and assigns it to the MsgEventId field. func (o *MessageAttemptExhaustedEventData) SetMsgEventId(v string) { - o.MsgEventId.Set(&v) -} -// SetMsgEventIdNil sets the value for MsgEventId to be an explicit nil -func (o *MessageAttemptExhaustedEventData) SetMsgEventIdNil() { - o.MsgEventId.Set(nil) -} - -// UnsetMsgEventId ensures that no value is present for MsgEventId, not even an explicit nil -func (o *MessageAttemptExhaustedEventData) UnsetMsgEventId() { - o.MsgEventId.Unset() + o.MsgEventId = &v } // GetMsgId returns the MsgId field value @@ -248,13 +228,13 @@ func (o MessageAttemptExhaustedEventData) MarshalJSON() ([]byte, error) { func (o MessageAttemptExhaustedEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId toSerialize["lastAttempt"] = o.LastAttempt - if o.MsgEventId.IsSet() { - toSerialize["msgEventId"] = o.MsgEventId.Get() + if !IsNil(o.MsgEventId) { + toSerialize["msgEventId"] = o.MsgEventId } toSerialize["msgId"] = o.MsgId return toSerialize, nil diff --git a/go/internal/openapi/model_message_attempt_failing_event_data.go b/go/internal/openapi/model_message_attempt_failing_event_data.go index 2fff96dbc..fa2c6aecd 100644 --- a/go/internal/openapi/model_message_attempt_failing_event_data.go +++ b/go/internal/openapi/model_message_attempt_failing_event_data.go @@ -24,12 +24,12 @@ type MessageAttemptFailingEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` LastAttempt MessageAttemptFailedData `json:"lastAttempt"` // The msg's UID - MsgEventId NullableString `json:"msgEventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + MsgEventId *string `json:"msgEventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The msg's ID MsgId string `json:"msgId"` } @@ -81,46 +81,36 @@ func (o *MessageAttemptFailingEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *MessageAttemptFailingEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *MessageAttemptFailingEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *MessageAttemptFailingEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *MessageAttemptFailingEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *MessageAttemptFailingEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *MessageAttemptFailingEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -171,46 +161,36 @@ func (o *MessageAttemptFailingEventData) SetLastAttempt(v MessageAttemptFailedDa o.LastAttempt = v } -// GetMsgEventId returns the MsgEventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMsgEventId returns the MsgEventId field value if set, zero value otherwise. func (o *MessageAttemptFailingEventData) GetMsgEventId() string { - if o == nil || IsNil(o.MsgEventId.Get()) { + if o == nil || IsNil(o.MsgEventId) { var ret string return ret } - return *o.MsgEventId.Get() + return *o.MsgEventId } // GetMsgEventIdOk returns a tuple with the MsgEventId 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 *MessageAttemptFailingEventData) GetMsgEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.MsgEventId) { return nil, false } - return o.MsgEventId.Get(), o.MsgEventId.IsSet() + return o.MsgEventId, true } // HasMsgEventId returns a boolean if a field has been set. func (o *MessageAttemptFailingEventData) HasMsgEventId() bool { - if o != nil && o.MsgEventId.IsSet() { + if o != nil && !IsNil(o.MsgEventId) { return true } return false } -// SetMsgEventId gets a reference to the given NullableString and assigns it to the MsgEventId field. +// SetMsgEventId gets a reference to the given string and assigns it to the MsgEventId field. func (o *MessageAttemptFailingEventData) SetMsgEventId(v string) { - o.MsgEventId.Set(&v) -} -// SetMsgEventIdNil sets the value for MsgEventId to be an explicit nil -func (o *MessageAttemptFailingEventData) SetMsgEventIdNil() { - o.MsgEventId.Set(nil) -} - -// UnsetMsgEventId ensures that no value is present for MsgEventId, not even an explicit nil -func (o *MessageAttemptFailingEventData) UnsetMsgEventId() { - o.MsgEventId.Unset() + o.MsgEventId = &v } // GetMsgId returns the MsgId field value @@ -248,13 +228,13 @@ func (o MessageAttemptFailingEventData) MarshalJSON() ([]byte, error) { func (o MessageAttemptFailingEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId toSerialize["lastAttempt"] = o.LastAttempt - if o.MsgEventId.IsSet() { - toSerialize["msgEventId"] = o.MsgEventId.Get() + if !IsNil(o.MsgEventId) { + toSerialize["msgEventId"] = o.MsgEventId } toSerialize["msgId"] = o.MsgId return toSerialize, nil diff --git a/go/internal/openapi/model_message_attempt_headers_out.go b/go/internal/openapi/model_message_attempt_headers_out.go index 2b8bd8c26..fb2f69192 100644 --- a/go/internal/openapi/model_message_attempt_headers_out.go +++ b/go/internal/openapi/model_message_attempt_headers_out.go @@ -47,9 +47,9 @@ func NewMessageAttemptHeadersOutWithDefaults() *MessageAttemptHeadersOut { return &this } -// GetResponseHeaders returns the ResponseHeaders field value if set, zero value otherwise (both if not set or set to explicit null). +// GetResponseHeaders returns the ResponseHeaders field value if set, zero value otherwise. func (o *MessageAttemptHeadersOut) GetResponseHeaders() [][]string { - if o == nil { + if o == nil || IsNil(o.ResponseHeaders) { var ret [][]string return ret } @@ -58,7 +58,6 @@ func (o *MessageAttemptHeadersOut) GetResponseHeaders() [][]string { // GetResponseHeadersOk returns a tuple with the ResponseHeaders 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 *MessageAttemptHeadersOut) GetResponseHeadersOk() ([][]string, bool) { if o == nil || IsNil(o.ResponseHeaders) { return nil, false @@ -138,7 +137,7 @@ func (o MessageAttemptHeadersOut) MarshalJSON() ([]byte, error) { func (o MessageAttemptHeadersOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ResponseHeaders != nil { + if !IsNil(o.ResponseHeaders) { toSerialize["responseHeaders"] = o.ResponseHeaders } toSerialize["sensitive"] = o.Sensitive diff --git a/go/internal/openapi/model_message_attempt_recovered_event_data.go b/go/internal/openapi/model_message_attempt_recovered_event_data.go index 1eadd5fd1..a388f7a0a 100644 --- a/go/internal/openapi/model_message_attempt_recovered_event_data.go +++ b/go/internal/openapi/model_message_attempt_recovered_event_data.go @@ -24,12 +24,12 @@ type MessageAttemptRecoveredEventData struct { // The app's ID AppId string `json:"appId"` // The app's UID - AppUid NullableString `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + AppUid *string `json:"appUid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The ep's ID EndpointId string `json:"endpointId"` LastAttempt MessageAttemptFailedData `json:"lastAttempt"` // The msg's UID - MsgEventId NullableString `json:"msgEventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + MsgEventId *string `json:"msgEventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The msg's ID MsgId string `json:"msgId"` } @@ -81,46 +81,36 @@ func (o *MessageAttemptRecoveredEventData) SetAppId(v string) { o.AppId = v } -// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAppUid returns the AppUid field value if set, zero value otherwise. func (o *MessageAttemptRecoveredEventData) GetAppUid() string { - if o == nil || IsNil(o.AppUid.Get()) { + if o == nil || IsNil(o.AppUid) { var ret string return ret } - return *o.AppUid.Get() + return *o.AppUid } // GetAppUidOk returns a tuple with the AppUid 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 *MessageAttemptRecoveredEventData) GetAppUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AppUid) { return nil, false } - return o.AppUid.Get(), o.AppUid.IsSet() + return o.AppUid, true } // HasAppUid returns a boolean if a field has been set. func (o *MessageAttemptRecoveredEventData) HasAppUid() bool { - if o != nil && o.AppUid.IsSet() { + if o != nil && !IsNil(o.AppUid) { return true } return false } -// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field. +// SetAppUid gets a reference to the given string and assigns it to the AppUid field. func (o *MessageAttemptRecoveredEventData) SetAppUid(v string) { - o.AppUid.Set(&v) -} -// SetAppUidNil sets the value for AppUid to be an explicit nil -func (o *MessageAttemptRecoveredEventData) SetAppUidNil() { - o.AppUid.Set(nil) -} - -// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil -func (o *MessageAttemptRecoveredEventData) UnsetAppUid() { - o.AppUid.Unset() + o.AppUid = &v } // GetEndpointId returns the EndpointId field value @@ -171,46 +161,36 @@ func (o *MessageAttemptRecoveredEventData) SetLastAttempt(v MessageAttemptFailed o.LastAttempt = v } -// GetMsgEventId returns the MsgEventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMsgEventId returns the MsgEventId field value if set, zero value otherwise. func (o *MessageAttemptRecoveredEventData) GetMsgEventId() string { - if o == nil || IsNil(o.MsgEventId.Get()) { + if o == nil || IsNil(o.MsgEventId) { var ret string return ret } - return *o.MsgEventId.Get() + return *o.MsgEventId } // GetMsgEventIdOk returns a tuple with the MsgEventId 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 *MessageAttemptRecoveredEventData) GetMsgEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.MsgEventId) { return nil, false } - return o.MsgEventId.Get(), o.MsgEventId.IsSet() + return o.MsgEventId, true } // HasMsgEventId returns a boolean if a field has been set. func (o *MessageAttemptRecoveredEventData) HasMsgEventId() bool { - if o != nil && o.MsgEventId.IsSet() { + if o != nil && !IsNil(o.MsgEventId) { return true } return false } -// SetMsgEventId gets a reference to the given NullableString and assigns it to the MsgEventId field. +// SetMsgEventId gets a reference to the given string and assigns it to the MsgEventId field. func (o *MessageAttemptRecoveredEventData) SetMsgEventId(v string) { - o.MsgEventId.Set(&v) -} -// SetMsgEventIdNil sets the value for MsgEventId to be an explicit nil -func (o *MessageAttemptRecoveredEventData) SetMsgEventIdNil() { - o.MsgEventId.Set(nil) -} - -// UnsetMsgEventId ensures that no value is present for MsgEventId, not even an explicit nil -func (o *MessageAttemptRecoveredEventData) UnsetMsgEventId() { - o.MsgEventId.Unset() + o.MsgEventId = &v } // GetMsgId returns the MsgId field value @@ -248,13 +228,13 @@ func (o MessageAttemptRecoveredEventData) MarshalJSON() ([]byte, error) { func (o MessageAttemptRecoveredEventData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["appId"] = o.AppId - if o.AppUid.IsSet() { - toSerialize["appUid"] = o.AppUid.Get() + if !IsNil(o.AppUid) { + toSerialize["appUid"] = o.AppUid } toSerialize["endpointId"] = o.EndpointId toSerialize["lastAttempt"] = o.LastAttempt - if o.MsgEventId.IsSet() { - toSerialize["msgEventId"] = o.MsgEventId.Get() + if !IsNil(o.MsgEventId) { + toSerialize["msgEventId"] = o.MsgEventId } toSerialize["msgId"] = o.MsgId return toSerialize, nil diff --git a/go/internal/openapi/model_message_broadcast_in.go b/go/internal/openapi/model_message_broadcast_in.go index 69936588e..67610bddc 100644 --- a/go/internal/openapi/model_message_broadcast_in.go +++ b/go/internal/openapi/model_message_broadcast_in.go @@ -24,14 +24,14 @@ type MessageBroadcastIn struct { // List of free-form identifiers that endpoints can filter by Channels []string `json:"channels,omitempty"` // Optional unique identifier for the message - EventId NullableString `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EventId *string `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name EventType string `json:"eventType" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Payload map[string]interface{} `json:"payload"` // Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`. - PayloadRetentionHours NullableInt64 `json:"payloadRetentionHours,omitempty"` + PayloadRetentionHours *int64 `json:"payloadRetentionHours,omitempty"` // Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`. - PayloadRetentionPeriod NullableInt64 `json:"payloadRetentionPeriod,omitempty"` + PayloadRetentionPeriod *int64 `json:"payloadRetentionPeriod,omitempty"` } type _MessageBroadcastIn MessageBroadcastIn @@ -45,7 +45,7 @@ func NewMessageBroadcastIn(eventType string, payload map[string]interface{}) *Me this.EventType = eventType this.Payload = payload var payloadRetentionPeriod int64 = 90 - this.PayloadRetentionPeriod = *NewNullableInt64(&payloadRetentionPeriod) + this.PayloadRetentionPeriod = &payloadRetentionPeriod return &this } @@ -55,13 +55,13 @@ func NewMessageBroadcastIn(eventType string, payload map[string]interface{}) *Me func NewMessageBroadcastInWithDefaults() *MessageBroadcastIn { this := MessageBroadcastIn{} var payloadRetentionPeriod int64 = 90 - this.PayloadRetentionPeriod = *NewNullableInt64(&payloadRetentionPeriod) + this.PayloadRetentionPeriod = &payloadRetentionPeriod return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *MessageBroadcastIn) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -70,7 +70,6 @@ func (o *MessageBroadcastIn) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *MessageBroadcastIn) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -92,46 +91,36 @@ func (o *MessageBroadcastIn) SetChannels(v []string) { o.Channels = v } -// GetEventId returns the EventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventId returns the EventId field value if set, zero value otherwise. func (o *MessageBroadcastIn) GetEventId() string { - if o == nil || IsNil(o.EventId.Get()) { + if o == nil || IsNil(o.EventId) { var ret string return ret } - return *o.EventId.Get() + return *o.EventId } // GetEventIdOk returns a tuple with the EventId 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 *MessageBroadcastIn) GetEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EventId) { return nil, false } - return o.EventId.Get(), o.EventId.IsSet() + return o.EventId, true } // HasEventId returns a boolean if a field has been set. func (o *MessageBroadcastIn) HasEventId() bool { - if o != nil && o.EventId.IsSet() { + if o != nil && !IsNil(o.EventId) { return true } return false } -// SetEventId gets a reference to the given NullableString and assigns it to the EventId field. +// SetEventId gets a reference to the given string and assigns it to the EventId field. func (o *MessageBroadcastIn) SetEventId(v string) { - o.EventId.Set(&v) -} -// SetEventIdNil sets the value for EventId to be an explicit nil -func (o *MessageBroadcastIn) SetEventIdNil() { - o.EventId.Set(nil) -} - -// UnsetEventId ensures that no value is present for EventId, not even an explicit nil -func (o *MessageBroadcastIn) UnsetEventId() { - o.EventId.Unset() + o.EventId = &v } // GetEventType returns the EventType field value @@ -182,88 +171,68 @@ func (o *MessageBroadcastIn) SetPayload(v map[string]interface{}) { o.Payload = v } -// GetPayloadRetentionHours returns the PayloadRetentionHours field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPayloadRetentionHours returns the PayloadRetentionHours field value if set, zero value otherwise. func (o *MessageBroadcastIn) GetPayloadRetentionHours() int64 { - if o == nil || IsNil(o.PayloadRetentionHours.Get()) { + if o == nil || IsNil(o.PayloadRetentionHours) { var ret int64 return ret } - return *o.PayloadRetentionHours.Get() + return *o.PayloadRetentionHours } // GetPayloadRetentionHoursOk returns a tuple with the PayloadRetentionHours 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 *MessageBroadcastIn) GetPayloadRetentionHoursOk() (*int64, bool) { - if o == nil { + if o == nil || IsNil(o.PayloadRetentionHours) { return nil, false } - return o.PayloadRetentionHours.Get(), o.PayloadRetentionHours.IsSet() + return o.PayloadRetentionHours, true } // HasPayloadRetentionHours returns a boolean if a field has been set. func (o *MessageBroadcastIn) HasPayloadRetentionHours() bool { - if o != nil && o.PayloadRetentionHours.IsSet() { + if o != nil && !IsNil(o.PayloadRetentionHours) { return true } return false } -// SetPayloadRetentionHours gets a reference to the given NullableInt64 and assigns it to the PayloadRetentionHours field. +// SetPayloadRetentionHours gets a reference to the given int64 and assigns it to the PayloadRetentionHours field. func (o *MessageBroadcastIn) SetPayloadRetentionHours(v int64) { - o.PayloadRetentionHours.Set(&v) -} -// SetPayloadRetentionHoursNil sets the value for PayloadRetentionHours to be an explicit nil -func (o *MessageBroadcastIn) SetPayloadRetentionHoursNil() { - o.PayloadRetentionHours.Set(nil) -} - -// UnsetPayloadRetentionHours ensures that no value is present for PayloadRetentionHours, not even an explicit nil -func (o *MessageBroadcastIn) UnsetPayloadRetentionHours() { - o.PayloadRetentionHours.Unset() + o.PayloadRetentionHours = &v } -// GetPayloadRetentionPeriod returns the PayloadRetentionPeriod field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPayloadRetentionPeriod returns the PayloadRetentionPeriod field value if set, zero value otherwise. func (o *MessageBroadcastIn) GetPayloadRetentionPeriod() int64 { - if o == nil || IsNil(o.PayloadRetentionPeriod.Get()) { + if o == nil || IsNil(o.PayloadRetentionPeriod) { var ret int64 return ret } - return *o.PayloadRetentionPeriod.Get() + return *o.PayloadRetentionPeriod } // GetPayloadRetentionPeriodOk returns a tuple with the PayloadRetentionPeriod 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 *MessageBroadcastIn) GetPayloadRetentionPeriodOk() (*int64, bool) { - if o == nil { + if o == nil || IsNil(o.PayloadRetentionPeriod) { return nil, false } - return o.PayloadRetentionPeriod.Get(), o.PayloadRetentionPeriod.IsSet() + return o.PayloadRetentionPeriod, true } // HasPayloadRetentionPeriod returns a boolean if a field has been set. func (o *MessageBroadcastIn) HasPayloadRetentionPeriod() bool { - if o != nil && o.PayloadRetentionPeriod.IsSet() { + if o != nil && !IsNil(o.PayloadRetentionPeriod) { return true } return false } -// SetPayloadRetentionPeriod gets a reference to the given NullableInt64 and assigns it to the PayloadRetentionPeriod field. +// SetPayloadRetentionPeriod gets a reference to the given int64 and assigns it to the PayloadRetentionPeriod field. func (o *MessageBroadcastIn) SetPayloadRetentionPeriod(v int64) { - o.PayloadRetentionPeriod.Set(&v) -} -// SetPayloadRetentionPeriodNil sets the value for PayloadRetentionPeriod to be an explicit nil -func (o *MessageBroadcastIn) SetPayloadRetentionPeriodNil() { - o.PayloadRetentionPeriod.Set(nil) -} - -// UnsetPayloadRetentionPeriod ensures that no value is present for PayloadRetentionPeriod, not even an explicit nil -func (o *MessageBroadcastIn) UnsetPayloadRetentionPeriod() { - o.PayloadRetentionPeriod.Unset() + o.PayloadRetentionPeriod = &v } func (o MessageBroadcastIn) MarshalJSON() ([]byte, error) { @@ -276,19 +245,19 @@ func (o MessageBroadcastIn) MarshalJSON() ([]byte, error) { func (o MessageBroadcastIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } - if o.EventId.IsSet() { - toSerialize["eventId"] = o.EventId.Get() + if !IsNil(o.EventId) { + toSerialize["eventId"] = o.EventId } toSerialize["eventType"] = o.EventType toSerialize["payload"] = o.Payload - if o.PayloadRetentionHours.IsSet() { - toSerialize["payloadRetentionHours"] = o.PayloadRetentionHours.Get() + if !IsNil(o.PayloadRetentionHours) { + toSerialize["payloadRetentionHours"] = o.PayloadRetentionHours } - if o.PayloadRetentionPeriod.IsSet() { - toSerialize["payloadRetentionPeriod"] = o.PayloadRetentionPeriod.Get() + if !IsNil(o.PayloadRetentionPeriod) { + toSerialize["payloadRetentionPeriod"] = o.PayloadRetentionPeriod } return toSerialize, nil } diff --git a/go/internal/openapi/model_message_endpoint_out.go b/go/internal/openapi/model_message_endpoint_out.go index 50ca28f59..b8a4d736e 100644 --- a/go/internal/openapi/model_message_endpoint_out.go +++ b/go/internal/openapi/model_message_endpoint_out.go @@ -31,11 +31,11 @@ type MessageEndpointOut struct { FilterTypes []string `json:"filterTypes,omitempty"` // The ep's ID Id string `json:"id"` - NextAttempt NullableTime `json:"nextAttempt,omitempty"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + NextAttempt *time.Time `json:"nextAttempt,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` Status MessageStatus `json:"status"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` Url string `json:"url"` // Deprecated @@ -72,9 +72,9 @@ func NewMessageEndpointOutWithDefaults() *MessageEndpointOut { return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *MessageEndpointOut) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -83,7 +83,6 @@ func (o *MessageEndpointOut) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *MessageEndpointOut) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -185,9 +184,9 @@ func (o *MessageEndpointOut) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *MessageEndpointOut) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -196,7 +195,6 @@ func (o *MessageEndpointOut) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *MessageEndpointOut) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -242,88 +240,68 @@ func (o *MessageEndpointOut) SetId(v string) { o.Id = v } -// GetNextAttempt returns the NextAttempt field value if set, zero value otherwise (both if not set or set to explicit null). +// GetNextAttempt returns the NextAttempt field value if set, zero value otherwise. func (o *MessageEndpointOut) GetNextAttempt() time.Time { - if o == nil || IsNil(o.NextAttempt.Get()) { + if o == nil || IsNil(o.NextAttempt) { var ret time.Time return ret } - return *o.NextAttempt.Get() + return *o.NextAttempt } // GetNextAttemptOk returns a tuple with the NextAttempt 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 *MessageEndpointOut) GetNextAttemptOk() (*time.Time, bool) { - if o == nil { + if o == nil || IsNil(o.NextAttempt) { return nil, false } - return o.NextAttempt.Get(), o.NextAttempt.IsSet() + return o.NextAttempt, true } // HasNextAttempt returns a boolean if a field has been set. func (o *MessageEndpointOut) HasNextAttempt() bool { - if o != nil && o.NextAttempt.IsSet() { + if o != nil && !IsNil(o.NextAttempt) { return true } return false } -// SetNextAttempt gets a reference to the given NullableTime and assigns it to the NextAttempt field. +// SetNextAttempt gets a reference to the given time.Time and assigns it to the NextAttempt field. func (o *MessageEndpointOut) SetNextAttempt(v time.Time) { - o.NextAttempt.Set(&v) -} -// SetNextAttemptNil sets the value for NextAttempt to be an explicit nil -func (o *MessageEndpointOut) SetNextAttemptNil() { - o.NextAttempt.Set(nil) -} - -// UnsetNextAttempt ensures that no value is present for NextAttempt, not even an explicit nil -func (o *MessageEndpointOut) UnsetNextAttempt() { - o.NextAttempt.Unset() + o.NextAttempt = &v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *MessageEndpointOut) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *MessageEndpointOut) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *MessageEndpointOut) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *MessageEndpointOut) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *MessageEndpointOut) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *MessageEndpointOut) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } // GetStatus returns the Status field value @@ -350,46 +328,36 @@ func (o *MessageEndpointOut) SetStatus(v MessageStatus) { o.Status = v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *MessageEndpointOut) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *MessageEndpointOut) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *MessageEndpointOut) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *MessageEndpointOut) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *MessageEndpointOut) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *MessageEndpointOut) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUpdatedAt returns the UpdatedAt field value @@ -477,7 +445,7 @@ func (o MessageEndpointOut) MarshalJSON() ([]byte, error) { func (o MessageEndpointOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } toSerialize["createdAt"] = o.CreatedAt @@ -485,19 +453,19 @@ func (o MessageEndpointOut) ToMap() (map[string]interface{}, error) { if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } toSerialize["id"] = o.Id - if o.NextAttempt.IsSet() { - toSerialize["nextAttempt"] = o.NextAttempt.Get() + if !IsNil(o.NextAttempt) { + toSerialize["nextAttempt"] = o.NextAttempt } - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } toSerialize["status"] = o.Status - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["updatedAt"] = o.UpdatedAt toSerialize["url"] = o.Url diff --git a/go/internal/openapi/model_message_in.go b/go/internal/openapi/model_message_in.go index 438eed8fb..bd6779638 100644 --- a/go/internal/openapi/model_message_in.go +++ b/go/internal/openapi/model_message_in.go @@ -25,15 +25,15 @@ type MessageIn struct { // List of free-form identifiers that endpoints can filter by Channels []string `json:"channels,omitempty"` // Optional unique identifier for the message - EventId NullableString `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EventId *string `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name EventType string `json:"eventType" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // JSON payload to send as the request body of the webhook. We also support sending non-JSON payloads. Please contact us for more information. Payload map[string]interface{} `json:"payload"` // Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`. - PayloadRetentionHours NullableInt64 `json:"payloadRetentionHours,omitempty"` + PayloadRetentionHours *int64 `json:"payloadRetentionHours,omitempty"` // Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`. - PayloadRetentionPeriod NullableInt64 `json:"payloadRetentionPeriod,omitempty"` + PayloadRetentionPeriod *int64 `json:"payloadRetentionPeriod,omitempty"` // List of free-form tags that can be filtered by when listing messages Tags []string `json:"tags,omitempty"` // Extra parameters to pass to Transformations (for future use) @@ -51,7 +51,7 @@ func NewMessageIn(eventType string, payload map[string]interface{}) *MessageIn { this.EventType = eventType this.Payload = payload var payloadRetentionPeriod int64 = 90 - this.PayloadRetentionPeriod = *NewNullableInt64(&payloadRetentionPeriod) + this.PayloadRetentionPeriod = &payloadRetentionPeriod return &this } @@ -61,7 +61,7 @@ func NewMessageIn(eventType string, payload map[string]interface{}) *MessageIn { func NewMessageInWithDefaults() *MessageIn { this := MessageIn{} var payloadRetentionPeriod int64 = 90 - this.PayloadRetentionPeriod = *NewNullableInt64(&payloadRetentionPeriod) + this.PayloadRetentionPeriod = &payloadRetentionPeriod return &this } @@ -97,9 +97,9 @@ func (o *MessageIn) SetApplication(v ApplicationIn) { o.Application = &v } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *MessageIn) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -108,7 +108,6 @@ func (o *MessageIn) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *MessageIn) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -130,46 +129,36 @@ func (o *MessageIn) SetChannels(v []string) { o.Channels = v } -// GetEventId returns the EventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventId returns the EventId field value if set, zero value otherwise. func (o *MessageIn) GetEventId() string { - if o == nil || IsNil(o.EventId.Get()) { + if o == nil || IsNil(o.EventId) { var ret string return ret } - return *o.EventId.Get() + return *o.EventId } // GetEventIdOk returns a tuple with the EventId 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 *MessageIn) GetEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EventId) { return nil, false } - return o.EventId.Get(), o.EventId.IsSet() + return o.EventId, true } // HasEventId returns a boolean if a field has been set. func (o *MessageIn) HasEventId() bool { - if o != nil && o.EventId.IsSet() { + if o != nil && !IsNil(o.EventId) { return true } return false } -// SetEventId gets a reference to the given NullableString and assigns it to the EventId field. +// SetEventId gets a reference to the given string and assigns it to the EventId field. func (o *MessageIn) SetEventId(v string) { - o.EventId.Set(&v) -} -// SetEventIdNil sets the value for EventId to be an explicit nil -func (o *MessageIn) SetEventIdNil() { - o.EventId.Set(nil) -} - -// UnsetEventId ensures that no value is present for EventId, not even an explicit nil -func (o *MessageIn) UnsetEventId() { - o.EventId.Unset() + o.EventId = &v } // GetEventType returns the EventType field value @@ -220,93 +209,73 @@ func (o *MessageIn) SetPayload(v map[string]interface{}) { o.Payload = v } -// GetPayloadRetentionHours returns the PayloadRetentionHours field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPayloadRetentionHours returns the PayloadRetentionHours field value if set, zero value otherwise. func (o *MessageIn) GetPayloadRetentionHours() int64 { - if o == nil || IsNil(o.PayloadRetentionHours.Get()) { + if o == nil || IsNil(o.PayloadRetentionHours) { var ret int64 return ret } - return *o.PayloadRetentionHours.Get() + return *o.PayloadRetentionHours } // GetPayloadRetentionHoursOk returns a tuple with the PayloadRetentionHours 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 *MessageIn) GetPayloadRetentionHoursOk() (*int64, bool) { - if o == nil { + if o == nil || IsNil(o.PayloadRetentionHours) { return nil, false } - return o.PayloadRetentionHours.Get(), o.PayloadRetentionHours.IsSet() + return o.PayloadRetentionHours, true } // HasPayloadRetentionHours returns a boolean if a field has been set. func (o *MessageIn) HasPayloadRetentionHours() bool { - if o != nil && o.PayloadRetentionHours.IsSet() { + if o != nil && !IsNil(o.PayloadRetentionHours) { return true } return false } -// SetPayloadRetentionHours gets a reference to the given NullableInt64 and assigns it to the PayloadRetentionHours field. +// SetPayloadRetentionHours gets a reference to the given int64 and assigns it to the PayloadRetentionHours field. func (o *MessageIn) SetPayloadRetentionHours(v int64) { - o.PayloadRetentionHours.Set(&v) -} -// SetPayloadRetentionHoursNil sets the value for PayloadRetentionHours to be an explicit nil -func (o *MessageIn) SetPayloadRetentionHoursNil() { - o.PayloadRetentionHours.Set(nil) -} - -// UnsetPayloadRetentionHours ensures that no value is present for PayloadRetentionHours, not even an explicit nil -func (o *MessageIn) UnsetPayloadRetentionHours() { - o.PayloadRetentionHours.Unset() + o.PayloadRetentionHours = &v } -// GetPayloadRetentionPeriod returns the PayloadRetentionPeriod field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPayloadRetentionPeriod returns the PayloadRetentionPeriod field value if set, zero value otherwise. func (o *MessageIn) GetPayloadRetentionPeriod() int64 { - if o == nil || IsNil(o.PayloadRetentionPeriod.Get()) { + if o == nil || IsNil(o.PayloadRetentionPeriod) { var ret int64 return ret } - return *o.PayloadRetentionPeriod.Get() + return *o.PayloadRetentionPeriod } // GetPayloadRetentionPeriodOk returns a tuple with the PayloadRetentionPeriod 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 *MessageIn) GetPayloadRetentionPeriodOk() (*int64, bool) { - if o == nil { + if o == nil || IsNil(o.PayloadRetentionPeriod) { return nil, false } - return o.PayloadRetentionPeriod.Get(), o.PayloadRetentionPeriod.IsSet() + return o.PayloadRetentionPeriod, true } // HasPayloadRetentionPeriod returns a boolean if a field has been set. func (o *MessageIn) HasPayloadRetentionPeriod() bool { - if o != nil && o.PayloadRetentionPeriod.IsSet() { + if o != nil && !IsNil(o.PayloadRetentionPeriod) { return true } return false } -// SetPayloadRetentionPeriod gets a reference to the given NullableInt64 and assigns it to the PayloadRetentionPeriod field. +// SetPayloadRetentionPeriod gets a reference to the given int64 and assigns it to the PayloadRetentionPeriod field. func (o *MessageIn) SetPayloadRetentionPeriod(v int64) { - o.PayloadRetentionPeriod.Set(&v) -} -// SetPayloadRetentionPeriodNil sets the value for PayloadRetentionPeriod to be an explicit nil -func (o *MessageIn) SetPayloadRetentionPeriodNil() { - o.PayloadRetentionPeriod.Set(nil) -} - -// UnsetPayloadRetentionPeriod ensures that no value is present for PayloadRetentionPeriod, not even an explicit nil -func (o *MessageIn) UnsetPayloadRetentionPeriod() { - o.PayloadRetentionPeriod.Unset() + o.PayloadRetentionPeriod = &v } -// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTags returns the Tags field value if set, zero value otherwise. func (o *MessageIn) GetTags() []string { - if o == nil { + if o == nil || IsNil(o.Tags) { var ret []string return ret } @@ -315,7 +284,6 @@ func (o *MessageIn) GetTags() []string { // GetTagsOk returns a tuple with the Tags 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 *MessageIn) GetTagsOk() ([]string, bool) { if o == nil || IsNil(o.Tags) { return nil, false @@ -337,9 +305,9 @@ func (o *MessageIn) SetTags(v []string) { o.Tags = v } -// GetTransformationsParams returns the TransformationsParams field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTransformationsParams returns the TransformationsParams field value if set, zero value otherwise. func (o *MessageIn) GetTransformationsParams() map[string]interface{} { - if o == nil { + if o == nil || IsNil(o.TransformationsParams) { var ret map[string]interface{} return ret } @@ -348,7 +316,6 @@ func (o *MessageIn) GetTransformationsParams() map[string]interface{} { // GetTransformationsParamsOk returns a tuple with the TransformationsParams 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 *MessageIn) GetTransformationsParamsOk() (map[string]interface{}, bool) { if o == nil || IsNil(o.TransformationsParams) { return map[string]interface{}{}, false @@ -383,24 +350,24 @@ func (o MessageIn) ToMap() (map[string]interface{}, error) { if !IsNil(o.Application) { toSerialize["application"] = o.Application } - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } - if o.EventId.IsSet() { - toSerialize["eventId"] = o.EventId.Get() + if !IsNil(o.EventId) { + toSerialize["eventId"] = o.EventId } toSerialize["eventType"] = o.EventType toSerialize["payload"] = o.Payload - if o.PayloadRetentionHours.IsSet() { - toSerialize["payloadRetentionHours"] = o.PayloadRetentionHours.Get() + if !IsNil(o.PayloadRetentionHours) { + toSerialize["payloadRetentionHours"] = o.PayloadRetentionHours } - if o.PayloadRetentionPeriod.IsSet() { - toSerialize["payloadRetentionPeriod"] = o.PayloadRetentionPeriod.Get() + if !IsNil(o.PayloadRetentionPeriod) { + toSerialize["payloadRetentionPeriod"] = o.PayloadRetentionPeriod } - if o.Tags != nil { + if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } - if o.TransformationsParams != nil { + if !IsNil(o.TransformationsParams) { toSerialize["transformationsParams"] = o.TransformationsParams } return toSerialize, nil diff --git a/go/internal/openapi/model_message_out.go b/go/internal/openapi/model_message_out.go index 9bd42f3a6..7c11c1d57 100644 --- a/go/internal/openapi/model_message_out.go +++ b/go/internal/openapi/model_message_out.go @@ -25,7 +25,7 @@ type MessageOut struct { // List of free-form identifiers that endpoints can filter by Channels []string `json:"channels,omitempty"` // Optional unique identifier for the message - EventId NullableString `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + EventId *string `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name EventType string `json:"eventType" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The msg's ID @@ -58,9 +58,9 @@ func NewMessageOutWithDefaults() *MessageOut { return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *MessageOut) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -69,7 +69,6 @@ func (o *MessageOut) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *MessageOut) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -91,46 +90,36 @@ func (o *MessageOut) SetChannels(v []string) { o.Channels = v } -// GetEventId returns the EventId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetEventId returns the EventId field value if set, zero value otherwise. func (o *MessageOut) GetEventId() string { - if o == nil || IsNil(o.EventId.Get()) { + if o == nil || IsNil(o.EventId) { var ret string return ret } - return *o.EventId.Get() + return *o.EventId } // GetEventIdOk returns a tuple with the EventId 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 *MessageOut) GetEventIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.EventId) { return nil, false } - return o.EventId.Get(), o.EventId.IsSet() + return o.EventId, true } // HasEventId returns a boolean if a field has been set. func (o *MessageOut) HasEventId() bool { - if o != nil && o.EventId.IsSet() { + if o != nil && !IsNil(o.EventId) { return true } return false } -// SetEventId gets a reference to the given NullableString and assigns it to the EventId field. +// SetEventId gets a reference to the given string and assigns it to the EventId field. func (o *MessageOut) SetEventId(v string) { - o.EventId.Set(&v) -} -// SetEventIdNil sets the value for EventId to be an explicit nil -func (o *MessageOut) SetEventIdNil() { - o.EventId.Set(nil) -} - -// UnsetEventId ensures that no value is present for EventId, not even an explicit nil -func (o *MessageOut) UnsetEventId() { - o.EventId.Unset() + o.EventId = &v } // GetEventType returns the EventType field value @@ -205,9 +194,9 @@ func (o *MessageOut) SetPayload(v map[string]interface{}) { o.Payload = v } -// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). +// GetTags returns the Tags field value if set, zero value otherwise. func (o *MessageOut) GetTags() []string { - if o == nil { + if o == nil || IsNil(o.Tags) { var ret []string return ret } @@ -216,7 +205,6 @@ func (o *MessageOut) GetTags() []string { // GetTagsOk returns a tuple with the Tags 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 *MessageOut) GetTagsOk() ([]string, bool) { if o == nil || IsNil(o.Tags) { return nil, false @@ -272,16 +260,16 @@ func (o MessageOut) MarshalJSON() ([]byte, error) { func (o MessageOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } - if o.EventId.IsSet() { - toSerialize["eventId"] = o.EventId.Get() + if !IsNil(o.EventId) { + toSerialize["eventId"] = o.EventId } toSerialize["eventType"] = o.EventType toSerialize["id"] = o.Id toSerialize["payload"] = o.Payload - if o.Tags != nil { + if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } toSerialize["timestamp"] = o.Timestamp diff --git a/go/internal/openapi/model_o_auth_payload_out.go b/go/internal/openapi/model_o_auth_payload_out.go index 09d30765e..0d31d88ba 100644 --- a/go/internal/openapi/model_o_auth_payload_out.go +++ b/go/internal/openapi/model_o_auth_payload_out.go @@ -19,9 +19,9 @@ var _ MappedNullable = &OAuthPayloadOut{} // OAuthPayloadOut struct for OAuthPayloadOut type OAuthPayloadOut struct { - AccessToken NullableString `json:"accessToken,omitempty"` - Error NullableString `json:"error,omitempty"` - RefreshToken NullableString `json:"refreshToken,omitempty"` + AccessToken *string `json:"accessToken,omitempty"` + Error *string `json:"error,omitempty"` + RefreshToken *string `json:"refreshToken,omitempty"` } // NewOAuthPayloadOut instantiates a new OAuthPayloadOut object @@ -41,130 +41,100 @@ func NewOAuthPayloadOutWithDefaults() *OAuthPayloadOut { return &this } -// GetAccessToken returns the AccessToken field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAccessToken returns the AccessToken field value if set, zero value otherwise. func (o *OAuthPayloadOut) GetAccessToken() string { - if o == nil || IsNil(o.AccessToken.Get()) { + if o == nil || IsNil(o.AccessToken) { var ret string return ret } - return *o.AccessToken.Get() + return *o.AccessToken } // GetAccessTokenOk returns a tuple with the AccessToken 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 *OAuthPayloadOut) GetAccessTokenOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.AccessToken) { return nil, false } - return o.AccessToken.Get(), o.AccessToken.IsSet() + return o.AccessToken, true } // HasAccessToken returns a boolean if a field has been set. func (o *OAuthPayloadOut) HasAccessToken() bool { - if o != nil && o.AccessToken.IsSet() { + if o != nil && !IsNil(o.AccessToken) { return true } return false } -// SetAccessToken gets a reference to the given NullableString and assigns it to the AccessToken field. +// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. func (o *OAuthPayloadOut) SetAccessToken(v string) { - o.AccessToken.Set(&v) -} -// SetAccessTokenNil sets the value for AccessToken to be an explicit nil -func (o *OAuthPayloadOut) SetAccessTokenNil() { - o.AccessToken.Set(nil) -} - -// UnsetAccessToken ensures that no value is present for AccessToken, not even an explicit nil -func (o *OAuthPayloadOut) UnsetAccessToken() { - o.AccessToken.Unset() + o.AccessToken = &v } -// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +// GetError returns the Error field value if set, zero value otherwise. func (o *OAuthPayloadOut) GetError() string { - if o == nil || IsNil(o.Error.Get()) { + if o == nil || IsNil(o.Error) { var ret string return ret } - return *o.Error.Get() + 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. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuthPayloadOut) GetErrorOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Error) { return nil, false } - return o.Error.Get(), o.Error.IsSet() + return o.Error, true } // HasError returns a boolean if a field has been set. func (o *OAuthPayloadOut) HasError() bool { - if o != nil && o.Error.IsSet() { + if o != nil && !IsNil(o.Error) { return true } return false } -// SetError gets a reference to the given NullableString and assigns it to the Error field. +// SetError gets a reference to the given string and assigns it to the Error field. func (o *OAuthPayloadOut) SetError(v string) { - o.Error.Set(&v) -} -// SetErrorNil sets the value for Error to be an explicit nil -func (o *OAuthPayloadOut) SetErrorNil() { - o.Error.Set(nil) + o.Error = &v } -// UnsetError ensures that no value is present for Error, not even an explicit nil -func (o *OAuthPayloadOut) UnsetError() { - o.Error.Unset() -} - -// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. func (o *OAuthPayloadOut) GetRefreshToken() string { - if o == nil || IsNil(o.RefreshToken.Get()) { + if o == nil || IsNil(o.RefreshToken) { var ret string return ret } - return *o.RefreshToken.Get() + return *o.RefreshToken } // GetRefreshTokenOk returns a tuple with the RefreshToken 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 *OAuthPayloadOut) GetRefreshTokenOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.RefreshToken) { return nil, false } - return o.RefreshToken.Get(), o.RefreshToken.IsSet() + return o.RefreshToken, true } // HasRefreshToken returns a boolean if a field has been set. func (o *OAuthPayloadOut) HasRefreshToken() bool { - if o != nil && o.RefreshToken.IsSet() { + if o != nil && !IsNil(o.RefreshToken) { return true } return false } -// SetRefreshToken gets a reference to the given NullableString and assigns it to the RefreshToken field. +// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. func (o *OAuthPayloadOut) SetRefreshToken(v string) { - o.RefreshToken.Set(&v) -} -// SetRefreshTokenNil sets the value for RefreshToken to be an explicit nil -func (o *OAuthPayloadOut) SetRefreshTokenNil() { - o.RefreshToken.Set(nil) -} - -// UnsetRefreshToken ensures that no value is present for RefreshToken, not even an explicit nil -func (o *OAuthPayloadOut) UnsetRefreshToken() { - o.RefreshToken.Unset() + o.RefreshToken = &v } func (o OAuthPayloadOut) MarshalJSON() ([]byte, error) { @@ -177,14 +147,14 @@ func (o OAuthPayloadOut) MarshalJSON() ([]byte, error) { func (o OAuthPayloadOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.AccessToken.IsSet() { - toSerialize["accessToken"] = o.AccessToken.Get() + if !IsNil(o.AccessToken) { + toSerialize["accessToken"] = o.AccessToken } - if o.Error.IsSet() { - toSerialize["error"] = o.Error.Get() + if !IsNil(o.Error) { + toSerialize["error"] = o.Error } - if o.RefreshToken.IsSet() { - toSerialize["refreshToken"] = o.RefreshToken.Get() + if !IsNil(o.RefreshToken) { + toSerialize["refreshToken"] = o.RefreshToken } return toSerialize, nil } diff --git a/go/internal/openapi/model_operational_webhook_endpoint_in.go b/go/internal/openapi/model_operational_webhook_endpoint_in.go index c0ad246c1..2e0fffeea 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_in.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_in.go @@ -25,11 +25,11 @@ type OperationalWebhookEndpointIn struct { Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24. - Secret NullableString `json:"secret,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` + Secret *string `json:"secret,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` } @@ -125,9 +125,9 @@ func (o *OperationalWebhookEndpointIn) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *OperationalWebhookEndpointIn) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -136,7 +136,6 @@ func (o *OperationalWebhookEndpointIn) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *OperationalWebhookEndpointIn) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -190,130 +189,100 @@ func (o *OperationalWebhookEndpointIn) SetMetadata(v map[string]string) { o.Metadata = &v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *OperationalWebhookEndpointIn) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *OperationalWebhookEndpointIn) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *OperationalWebhookEndpointIn) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *OperationalWebhookEndpointIn) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *OperationalWebhookEndpointIn) SetRateLimitNil() { - o.RateLimit.Set(nil) + o.RateLimit = &v } -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *OperationalWebhookEndpointIn) UnsetRateLimit() { - o.RateLimit.Unset() -} - -// GetSecret returns the Secret field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSecret returns the Secret field value if set, zero value otherwise. func (o *OperationalWebhookEndpointIn) GetSecret() string { - if o == nil || IsNil(o.Secret.Get()) { + if o == nil || IsNil(o.Secret) { var ret string return ret } - return *o.Secret.Get() + return *o.Secret } // GetSecretOk returns a tuple with the Secret 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 *OperationalWebhookEndpointIn) GetSecretOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Secret) { return nil, false } - return o.Secret.Get(), o.Secret.IsSet() + return o.Secret, true } // HasSecret returns a boolean if a field has been set. func (o *OperationalWebhookEndpointIn) HasSecret() bool { - if o != nil && o.Secret.IsSet() { + if o != nil && !IsNil(o.Secret) { return true } return false } -// SetSecret gets a reference to the given NullableString and assigns it to the Secret field. +// SetSecret gets a reference to the given string and assigns it to the Secret field. func (o *OperationalWebhookEndpointIn) SetSecret(v string) { - o.Secret.Set(&v) -} -// SetSecretNil sets the value for Secret to be an explicit nil -func (o *OperationalWebhookEndpointIn) SetSecretNil() { - o.Secret.Set(nil) -} - -// UnsetSecret ensures that no value is present for Secret, not even an explicit nil -func (o *OperationalWebhookEndpointIn) UnsetSecret() { - o.Secret.Unset() + o.Secret = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *OperationalWebhookEndpointIn) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *OperationalWebhookEndpointIn) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *OperationalWebhookEndpointIn) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *OperationalWebhookEndpointIn) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *OperationalWebhookEndpointIn) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *OperationalWebhookEndpointIn) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUrl returns the Url field value @@ -356,20 +325,20 @@ func (o OperationalWebhookEndpointIn) ToMap() (map[string]interface{}, error) { if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } if !IsNil(o.Metadata) { toSerialize["metadata"] = o.Metadata } - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Secret.IsSet() { - toSerialize["secret"] = o.Secret.Get() + if !IsNil(o.Secret) { + toSerialize["secret"] = o.Secret } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["url"] = o.Url return toSerialize, nil diff --git a/go/internal/openapi/model_operational_webhook_endpoint_out.go b/go/internal/openapi/model_operational_webhook_endpoint_out.go index 88d240ee9..5871a8ef3 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_out.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_out.go @@ -30,9 +30,9 @@ type OperationalWebhookEndpointOut struct { // The ep's ID Id string `json:"id"` Metadata map[string]string `json:"metadata"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` Url string `json:"url"` } @@ -146,9 +146,9 @@ func (o *OperationalWebhookEndpointOut) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *OperationalWebhookEndpointOut) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -157,7 +157,6 @@ func (o *OperationalWebhookEndpointOut) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *OperationalWebhookEndpointOut) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -227,88 +226,68 @@ func (o *OperationalWebhookEndpointOut) SetMetadata(v map[string]string) { o.Metadata = v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *OperationalWebhookEndpointOut) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *OperationalWebhookEndpointOut) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *OperationalWebhookEndpointOut) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *OperationalWebhookEndpointOut) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *OperationalWebhookEndpointOut) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *OperationalWebhookEndpointOut) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *OperationalWebhookEndpointOut) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *OperationalWebhookEndpointOut) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *OperationalWebhookEndpointOut) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *OperationalWebhookEndpointOut) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *OperationalWebhookEndpointOut) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *OperationalWebhookEndpointOut) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUpdatedAt returns the UpdatedAt field value @@ -374,16 +353,16 @@ func (o OperationalWebhookEndpointOut) ToMap() (map[string]interface{}, error) { if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } toSerialize["id"] = o.Id toSerialize["metadata"] = o.Metadata - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["updatedAt"] = o.UpdatedAt toSerialize["url"] = o.Url diff --git a/go/internal/openapi/model_operational_webhook_endpoint_secret_in.go b/go/internal/openapi/model_operational_webhook_endpoint_secret_in.go index c72128ec2..2e3a5985b 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_secret_in.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_secret_in.go @@ -20,7 +20,7 @@ var _ MappedNullable = &OperationalWebhookEndpointSecretIn{} // OperationalWebhookEndpointSecretIn struct for OperationalWebhookEndpointSecretIn type OperationalWebhookEndpointSecretIn struct { // The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24. - Key NullableString `json:"key,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` + Key *string `json:"key,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` } // NewOperationalWebhookEndpointSecretIn instantiates a new OperationalWebhookEndpointSecretIn object @@ -40,46 +40,36 @@ func NewOperationalWebhookEndpointSecretInWithDefaults() *OperationalWebhookEndp return &this } -// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +// GetKey returns the Key field value if set, zero value otherwise. func (o *OperationalWebhookEndpointSecretIn) GetKey() string { - if o == nil || IsNil(o.Key.Get()) { + if o == nil || IsNil(o.Key) { var ret string return ret } - return *o.Key.Get() + return *o.Key } // GetKeyOk returns a tuple with the Key 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 *OperationalWebhookEndpointSecretIn) GetKeyOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Key) { return nil, false } - return o.Key.Get(), o.Key.IsSet() + return o.Key, true } // HasKey returns a boolean if a field has been set. func (o *OperationalWebhookEndpointSecretIn) HasKey() bool { - if o != nil && o.Key.IsSet() { + if o != nil && !IsNil(o.Key) { return true } return false } -// SetKey gets a reference to the given NullableString and assigns it to the Key field. +// SetKey gets a reference to the given string and assigns it to the Key field. func (o *OperationalWebhookEndpointSecretIn) SetKey(v string) { - o.Key.Set(&v) -} -// SetKeyNil sets the value for Key to be an explicit nil -func (o *OperationalWebhookEndpointSecretIn) SetKeyNil() { - o.Key.Set(nil) -} - -// UnsetKey ensures that no value is present for Key, not even an explicit nil -func (o *OperationalWebhookEndpointSecretIn) UnsetKey() { - o.Key.Unset() + o.Key = &v } func (o OperationalWebhookEndpointSecretIn) MarshalJSON() ([]byte, error) { @@ -92,8 +82,8 @@ func (o OperationalWebhookEndpointSecretIn) MarshalJSON() ([]byte, error) { func (o OperationalWebhookEndpointSecretIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Key.IsSet() { - toSerialize["key"] = o.Key.Get() + if !IsNil(o.Key) { + toSerialize["key"] = o.Key } return toSerialize, nil } diff --git a/go/internal/openapi/model_operational_webhook_endpoint_update.go b/go/internal/openapi/model_operational_webhook_endpoint_update.go index a14925059..f9a4774d6 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_update.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_update.go @@ -25,9 +25,9 @@ type OperationalWebhookEndpointUpdate struct { Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` - RateLimit NullableInt32 `json:"rateLimit,omitempty"` + RateLimit *int32 `json:"rateLimit,omitempty"` // Optional unique identifier for the endpoint - Uid NullableString `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` } @@ -123,9 +123,9 @@ func (o *OperationalWebhookEndpointUpdate) SetDisabled(v bool) { o.Disabled = &v } -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *OperationalWebhookEndpointUpdate) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -134,7 +134,6 @@ func (o *OperationalWebhookEndpointUpdate) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *OperationalWebhookEndpointUpdate) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -188,88 +187,68 @@ func (o *OperationalWebhookEndpointUpdate) SetMetadata(v map[string]string) { o.Metadata = &v } -// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +// GetRateLimit returns the RateLimit field value if set, zero value otherwise. func (o *OperationalWebhookEndpointUpdate) GetRateLimit() int32 { - if o == nil || IsNil(o.RateLimit.Get()) { + if o == nil || IsNil(o.RateLimit) { var ret int32 return ret } - return *o.RateLimit.Get() + return *o.RateLimit } // GetRateLimitOk returns a tuple with the RateLimit 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 *OperationalWebhookEndpointUpdate) GetRateLimitOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.RateLimit) { return nil, false } - return o.RateLimit.Get(), o.RateLimit.IsSet() + return o.RateLimit, true } // HasRateLimit returns a boolean if a field has been set. func (o *OperationalWebhookEndpointUpdate) HasRateLimit() bool { - if o != nil && o.RateLimit.IsSet() { + if o != nil && !IsNil(o.RateLimit) { return true } return false } -// SetRateLimit gets a reference to the given NullableInt32 and assigns it to the RateLimit field. +// SetRateLimit gets a reference to the given int32 and assigns it to the RateLimit field. func (o *OperationalWebhookEndpointUpdate) SetRateLimit(v int32) { - o.RateLimit.Set(&v) -} -// SetRateLimitNil sets the value for RateLimit to be an explicit nil -func (o *OperationalWebhookEndpointUpdate) SetRateLimitNil() { - o.RateLimit.Set(nil) -} - -// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil -func (o *OperationalWebhookEndpointUpdate) UnsetRateLimit() { - o.RateLimit.Unset() + o.RateLimit = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *OperationalWebhookEndpointUpdate) GetUid() string { - if o == nil || IsNil(o.Uid.Get()) { + if o == nil || IsNil(o.Uid) { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid 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 *OperationalWebhookEndpointUpdate) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Uid) { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *OperationalWebhookEndpointUpdate) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && !IsNil(o.Uid) { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *OperationalWebhookEndpointUpdate) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *OperationalWebhookEndpointUpdate) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *OperationalWebhookEndpointUpdate) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUrl returns the Url field value @@ -312,17 +291,17 @@ func (o OperationalWebhookEndpointUpdate) ToMap() (map[string]interface{}, error if !IsNil(o.Disabled) { toSerialize["disabled"] = o.Disabled } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } if !IsNil(o.Metadata) { toSerialize["metadata"] = o.Metadata } - if o.RateLimit.IsSet() { - toSerialize["rateLimit"] = o.RateLimit.Get() + if !IsNil(o.RateLimit) { + toSerialize["rateLimit"] = o.RateLimit } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if !IsNil(o.Uid) { + toSerialize["uid"] = o.Uid } toSerialize["url"] = o.Url return toSerialize, nil diff --git a/go/internal/openapi/model_recover_in.go b/go/internal/openapi/model_recover_in.go index 11531bf27..5cf4e1ab3 100644 --- a/go/internal/openapi/model_recover_in.go +++ b/go/internal/openapi/model_recover_in.go @@ -23,7 +23,7 @@ var _ MappedNullable = &RecoverIn{} // RecoverIn struct for RecoverIn type RecoverIn struct { Since time.Time `json:"since"` - Until NullableTime `json:"until,omitempty"` + Until *time.Time `json:"until,omitempty"` } type _RecoverIn RecoverIn @@ -70,46 +70,36 @@ func (o *RecoverIn) SetSince(v time.Time) { o.Since = v } -// GetUntil returns the Until field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUntil returns the Until field value if set, zero value otherwise. func (o *RecoverIn) GetUntil() time.Time { - if o == nil || IsNil(o.Until.Get()) { + if o == nil || IsNil(o.Until) { var ret time.Time return ret } - return *o.Until.Get() + return *o.Until } // GetUntilOk returns a tuple with the Until 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 *RecoverIn) GetUntilOk() (*time.Time, bool) { - if o == nil { + if o == nil || IsNil(o.Until) { return nil, false } - return o.Until.Get(), o.Until.IsSet() + return o.Until, true } // HasUntil returns a boolean if a field has been set. func (o *RecoverIn) HasUntil() bool { - if o != nil && o.Until.IsSet() { + if o != nil && !IsNil(o.Until) { return true } return false } -// SetUntil gets a reference to the given NullableTime and assigns it to the Until field. +// SetUntil gets a reference to the given time.Time and assigns it to the Until field. func (o *RecoverIn) SetUntil(v time.Time) { - o.Until.Set(&v) -} -// SetUntilNil sets the value for Until to be an explicit nil -func (o *RecoverIn) SetUntilNil() { - o.Until.Set(nil) -} - -// UnsetUntil ensures that no value is present for Until, not even an explicit nil -func (o *RecoverIn) UnsetUntil() { - o.Until.Unset() + o.Until = &v } func (o RecoverIn) MarshalJSON() ([]byte, error) { @@ -123,8 +113,8 @@ func (o RecoverIn) MarshalJSON() ([]byte, error) { func (o RecoverIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["since"] = o.Since - if o.Until.IsSet() { - toSerialize["until"] = o.Until.Get() + if !IsNil(o.Until) { + toSerialize["until"] = o.Until } return toSerialize, nil } diff --git a/go/internal/openapi/model_redshift_config.go b/go/internal/openapi/model_redshift_config.go index 8cfb7b34d..c2ffb580b 100644 --- a/go/internal/openapi/model_redshift_config.go +++ b/go/internal/openapi/model_redshift_config.go @@ -28,7 +28,7 @@ type RedshiftConfig struct { DbUser string `json:"dbUser"` Region string `json:"region"` // Schema name. Only used if not using transformations. - SchemaName NullableString `json:"schemaName,omitempty"` + SchemaName *string `json:"schemaName,omitempty"` SecretAccessKey string `json:"secretAccessKey"` // Table name. Only required if not using transformations. TableName *string `json:"tableName,omitempty"` @@ -186,46 +186,36 @@ func (o *RedshiftConfig) SetRegion(v string) { o.Region = v } -// GetSchemaName returns the SchemaName field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSchemaName returns the SchemaName field value if set, zero value otherwise. func (o *RedshiftConfig) GetSchemaName() string { - if o == nil || IsNil(o.SchemaName.Get()) { + if o == nil || IsNil(o.SchemaName) { var ret string return ret } - return *o.SchemaName.Get() + return *o.SchemaName } // GetSchemaNameOk returns a tuple with the SchemaName 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 *RedshiftConfig) GetSchemaNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.SchemaName) { return nil, false } - return o.SchemaName.Get(), o.SchemaName.IsSet() + return o.SchemaName, true } // HasSchemaName returns a boolean if a field has been set. func (o *RedshiftConfig) HasSchemaName() bool { - if o != nil && o.SchemaName.IsSet() { + if o != nil && !IsNil(o.SchemaName) { return true } return false } -// SetSchemaName gets a reference to the given NullableString and assigns it to the SchemaName field. +// SetSchemaName gets a reference to the given string and assigns it to the SchemaName field. func (o *RedshiftConfig) SetSchemaName(v string) { - o.SchemaName.Set(&v) -} -// SetSchemaNameNil sets the value for SchemaName to be an explicit nil -func (o *RedshiftConfig) SetSchemaNameNil() { - o.SchemaName.Set(nil) -} - -// UnsetSchemaName ensures that no value is present for SchemaName, not even an explicit nil -func (o *RedshiftConfig) UnsetSchemaName() { - o.SchemaName.Unset() + o.SchemaName = &v } // GetSecretAccessKey returns the SecretAccessKey field value @@ -301,8 +291,8 @@ func (o RedshiftConfig) ToMap() (map[string]interface{}, error) { } toSerialize["dbUser"] = o.DbUser toSerialize["region"] = o.Region - if o.SchemaName.IsSet() { - toSerialize["schemaName"] = o.SchemaName.Get() + if !IsNil(o.SchemaName) { + toSerialize["schemaName"] = o.SchemaName } toSerialize["secretAccessKey"] = o.SecretAccessKey if !IsNil(o.TableName) { diff --git a/go/internal/openapi/model_replay_in.go b/go/internal/openapi/model_replay_in.go index 6cb791d47..a9bcd6d2a 100644 --- a/go/internal/openapi/model_replay_in.go +++ b/go/internal/openapi/model_replay_in.go @@ -23,7 +23,7 @@ var _ MappedNullable = &ReplayIn{} // ReplayIn struct for ReplayIn type ReplayIn struct { Since time.Time `json:"since"` - Until NullableTime `json:"until,omitempty"` + Until *time.Time `json:"until,omitempty"` } type _ReplayIn ReplayIn @@ -70,46 +70,36 @@ func (o *ReplayIn) SetSince(v time.Time) { o.Since = v } -// GetUntil returns the Until field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUntil returns the Until field value if set, zero value otherwise. func (o *ReplayIn) GetUntil() time.Time { - if o == nil || IsNil(o.Until.Get()) { + if o == nil || IsNil(o.Until) { var ret time.Time return ret } - return *o.Until.Get() + return *o.Until } // GetUntilOk returns a tuple with the Until 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 *ReplayIn) GetUntilOk() (*time.Time, bool) { - if o == nil { + if o == nil || IsNil(o.Until) { return nil, false } - return o.Until.Get(), o.Until.IsSet() + return o.Until, true } // HasUntil returns a boolean if a field has been set. func (o *ReplayIn) HasUntil() bool { - if o != nil && o.Until.IsSet() { + if o != nil && !IsNil(o.Until) { return true } return false } -// SetUntil gets a reference to the given NullableTime and assigns it to the Until field. +// SetUntil gets a reference to the given time.Time and assigns it to the Until field. func (o *ReplayIn) SetUntil(v time.Time) { - o.Until.Set(&v) -} -// SetUntilNil sets the value for Until to be an explicit nil -func (o *ReplayIn) SetUntilNil() { - o.Until.Set(nil) -} - -// UnsetUntil ensures that no value is present for Until, not even an explicit nil -func (o *ReplayIn) UnsetUntil() { - o.Until.Unset() + o.Until = &v } func (o ReplayIn) MarshalJSON() ([]byte, error) { @@ -123,8 +113,8 @@ func (o ReplayIn) MarshalJSON() ([]byte, error) { func (o ReplayIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["since"] = o.Since - if o.Until.IsSet() { - toSerialize["until"] = o.Until.Get() + if !IsNil(o.Until) { + toSerialize["until"] = o.Until } return toSerialize, nil } diff --git a/go/internal/openapi/model_sink_http_config.go b/go/internal/openapi/model_sink_http_config.go index cb79631ad..beb02c654 100644 --- a/go/internal/openapi/model_sink_http_config.go +++ b/go/internal/openapi/model_sink_http_config.go @@ -22,7 +22,7 @@ var _ MappedNullable = &SinkHttpConfig{} // SinkHttpConfig struct for SinkHttpConfig type SinkHttpConfig struct { Headers *map[string]string `json:"headers,omitempty"` - Key NullableString `json:"key,omitempty"` + Key *string `json:"key,omitempty"` Url string `json:"url"` } @@ -78,46 +78,36 @@ func (o *SinkHttpConfig) SetHeaders(v map[string]string) { o.Headers = &v } -// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +// GetKey returns the Key field value if set, zero value otherwise. func (o *SinkHttpConfig) GetKey() string { - if o == nil || IsNil(o.Key.Get()) { + if o == nil || IsNil(o.Key) { var ret string return ret } - return *o.Key.Get() + return *o.Key } // GetKeyOk returns a tuple with the Key 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 *SinkHttpConfig) GetKeyOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Key) { return nil, false } - return o.Key.Get(), o.Key.IsSet() + return o.Key, true } // HasKey returns a boolean if a field has been set. func (o *SinkHttpConfig) HasKey() bool { - if o != nil && o.Key.IsSet() { + if o != nil && !IsNil(o.Key) { return true } return false } -// SetKey gets a reference to the given NullableString and assigns it to the Key field. +// SetKey gets a reference to the given string and assigns it to the Key field. func (o *SinkHttpConfig) SetKey(v string) { - o.Key.Set(&v) -} -// SetKeyNil sets the value for Key to be an explicit nil -func (o *SinkHttpConfig) SetKeyNil() { - o.Key.Set(nil) -} - -// UnsetKey ensures that no value is present for Key, not even an explicit nil -func (o *SinkHttpConfig) UnsetKey() { - o.Key.Unset() + o.Key = &v } // GetUrl returns the Url field value @@ -157,8 +147,8 @@ func (o SinkHttpConfig) ToMap() (map[string]interface{}, error) { if !IsNil(o.Headers) { toSerialize["headers"] = o.Headers } - if o.Key.IsSet() { - toSerialize["key"] = o.Key.Get() + if !IsNil(o.Key) { + toSerialize["key"] = o.Key } toSerialize["url"] = o.Url return toSerialize, nil diff --git a/go/internal/openapi/model_sink_transform_in.go b/go/internal/openapi/model_sink_transform_in.go index 0134ef07b..97c366900 100644 --- a/go/internal/openapi/model_sink_transform_in.go +++ b/go/internal/openapi/model_sink_transform_in.go @@ -19,7 +19,7 @@ var _ MappedNullable = &SinkTransformIn{} // SinkTransformIn struct for SinkTransformIn type SinkTransformIn struct { - Code NullableString `json:"code,omitempty"` + Code *string `json:"code,omitempty"` Enabled *bool `json:"enabled,omitempty"` } @@ -40,46 +40,36 @@ func NewSinkTransformInWithDefaults() *SinkTransformIn { return &this } -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCode returns the Code field value if set, zero value otherwise. func (o *SinkTransformIn) GetCode() string { - if o == nil || IsNil(o.Code.Get()) { + if o == nil || IsNil(o.Code) { var ret string return ret } - return *o.Code.Get() + return *o.Code } // GetCodeOk returns a tuple with the Code 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 *SinkTransformIn) GetCodeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Code) { return nil, false } - return o.Code.Get(), o.Code.IsSet() + return o.Code, true } // HasCode returns a boolean if a field has been set. func (o *SinkTransformIn) HasCode() bool { - if o != nil && o.Code.IsSet() { + if o != nil && !IsNil(o.Code) { return true } return false } -// SetCode gets a reference to the given NullableString and assigns it to the Code field. +// SetCode gets a reference to the given string and assigns it to the Code field. func (o *SinkTransformIn) SetCode(v string) { - o.Code.Set(&v) -} -// SetCodeNil sets the value for Code to be an explicit nil -func (o *SinkTransformIn) SetCodeNil() { - o.Code.Set(nil) -} - -// UnsetCode ensures that no value is present for Code, not even an explicit nil -func (o *SinkTransformIn) UnsetCode() { - o.Code.Unset() + o.Code = &v } // GetEnabled returns the Enabled field value if set, zero value otherwise. @@ -124,8 +114,8 @@ func (o SinkTransformIn) MarshalJSON() ([]byte, error) { func (o SinkTransformIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Code.IsSet() { - toSerialize["code"] = o.Code.Get() + if !IsNil(o.Code) { + toSerialize["code"] = o.Code } if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled diff --git a/go/internal/openapi/model_sink_transformation_out.go b/go/internal/openapi/model_sink_transformation_out.go index 99c30b8e1..85661009f 100644 --- a/go/internal/openapi/model_sink_transformation_out.go +++ b/go/internal/openapi/model_sink_transformation_out.go @@ -19,7 +19,7 @@ var _ MappedNullable = &SinkTransformationOut{} // SinkTransformationOut struct for SinkTransformationOut type SinkTransformationOut struct { - Code NullableString `json:"code,omitempty"` + Code *string `json:"code,omitempty"` Enabled *bool `json:"enabled,omitempty"` } @@ -44,46 +44,36 @@ func NewSinkTransformationOutWithDefaults() *SinkTransformationOut { return &this } -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +// GetCode returns the Code field value if set, zero value otherwise. func (o *SinkTransformationOut) GetCode() string { - if o == nil || IsNil(o.Code.Get()) { + if o == nil || IsNil(o.Code) { var ret string return ret } - return *o.Code.Get() + return *o.Code } // GetCodeOk returns a tuple with the Code 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 *SinkTransformationOut) GetCodeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Code) { return nil, false } - return o.Code.Get(), o.Code.IsSet() + return o.Code, true } // HasCode returns a boolean if a field has been set. func (o *SinkTransformationOut) HasCode() bool { - if o != nil && o.Code.IsSet() { + if o != nil && !IsNil(o.Code) { return true } return false } -// SetCode gets a reference to the given NullableString and assigns it to the Code field. +// SetCode gets a reference to the given string and assigns it to the Code field. func (o *SinkTransformationOut) SetCode(v string) { - o.Code.Set(&v) -} -// SetCodeNil sets the value for Code to be an explicit nil -func (o *SinkTransformationOut) SetCodeNil() { - o.Code.Set(nil) -} - -// UnsetCode ensures that no value is present for Code, not even an explicit nil -func (o *SinkTransformationOut) UnsetCode() { - o.Code.Unset() + o.Code = &v } // GetEnabled returns the Enabled field value if set, zero value otherwise. @@ -128,8 +118,8 @@ func (o SinkTransformationOut) MarshalJSON() ([]byte, error) { func (o SinkTransformationOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Code.IsSet() { - toSerialize["code"] = o.Code.Get() + if !IsNil(o.Code) { + toSerialize["code"] = o.Code } if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled diff --git a/go/internal/openapi/model_stream_event_type_in.go b/go/internal/openapi/model_stream_event_type_in.go index 709882920..e53120182 100644 --- a/go/internal/openapi/model_stream_event_type_in.go +++ b/go/internal/openapi/model_stream_event_type_in.go @@ -21,7 +21,7 @@ var _ MappedNullable = &StreamEventTypeIn{} // StreamEventTypeIn struct for StreamEventTypeIn type StreamEventTypeIn struct { - Description NullableString `json:"description,omitempty"` + Description *string `json:"description,omitempty"` // The event type's name Name string `json:"name" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` } @@ -46,46 +46,36 @@ func NewStreamEventTypeInWithDefaults() *StreamEventTypeIn { return &this } -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDescription returns the Description field value if set, zero value otherwise. func (o *StreamEventTypeIn) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.Description.Get() + return *o.Description } // GetDescriptionOk returns a tuple with the Description 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 *StreamEventTypeIn) GetDescriptionOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Description) { return nil, false } - return o.Description.Get(), o.Description.IsSet() + return o.Description, true } // HasDescription returns a boolean if a field has been set. func (o *StreamEventTypeIn) HasDescription() bool { - if o != nil && o.Description.IsSet() { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *StreamEventTypeIn) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *StreamEventTypeIn) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *StreamEventTypeIn) UnsetDescription() { - o.Description.Unset() + o.Description = &v } // GetName returns the Name field value @@ -122,8 +112,8 @@ func (o StreamEventTypeIn) MarshalJSON() ([]byte, error) { func (o StreamEventTypeIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() + if !IsNil(o.Description) { + toSerialize["description"] = o.Description } toSerialize["name"] = o.Name return toSerialize, nil diff --git a/go/internal/openapi/model_stream_event_type_out.go b/go/internal/openapi/model_stream_event_type_out.go index e415bad01..74fdb730a 100644 --- a/go/internal/openapi/model_stream_event_type_out.go +++ b/go/internal/openapi/model_stream_event_type_out.go @@ -23,7 +23,7 @@ var _ MappedNullable = &StreamEventTypeOut{} // StreamEventTypeOut struct for StreamEventTypeOut type StreamEventTypeOut struct { CreatedAt time.Time `json:"createdAt"` - Description NullableString `json:"description,omitempty"` + Description *string `json:"description,omitempty"` // The event type's name Name string `json:"name" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` @@ -75,46 +75,36 @@ func (o *StreamEventTypeOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDescription returns the Description field value if set, zero value otherwise. func (o *StreamEventTypeOut) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.Description.Get() + return *o.Description } // GetDescriptionOk returns a tuple with the Description 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 *StreamEventTypeOut) GetDescriptionOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Description) { return nil, false } - return o.Description.Get(), o.Description.IsSet() + return o.Description, true } // HasDescription returns a boolean if a field has been set. func (o *StreamEventTypeOut) HasDescription() bool { - if o != nil && o.Description.IsSet() { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *StreamEventTypeOut) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *StreamEventTypeOut) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *StreamEventTypeOut) UnsetDescription() { - o.Description.Unset() + o.Description = &v } // GetName returns the Name field value @@ -176,8 +166,8 @@ func (o StreamEventTypeOut) MarshalJSON() ([]byte, error) { func (o StreamEventTypeOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["createdAt"] = o.CreatedAt - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() + if !IsNil(o.Description) { + toSerialize["description"] = o.Description } toSerialize["name"] = o.Name toSerialize["updatedAt"] = o.UpdatedAt diff --git a/go/internal/openapi/model_stream_out.go b/go/internal/openapi/model_stream_out.go index 4b96e18e6..771355de1 100644 --- a/go/internal/openapi/model_stream_out.go +++ b/go/internal/openapi/model_stream_out.go @@ -23,7 +23,7 @@ var _ MappedNullable = &StreamOut{} // StreamOut struct for StreamOut type StreamOut struct { CreatedAt time.Time `json:"createdAt"` - Description NullableString `json:"description,omitempty"` + Description *string `json:"description,omitempty"` Id string `json:"id"` Uid *string `json:"uid,omitempty" validate:"regexp=^(?!strm_)[a-zA-Z0-9_-]+$"` UpdatedAt time.Time `json:"updatedAt"` @@ -75,46 +75,36 @@ func (o *StreamOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDescription returns the Description field value if set, zero value otherwise. func (o *StreamOut) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.Description.Get() + return *o.Description } // GetDescriptionOk returns a tuple with the Description 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 *StreamOut) GetDescriptionOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Description) { return nil, false } - return o.Description.Get(), o.Description.IsSet() + return o.Description, true } // HasDescription returns a boolean if a field has been set. func (o *StreamOut) HasDescription() bool { - if o != nil && o.Description.IsSet() { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *StreamOut) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *StreamOut) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *StreamOut) UnsetDescription() { - o.Description.Unset() + o.Description = &v } // GetId returns the Id field value @@ -208,8 +198,8 @@ func (o StreamOut) MarshalJSON() ([]byte, error) { func (o StreamOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["createdAt"] = o.CreatedAt - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() + if !IsNil(o.Description) { + toSerialize["description"] = o.Description } toSerialize["id"] = o.Id if !IsNil(o.Uid) { diff --git a/go/internal/openapi/model_template_in.go b/go/internal/openapi/model_template_in.go index 5e73e95a1..b969c2404 100644 --- a/go/internal/openapi/model_template_in.go +++ b/go/internal/openapi/model_template_in.go @@ -22,10 +22,10 @@ var _ MappedNullable = &TemplateIn{} // TemplateIn struct for TemplateIn type TemplateIn struct { Description *string `json:"description,omitempty"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` FilterTypes []string `json:"filterTypes,omitempty"` Instructions *string `json:"instructions,omitempty"` - InstructionsLink NullableString `json:"instructionsLink,omitempty"` + InstructionsLink *string `json:"instructionsLink,omitempty"` Kind *TransformationTemplateKind `json:"kind,omitempty"` Logo string `json:"logo"` Name string `json:"name"` @@ -94,51 +94,41 @@ func (o *TemplateIn) SetDescription(v string) { o.Description = &v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *TemplateIn) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *TemplateIn) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *TemplateIn) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *TemplateIn) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *TemplateIn) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *TemplateIn) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *TemplateIn) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -147,7 +137,6 @@ func (o *TemplateIn) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *TemplateIn) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -201,46 +190,36 @@ func (o *TemplateIn) SetInstructions(v string) { o.Instructions = &v } -// GetInstructionsLink returns the InstructionsLink field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInstructionsLink returns the InstructionsLink field value if set, zero value otherwise. func (o *TemplateIn) GetInstructionsLink() string { - if o == nil || IsNil(o.InstructionsLink.Get()) { + if o == nil || IsNil(o.InstructionsLink) { var ret string return ret } - return *o.InstructionsLink.Get() + return *o.InstructionsLink } // GetInstructionsLinkOk returns a tuple with the InstructionsLink 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 *TemplateIn) GetInstructionsLinkOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.InstructionsLink) { return nil, false } - return o.InstructionsLink.Get(), o.InstructionsLink.IsSet() + return o.InstructionsLink, true } // HasInstructionsLink returns a boolean if a field has been set. func (o *TemplateIn) HasInstructionsLink() bool { - if o != nil && o.InstructionsLink.IsSet() { + if o != nil && !IsNil(o.InstructionsLink) { return true } return false } -// SetInstructionsLink gets a reference to the given NullableString and assigns it to the InstructionsLink field. +// SetInstructionsLink gets a reference to the given string and assigns it to the InstructionsLink field. func (o *TemplateIn) SetInstructionsLink(v string) { - o.InstructionsLink.Set(&v) -} -// SetInstructionsLinkNil sets the value for InstructionsLink to be an explicit nil -func (o *TemplateIn) SetInstructionsLinkNil() { - o.InstructionsLink.Set(nil) -} - -// UnsetInstructionsLink ensures that no value is present for InstructionsLink, not even an explicit nil -func (o *TemplateIn) UnsetInstructionsLink() { - o.InstructionsLink.Unset() + o.InstructionsLink = &v } // GetKind returns the Kind field value if set, zero value otherwise. @@ -360,17 +339,17 @@ func (o TemplateIn) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } if !IsNil(o.Instructions) { toSerialize["instructions"] = o.Instructions } - if o.InstructionsLink.IsSet() { - toSerialize["instructionsLink"] = o.InstructionsLink.Get() + if !IsNil(o.InstructionsLink) { + toSerialize["instructionsLink"] = o.InstructionsLink } if !IsNil(o.Kind) { toSerialize["kind"] = o.Kind diff --git a/go/internal/openapi/model_template_out.go b/go/internal/openapi/model_template_out.go index fa0417af3..d2231da1c 100644 --- a/go/internal/openapi/model_template_out.go +++ b/go/internal/openapi/model_template_out.go @@ -24,11 +24,11 @@ var _ MappedNullable = &TemplateOut{} type TemplateOut struct { CreatedAt time.Time `json:"createdAt"` Description string `json:"description"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` FilterTypes []string `json:"filterTypes,omitempty"` Id string `json:"id"` Instructions string `json:"instructions"` - InstructionsLink NullableString `json:"instructionsLink,omitempty"` + InstructionsLink *string `json:"instructionsLink,omitempty"` Kind TransformationTemplateKind `json:"kind"` Logo string `json:"logo"` Name string `json:"name"` @@ -114,51 +114,41 @@ func (o *TemplateOut) SetDescription(v string) { o.Description = v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *TemplateOut) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *TemplateOut) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *TemplateOut) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *TemplateOut) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *TemplateOut) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *TemplateOut) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *TemplateOut) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -167,7 +157,6 @@ func (o *TemplateOut) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *TemplateOut) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -237,46 +226,36 @@ func (o *TemplateOut) SetInstructions(v string) { o.Instructions = v } -// GetInstructionsLink returns the InstructionsLink field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInstructionsLink returns the InstructionsLink field value if set, zero value otherwise. func (o *TemplateOut) GetInstructionsLink() string { - if o == nil || IsNil(o.InstructionsLink.Get()) { + if o == nil || IsNil(o.InstructionsLink) { var ret string return ret } - return *o.InstructionsLink.Get() + return *o.InstructionsLink } // GetInstructionsLinkOk returns a tuple with the InstructionsLink 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 *TemplateOut) GetInstructionsLinkOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.InstructionsLink) { return nil, false } - return o.InstructionsLink.Get(), o.InstructionsLink.IsSet() + return o.InstructionsLink, true } // HasInstructionsLink returns a boolean if a field has been set. func (o *TemplateOut) HasInstructionsLink() bool { - if o != nil && o.InstructionsLink.IsSet() { + if o != nil && !IsNil(o.InstructionsLink) { return true } return false } -// SetInstructionsLink gets a reference to the given NullableString and assigns it to the InstructionsLink field. +// SetInstructionsLink gets a reference to the given string and assigns it to the InstructionsLink field. func (o *TemplateOut) SetInstructionsLink(v string) { - o.InstructionsLink.Set(&v) -} -// SetInstructionsLinkNil sets the value for InstructionsLink to be an explicit nil -func (o *TemplateOut) SetInstructionsLinkNil() { - o.InstructionsLink.Set(nil) -} - -// UnsetInstructionsLink ensures that no value is present for InstructionsLink, not even an explicit nil -func (o *TemplateOut) UnsetInstructionsLink() { - o.InstructionsLink.Unset() + o.InstructionsLink = &v } // GetKind returns the Kind field value @@ -435,16 +414,16 @@ func (o TemplateOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["createdAt"] = o.CreatedAt toSerialize["description"] = o.Description - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } toSerialize["id"] = o.Id toSerialize["instructions"] = o.Instructions - if o.InstructionsLink.IsSet() { - toSerialize["instructionsLink"] = o.InstructionsLink.Get() + if !IsNil(o.InstructionsLink) { + toSerialize["instructionsLink"] = o.InstructionsLink } toSerialize["kind"] = o.Kind toSerialize["logo"] = o.Logo diff --git a/go/internal/openapi/model_template_update.go b/go/internal/openapi/model_template_update.go index a150c011f..9001fd1f1 100644 --- a/go/internal/openapi/model_template_update.go +++ b/go/internal/openapi/model_template_update.go @@ -22,10 +22,10 @@ var _ MappedNullable = &TemplateUpdate{} // TemplateUpdate struct for TemplateUpdate type TemplateUpdate struct { Description *string `json:"description,omitempty"` - FeatureFlag NullableString `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` + FeatureFlag *string `json:"featureFlag,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` FilterTypes []string `json:"filterTypes,omitempty"` Instructions *string `json:"instructions,omitempty"` - InstructionsLink NullableString `json:"instructionsLink,omitempty"` + InstructionsLink *string `json:"instructionsLink,omitempty"` Kind *TransformationTemplateKind `json:"kind,omitempty"` Logo string `json:"logo"` Name *string `json:"name,omitempty"` @@ -97,51 +97,41 @@ func (o *TemplateUpdate) SetDescription(v string) { o.Description = &v } -// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFeatureFlag returns the FeatureFlag field value if set, zero value otherwise. func (o *TemplateUpdate) GetFeatureFlag() string { - if o == nil || IsNil(o.FeatureFlag.Get()) { + if o == nil || IsNil(o.FeatureFlag) { var ret string return ret } - return *o.FeatureFlag.Get() + return *o.FeatureFlag } // GetFeatureFlagOk returns a tuple with the FeatureFlag 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 *TemplateUpdate) GetFeatureFlagOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.FeatureFlag) { return nil, false } - return o.FeatureFlag.Get(), o.FeatureFlag.IsSet() + return o.FeatureFlag, true } // HasFeatureFlag returns a boolean if a field has been set. func (o *TemplateUpdate) HasFeatureFlag() bool { - if o != nil && o.FeatureFlag.IsSet() { + if o != nil && !IsNil(o.FeatureFlag) { return true } return false } -// SetFeatureFlag gets a reference to the given NullableString and assigns it to the FeatureFlag field. +// SetFeatureFlag gets a reference to the given string and assigns it to the FeatureFlag field. func (o *TemplateUpdate) SetFeatureFlag(v string) { - o.FeatureFlag.Set(&v) -} -// SetFeatureFlagNil sets the value for FeatureFlag to be an explicit nil -func (o *TemplateUpdate) SetFeatureFlagNil() { - o.FeatureFlag.Set(nil) + o.FeatureFlag = &v } -// UnsetFeatureFlag ensures that no value is present for FeatureFlag, not even an explicit nil -func (o *TemplateUpdate) UnsetFeatureFlag() { - o.FeatureFlag.Unset() -} - -// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise (both if not set or set to explicit null). +// GetFilterTypes returns the FilterTypes field value if set, zero value otherwise. func (o *TemplateUpdate) GetFilterTypes() []string { - if o == nil { + if o == nil || IsNil(o.FilterTypes) { var ret []string return ret } @@ -150,7 +140,6 @@ func (o *TemplateUpdate) GetFilterTypes() []string { // GetFilterTypesOk returns a tuple with the FilterTypes 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 *TemplateUpdate) GetFilterTypesOk() ([]string, bool) { if o == nil || IsNil(o.FilterTypes) { return nil, false @@ -204,46 +193,36 @@ func (o *TemplateUpdate) SetInstructions(v string) { o.Instructions = &v } -// GetInstructionsLink returns the InstructionsLink field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInstructionsLink returns the InstructionsLink field value if set, zero value otherwise. func (o *TemplateUpdate) GetInstructionsLink() string { - if o == nil || IsNil(o.InstructionsLink.Get()) { + if o == nil || IsNil(o.InstructionsLink) { var ret string return ret } - return *o.InstructionsLink.Get() + return *o.InstructionsLink } // GetInstructionsLinkOk returns a tuple with the InstructionsLink 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 *TemplateUpdate) GetInstructionsLinkOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.InstructionsLink) { return nil, false } - return o.InstructionsLink.Get(), o.InstructionsLink.IsSet() + return o.InstructionsLink, true } // HasInstructionsLink returns a boolean if a field has been set. func (o *TemplateUpdate) HasInstructionsLink() bool { - if o != nil && o.InstructionsLink.IsSet() { + if o != nil && !IsNil(o.InstructionsLink) { return true } return false } -// SetInstructionsLink gets a reference to the given NullableString and assigns it to the InstructionsLink field. +// SetInstructionsLink gets a reference to the given string and assigns it to the InstructionsLink field. func (o *TemplateUpdate) SetInstructionsLink(v string) { - o.InstructionsLink.Set(&v) -} -// SetInstructionsLinkNil sets the value for InstructionsLink to be an explicit nil -func (o *TemplateUpdate) SetInstructionsLinkNil() { - o.InstructionsLink.Set(nil) -} - -// UnsetInstructionsLink ensures that no value is present for InstructionsLink, not even an explicit nil -func (o *TemplateUpdate) UnsetInstructionsLink() { - o.InstructionsLink.Unset() + o.InstructionsLink = &v } // GetKind returns the Kind field value if set, zero value otherwise. @@ -371,17 +350,17 @@ func (o TemplateUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.FeatureFlag.IsSet() { - toSerialize["featureFlag"] = o.FeatureFlag.Get() + if !IsNil(o.FeatureFlag) { + toSerialize["featureFlag"] = o.FeatureFlag } - if o.FilterTypes != nil { + if !IsNil(o.FilterTypes) { toSerialize["filterTypes"] = o.FilterTypes } if !IsNil(o.Instructions) { toSerialize["instructions"] = o.Instructions } - if o.InstructionsLink.IsSet() { - toSerialize["instructionsLink"] = o.InstructionsLink.Get() + if !IsNil(o.InstructionsLink) { + toSerialize["instructionsLink"] = o.InstructionsLink } if !IsNil(o.Kind) { toSerialize["kind"] = o.Kind diff --git a/go/internal/openapi/model_transformation_simulate_in.go b/go/internal/openapi/model_transformation_simulate_in.go index 6a0314f93..1fcdf39b1 100644 --- a/go/internal/openapi/model_transformation_simulate_in.go +++ b/go/internal/openapi/model_transformation_simulate_in.go @@ -50,9 +50,9 @@ func NewTransformationSimulateInWithDefaults() *TransformationSimulateIn { return &this } -// GetChannels returns the Channels field value if set, zero value otherwise (both if not set or set to explicit null). +// GetChannels returns the Channels field value if set, zero value otherwise. func (o *TransformationSimulateIn) GetChannels() []string { - if o == nil { + if o == nil || IsNil(o.Channels) { var ret []string return ret } @@ -61,7 +61,6 @@ func (o *TransformationSimulateIn) GetChannels() []string { // GetChannelsOk returns a tuple with the Channels 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 *TransformationSimulateIn) GetChannelsOk() ([]string, bool) { if o == nil || IsNil(o.Channels) { return nil, false @@ -165,7 +164,7 @@ func (o TransformationSimulateIn) MarshalJSON() ([]byte, error) { func (o TransformationSimulateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } toSerialize["code"] = o.Code diff --git a/go/svix_test.go b/go/svix_test.go index ceabe6e98..5e9d06ab8 100644 --- a/go/svix_test.go +++ b/go/svix_test.go @@ -3,11 +3,12 @@ package svix_test import ( "context" "errors" - svix "github.com/svix/svix-webhooks/go" "net/http" "net/url" "os" "testing" + + svix "github.com/svix/svix-webhooks/go" ) // Builds an API client for testing against an arbitrary API server with an arbitrary token. @@ -96,9 +97,8 @@ func TestKitchenSink(t *testing.T) { } func TestStaticNullableString(t *testing.T) { - app := &svix.ApplicationIn{ - Name: "test", - Uid: svix.StaticNullableString("my-uid"), + app := &svix.ApplicationPatch{ + Uid: svix.StaticNullableString("my-uid"), } if !app.Uid.IsSet() { diff --git a/regen_openapi.sh b/regen_openapi.sh index 0cc3b0be1..2482513f5 100755 --- a/regen_openapi.sh +++ b/regen_openapi.sh @@ -6,28 +6,13 @@ if [ -n "$1" ]; then curl "$1" | python -m json.tool > openapi.json fi -yarn openapi-generator-cli generate -i openapi.json -g typescript -o javascript/src/openapi -c javascript/openapi-generator-config.json --type-mappings=set=Array -t javascript/templates - -# Cleanup previous codegen, allowing us to spot removals. -# If the removals are expected, stage them eg. `git add -u`, then commit them. -rm -f go/internal/openapi/*.go -yarn openapi-generator-cli generate -i openapi.json -g go -o go/internal/openapi -c go/openapi-generator-config.json -t go/templates - - -yarn openapi-generator-cli generate -i openapi.json -g java -o java/lib/generated/openapi -c java/openapi-generator-config.json -t java/templates - -yarn openapi-generator-cli generate -i openapi.json -g kotlin -o kotlin/lib/generated/openapi -c kotlin/openapi-generator-config.json -t kotlin/templates - -yarn openapi-generator-cli generate -i openapi.json -g ruby -o ruby -c ruby/openapi-generator-config.json -t ruby/templates - -yarn openapi-generator-cli generate -i openapi.json -g csharp -o csharp/ -c csharp/openapi-generator-config.json --global-property apis,models,supportingFiles,apiTests=false,apiDocs=false,modelTests=false,modelDocs=false - -# For Rust, write a separate OpenAPI spec file where optional fields of -# non-`Patch` schemas are set to not be nullable, so the codegen doesn't wrap -# the Rust struct fields in double options. -# serde will respect both in deserialization anyways, but this frees users from -# having to think about the difference between absence of the field or setting -# it to `null` (which is only significant for patch request bodies). +# For some languages, write a separate OpenAPI spec file where optional fields +# of non-`Patch` schemas are set to not be nullable, so the codegen doesn't wrap +# the struct fields in double options. +# Rust's serde and Go's encoding/json will respect both in deserialization +# anyways, but this frees users from having to think about the difference +# between absence of the field or setting it to `null` (which is only +# significant for patch request bodies). jq --indent 4 '.components.schemas |= with_entries( if .key | endswith("Patch") then . else @@ -43,7 +28,24 @@ jq --indent 4 '.components.schemas |= with_entries( end )' \ < openapi.json \ + | tee go/openapi.json \ > rust/openapi.json + +yarn openapi-generator-cli generate -i openapi.json -g typescript -o javascript/src/openapi -c javascript/openapi-generator-config.json --type-mappings=set=Array -t javascript/templates + +# Cleanup previous codegen, allowing us to spot removals. +# If the removals are expected, stage them eg. `git add -u`, then commit them. +rm -f go/internal/openapi/*.go +yarn openapi-generator-cli generate -i go/openapi.json -g go -o go/internal/openapi -c go/openapi-generator-config.json -t go/templates + +yarn openapi-generator-cli generate -i openapi.json -g java -o java/lib/generated/openapi -c java/openapi-generator-config.json -t java/templates + +yarn openapi-generator-cli generate -i openapi.json -g kotlin -o kotlin/lib/generated/openapi -c kotlin/openapi-generator-config.json -t kotlin/templates + +yarn openapi-generator-cli generate -i openapi.json -g ruby -o ruby -c ruby/openapi-generator-config.json -t ruby/templates + +yarn openapi-generator-cli generate -i openapi.json -g csharp -o csharp/ -c csharp/openapi-generator-config.json --global-property apis,models,supportingFiles,apiTests=false,apiDocs=false,modelTests=false,modelDocs=false + yarn openapi-generator-cli generate -i rust/openapi.json -g rust -o rust/ -c rust/openapi-generator-config.json -t rust/templates echo Note: Python generation is not executed automatically.