diff --git a/services/dns/CHANGELOG.md b/services/dns/CHANGELOG.md index 214e8f9b..17e4daa2 100644 --- a/services/dns/CHANGELOG.md +++ b/services/dns/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.12.1 (2024-12-16) + +- **Bugfix:** Correctly handle nullable attributes in model types + ## v0.12.0 (2024-11-20) - **Feature:** New models `ZoneModelsImportRecordModel` and `ZoneModelsImportZoneJson` diff --git a/services/dns/model_clone_zone_payload.go b/services/dns/model_clone_zone_payload.go index 3e12e066..8963ccd4 100644 --- a/services/dns/model_clone_zone_payload.go +++ b/services/dns/model_clone_zone_payload.go @@ -116,7 +116,7 @@ func (o *CloneZonePayload) SetDescription(v *string) { // GetDnsName returns the DnsName field value func (o *CloneZonePayload) GetDnsName() *string { - if o == nil { + if o == nil || IsNil(o.DnsName) { var ret *string return ret } diff --git a/services/dns/model_create_label_payload.go b/services/dns/model_create_label_payload.go index adcfabcf..ffdb3b33 100644 --- a/services/dns/model_create_label_payload.go +++ b/services/dns/model_create_label_payload.go @@ -48,7 +48,7 @@ func NewCreateLabelPayloadWithDefaults() *CreateLabelPayload { // GetKey returns the Key field value func (o *CreateLabelPayload) GetKey() *string { - if o == nil { + if o == nil || IsNil(o.Key) { var ret *string return ret } @@ -72,7 +72,7 @@ func (o *CreateLabelPayload) SetKey(v *string) { // GetValue returns the Value field value func (o *CreateLabelPayload) GetValue() *string { - if o == nil { + if o == nil || IsNil(o.Value) { var ret *string return ret } diff --git a/services/dns/model_create_record_set_payload.go b/services/dns/model_create_record_set_payload.go index c5fd310f..8402f14a 100644 --- a/services/dns/model_create_record_set_payload.go +++ b/services/dns/model_create_record_set_payload.go @@ -90,7 +90,7 @@ func (o *CreateRecordSetPayload) SetComment(v *string) { // GetName returns the Name field value func (o *CreateRecordSetPayload) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } @@ -114,7 +114,7 @@ func (o *CreateRecordSetPayload) SetName(v *string) { // GetRecords returns the Records field value func (o *CreateRecordSetPayload) GetRecords() *[]RecordPayload { - if o == nil { + if o == nil || IsNil(o.Records) { var ret *[]RecordPayload return ret } @@ -170,7 +170,7 @@ func (o *CreateRecordSetPayload) SetTtl(v *int64) { // GetType returns the Type field value func (o *CreateRecordSetPayload) GetType() *string { - if o == nil { + if o == nil || IsNil(o.Type) { var ret *string return ret } diff --git a/services/dns/model_create_zone_payload.go b/services/dns/model_create_zone_payload.go index 8d2536e5..610cc5a4 100644 --- a/services/dns/model_create_zone_payload.go +++ b/services/dns/model_create_zone_payload.go @@ -216,7 +216,7 @@ func (o *CreateZonePayload) SetDescription(v *string) { // GetDnsName returns the DnsName field value func (o *CreateZonePayload) GetDnsName() *string { - if o == nil { + if o == nil || IsNil(o.DnsName) { var ret *string return ret } @@ -304,7 +304,7 @@ func (o *CreateZonePayload) SetIsReverseZone(v *bool) { // GetName returns the Name field value func (o *CreateZonePayload) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } diff --git a/services/dns/model_import_record_sets_response.go b/services/dns/model_import_record_sets_response.go index 9a45f419..ef7ebff7 100644 --- a/services/dns/model_import_record_sets_response.go +++ b/services/dns/model_import_record_sets_response.go @@ -78,7 +78,7 @@ func (o *ImportRecordSetsResponse) SetMessage(v *string) { // GetSummary returns the Summary field value func (o *ImportRecordSetsResponse) GetSummary() *ImportSummary { - if o == nil { + if o == nil || IsNil(o.Summary) { var ret *ImportSummary return ret } diff --git a/services/dns/model_label.go b/services/dns/model_label.go index d228500e..3d2a0fb0 100644 --- a/services/dns/model_label.go +++ b/services/dns/model_label.go @@ -48,7 +48,7 @@ func NewLabelWithDefaults() *Label { // GetKey returns the Key field value func (o *Label) GetKey() *string { - if o == nil { + if o == nil || IsNil(o.Key) { var ret *string return ret } @@ -72,7 +72,7 @@ func (o *Label) SetKey(v *string) { // GetValue returns the Value field value func (o *Label) GetValue() *string { - if o == nil { + if o == nil || IsNil(o.Value) { var ret *string return ret } diff --git a/services/dns/model_list_record_sets_response.go b/services/dns/model_list_record_sets_response.go index 36dec98e..f2e0c38f 100644 --- a/services/dns/model_list_record_sets_response.go +++ b/services/dns/model_list_record_sets_response.go @@ -55,7 +55,7 @@ func NewListRecordSetsResponseWithDefaults() *ListRecordSetsResponse { // GetItemsPerPage returns the ItemsPerPage field value func (o *ListRecordSetsResponse) GetItemsPerPage() *int64 { - if o == nil { + if o == nil || IsNil(o.ItemsPerPage) { var ret *int64 return ret } @@ -111,7 +111,7 @@ func (o *ListRecordSetsResponse) SetMessage(v *string) { // GetRrSets returns the RrSets field value func (o *ListRecordSetsResponse) GetRrSets() *[]RecordSet { - if o == nil { + if o == nil || IsNil(o.RrSets) { var ret *[]RecordSet return ret } @@ -135,7 +135,7 @@ func (o *ListRecordSetsResponse) SetRrSets(v *[]RecordSet) { // GetTotalItems returns the TotalItems field value func (o *ListRecordSetsResponse) GetTotalItems() *int64 { - if o == nil { + if o == nil || IsNil(o.TotalItems) { var ret *int64 return ret } @@ -159,7 +159,7 @@ func (o *ListRecordSetsResponse) SetTotalItems(v *int64) { // GetTotalPages returns the TotalPages field value func (o *ListRecordSetsResponse) GetTotalPages() *int64 { - if o == nil { + if o == nil || IsNil(o.TotalPages) { var ret *int64 return ret } diff --git a/services/dns/model_list_zones_response.go b/services/dns/model_list_zones_response.go index ac8da81d..efc7f7b1 100644 --- a/services/dns/model_list_zones_response.go +++ b/services/dns/model_list_zones_response.go @@ -55,7 +55,7 @@ func NewListZonesResponseWithDefaults() *ListZonesResponse { // GetItemsPerPage returns the ItemsPerPage field value func (o *ListZonesResponse) GetItemsPerPage() *int64 { - if o == nil { + if o == nil || IsNil(o.ItemsPerPage) { var ret *int64 return ret } @@ -111,7 +111,7 @@ func (o *ListZonesResponse) SetMessage(v *string) { // GetTotalItems returns the TotalItems field value func (o *ListZonesResponse) GetTotalItems() *int64 { - if o == nil { + if o == nil || IsNil(o.TotalItems) { var ret *int64 return ret } @@ -135,7 +135,7 @@ func (o *ListZonesResponse) SetTotalItems(v *int64) { // GetTotalPages returns the TotalPages field value func (o *ListZonesResponse) GetTotalPages() *int64 { - if o == nil { + if o == nil || IsNil(o.TotalPages) { var ret *int64 return ret } @@ -159,7 +159,7 @@ func (o *ListZonesResponse) SetTotalPages(v *int64) { // GetZones returns the Zones field value func (o *ListZonesResponse) GetZones() *[]Zone { - if o == nil { + if o == nil || IsNil(o.Zones) { var ret *[]Zone return ret } diff --git a/services/dns/model_move_code_response.go b/services/dns/model_move_code_response.go index 33fd6e8b..33c350e8 100644 --- a/services/dns/model_move_code_response.go +++ b/services/dns/model_move_code_response.go @@ -52,7 +52,7 @@ func NewMoveCodeResponseWithDefaults() *MoveCodeResponse { // GetCode returns the Code field value func (o *MoveCodeResponse) GetCode() *string { - if o == nil { + if o == nil || IsNil(o.Code) { var ret *string return ret } @@ -76,7 +76,7 @@ func (o *MoveCodeResponse) SetCode(v *string) { // GetExpiresAt returns the ExpiresAt field value func (o *MoveCodeResponse) GetExpiresAt() *string { - if o == nil { + if o == nil || IsNil(o.ExpiresAt) { var ret *string return ret } diff --git a/services/dns/model_move_zone_payload.go b/services/dns/model_move_zone_payload.go index 0c7a97bb..1e1b8a88 100644 --- a/services/dns/model_move_zone_payload.go +++ b/services/dns/model_move_zone_payload.go @@ -50,7 +50,7 @@ func NewMoveZonePayloadWithDefaults() *MoveZonePayload { // GetCode returns the Code field value func (o *MoveZonePayload) GetCode() *string { - if o == nil { + if o == nil || IsNil(o.Code) { var ret *string return ret } @@ -74,7 +74,7 @@ func (o *MoveZonePayload) SetCode(v *string) { // GetZoneDnsName returns the ZoneDnsName field value func (o *MoveZonePayload) GetZoneDnsName() *string { - if o == nil { + if o == nil || IsNil(o.ZoneDnsName) { var ret *string return ret } diff --git a/services/dns/model_partial_update_record_payload.go b/services/dns/model_partial_update_record_payload.go index 25c07273..d315057d 100644 --- a/services/dns/model_partial_update_record_payload.go +++ b/services/dns/model_partial_update_record_payload.go @@ -49,7 +49,7 @@ func NewPartialUpdateRecordPayloadWithDefaults() *PartialUpdateRecordPayload { // GetAction returns the Action field value func (o *PartialUpdateRecordPayload) GetAction() *string { - if o == nil { + if o == nil || IsNil(o.Action) { var ret *string return ret } @@ -73,7 +73,7 @@ func (o *PartialUpdateRecordPayload) SetAction(v *string) { // GetRecords returns the Records field value func (o *PartialUpdateRecordPayload) GetRecords() *[]RecordPayload { - if o == nil { + if o == nil || IsNil(o.Records) { var ret *[]RecordPayload return ret } diff --git a/services/dns/model_record.go b/services/dns/model_record.go index 7e00f59c..44eb1d96 100644 --- a/services/dns/model_record.go +++ b/services/dns/model_record.go @@ -50,7 +50,7 @@ func NewRecordWithDefaults() *Record { // GetContent returns the Content field value func (o *Record) GetContent() *string { - if o == nil { + if o == nil || IsNil(o.Content) { var ret *string return ret } @@ -74,7 +74,7 @@ func (o *Record) SetContent(v *string) { // GetId returns the Id field value func (o *Record) GetId() *string { - if o == nil { + if o == nil || IsNil(o.Id) { var ret *string return ret } diff --git a/services/dns/model_record_payload.go b/services/dns/model_record_payload.go index c191d7c0..cf387bab 100644 --- a/services/dns/model_record_payload.go +++ b/services/dns/model_record_payload.go @@ -46,7 +46,7 @@ func NewRecordPayloadWithDefaults() *RecordPayload { // GetContent returns the Content field value func (o *RecordPayload) GetContent() *string { - if o == nil { + if o == nil || IsNil(o.Content) { var ret *string return ret } diff --git a/services/dns/model_record_set.go b/services/dns/model_record_set.go index c9b2289d..35817eb9 100644 --- a/services/dns/model_record_set.go +++ b/services/dns/model_record_set.go @@ -152,7 +152,7 @@ func (o *RecordSet) SetComment(v *string) { // GetCreationFinished returns the CreationFinished field value func (o *RecordSet) GetCreationFinished() *string { - if o == nil { + if o == nil || IsNil(o.CreationFinished) { var ret *string return ret } @@ -176,7 +176,7 @@ func (o *RecordSet) SetCreationFinished(v *string) { // GetCreationStarted returns the CreationStarted field value func (o *RecordSet) GetCreationStarted() *string { - if o == nil { + if o == nil || IsNil(o.CreationStarted) { var ret *string return ret } @@ -232,7 +232,7 @@ func (o *RecordSet) SetError(v *string) { // GetId returns the Id field value func (o *RecordSet) GetId() *string { - if o == nil { + if o == nil || IsNil(o.Id) { var ret *string return ret } @@ -256,7 +256,7 @@ func (o *RecordSet) SetId(v *string) { // GetName returns the Name field value func (o *RecordSet) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } @@ -280,7 +280,7 @@ func (o *RecordSet) SetName(v *string) { // GetRecords returns the Records field value func (o *RecordSet) GetRecords() *[]Record { - if o == nil { + if o == nil || IsNil(o.Records) { var ret *[]Record return ret } @@ -304,7 +304,7 @@ func (o *RecordSet) SetRecords(v *[]Record) { // GetState returns the State field value func (o *RecordSet) GetState() *string { - if o == nil { + if o == nil || IsNil(o.State) { var ret *string return ret } @@ -328,7 +328,7 @@ func (o *RecordSet) SetState(v *string) { // GetTtl returns the Ttl field value func (o *RecordSet) GetTtl() *int64 { - if o == nil { + if o == nil || IsNil(o.Ttl) { var ret *int64 return ret } @@ -352,7 +352,7 @@ func (o *RecordSet) SetTtl(v *int64) { // GetType returns the Type field value func (o *RecordSet) GetType() *string { - if o == nil { + if o == nil || IsNil(o.Type) { var ret *string return ret } @@ -376,7 +376,7 @@ func (o *RecordSet) SetType(v *string) { // GetUpdateFinished returns the UpdateFinished field value func (o *RecordSet) GetUpdateFinished() *string { - if o == nil { + if o == nil || IsNil(o.UpdateFinished) { var ret *string return ret } @@ -400,7 +400,7 @@ func (o *RecordSet) SetUpdateFinished(v *string) { // GetUpdateStarted returns the UpdateStarted field value func (o *RecordSet) GetUpdateStarted() *string { - if o == nil { + if o == nil || IsNil(o.UpdateStarted) { var ret *string return ret } diff --git a/services/dns/model_record_set_response.go b/services/dns/model_record_set_response.go index a17475b5..fc1d8203 100644 --- a/services/dns/model_record_set_response.go +++ b/services/dns/model_record_set_response.go @@ -78,7 +78,7 @@ func (o *RecordSetResponse) SetMessage(v *string) { // GetRrset returns the Rrset field value func (o *RecordSetResponse) GetRrset() *RecordSet { - if o == nil { + if o == nil || IsNil(o.Rrset) { var ret *RecordSet return ret } diff --git a/services/dns/model_validate_move_code_payload.go b/services/dns/model_validate_move_code_payload.go index 2949988a..5a31af51 100644 --- a/services/dns/model_validate_move_code_payload.go +++ b/services/dns/model_validate_move_code_payload.go @@ -46,7 +46,7 @@ func NewValidateMoveCodePayloadWithDefaults() *ValidateMoveCodePayload { // GetCode returns the Code field value func (o *ValidateMoveCodePayload) GetCode() *string { - if o == nil { + if o == nil || IsNil(o.Code) { var ret *string return ret } diff --git a/services/dns/model_zone.go b/services/dns/model_zone.go index ad2e47fb..693c19f6 100644 --- a/services/dns/model_zone.go +++ b/services/dns/model_zone.go @@ -128,7 +128,7 @@ func NewZoneWithDefaults() *Zone { // GetAcl returns the Acl field value func (o *Zone) GetAcl() *string { - if o == nil { + if o == nil || IsNil(o.Acl) { var ret *string return ret } @@ -216,7 +216,7 @@ func (o *Zone) SetContactEmail(v *string) { // GetCreationFinished returns the CreationFinished field value func (o *Zone) GetCreationFinished() *string { - if o == nil { + if o == nil || IsNil(o.CreationFinished) { var ret *string return ret } @@ -240,7 +240,7 @@ func (o *Zone) SetCreationFinished(v *string) { // GetCreationStarted returns the CreationStarted field value func (o *Zone) GetCreationStarted() *string { - if o == nil { + if o == nil || IsNil(o.CreationStarted) { var ret *string return ret } @@ -264,7 +264,7 @@ func (o *Zone) SetCreationStarted(v *string) { // GetDefaultTTL returns the DefaultTTL field value func (o *Zone) GetDefaultTTL() *int64 { - if o == nil { + if o == nil || IsNil(o.DefaultTTL) { var ret *int64 return ret } @@ -320,7 +320,7 @@ func (o *Zone) SetDescription(v *string) { // GetDnsName returns the DnsName field value func (o *Zone) GetDnsName() *string { - if o == nil { + if o == nil || IsNil(o.DnsName) { var ret *string return ret } @@ -376,7 +376,7 @@ func (o *Zone) SetError(v *string) { // GetExpireTime returns the ExpireTime field value func (o *Zone) GetExpireTime() *int64 { - if o == nil { + if o == nil || IsNil(o.ExpireTime) { var ret *int64 return ret } @@ -400,7 +400,7 @@ func (o *Zone) SetExpireTime(v *int64) { // GetId returns the Id field value func (o *Zone) GetId() *string { - if o == nil { + if o == nil || IsNil(o.Id) { var ret *string return ret } @@ -488,7 +488,7 @@ func (o *Zone) SetLabels(v *[]Label) { // GetName returns the Name field value func (o *Zone) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } @@ -512,7 +512,7 @@ func (o *Zone) SetName(v *string) { // GetNegativeCache returns the NegativeCache field value func (o *Zone) GetNegativeCache() *int64 { - if o == nil { + if o == nil || IsNil(o.NegativeCache) { var ret *int64 return ret } @@ -568,7 +568,7 @@ func (o *Zone) SetPrimaries(v *[]string) { // GetPrimaryNameServer returns the PrimaryNameServer field value func (o *Zone) GetPrimaryNameServer() *string { - if o == nil { + if o == nil || IsNil(o.PrimaryNameServer) { var ret *string return ret } @@ -624,7 +624,7 @@ func (o *Zone) SetRecordCount(v *int64) { // GetRefreshTime returns the RefreshTime field value func (o *Zone) GetRefreshTime() *int64 { - if o == nil { + if o == nil || IsNil(o.RefreshTime) { var ret *int64 return ret } @@ -648,7 +648,7 @@ func (o *Zone) SetRefreshTime(v *int64) { // GetRetryTime returns the RetryTime field value func (o *Zone) GetRetryTime() *int64 { - if o == nil { + if o == nil || IsNil(o.RetryTime) { var ret *int64 return ret } @@ -672,7 +672,7 @@ func (o *Zone) SetRetryTime(v *int64) { // GetSerialNumber returns the SerialNumber field value func (o *Zone) GetSerialNumber() *int64 { - if o == nil { + if o == nil || IsNil(o.SerialNumber) { var ret *int64 return ret } @@ -696,7 +696,7 @@ func (o *Zone) SetSerialNumber(v *int64) { // GetState returns the State field value func (o *Zone) GetState() *string { - if o == nil { + if o == nil || IsNil(o.State) { var ret *string return ret } @@ -720,7 +720,7 @@ func (o *Zone) SetState(v *string) { // GetType returns the Type field value func (o *Zone) GetType() *string { - if o == nil { + if o == nil || IsNil(o.Type) { var ret *string return ret } @@ -744,7 +744,7 @@ func (o *Zone) SetType(v *string) { // GetUpdateFinished returns the UpdateFinished field value func (o *Zone) GetUpdateFinished() *string { - if o == nil { + if o == nil || IsNil(o.UpdateFinished) { var ret *string return ret } @@ -768,7 +768,7 @@ func (o *Zone) SetUpdateFinished(v *string) { // GetUpdateStarted returns the UpdateStarted field value func (o *Zone) GetUpdateStarted() *string { - if o == nil { + if o == nil || IsNil(o.UpdateStarted) { var ret *string return ret } @@ -792,7 +792,7 @@ func (o *Zone) SetUpdateStarted(v *string) { // GetVisibility returns the Visibility field value func (o *Zone) GetVisibility() *string { - if o == nil { + if o == nil || IsNil(o.Visibility) { var ret *string return ret } diff --git a/services/dns/model_zone_response.go b/services/dns/model_zone_response.go index 9620a273..117b75a1 100644 --- a/services/dns/model_zone_response.go +++ b/services/dns/model_zone_response.go @@ -78,7 +78,7 @@ func (o *ZoneResponse) SetMessage(v *string) { // GetZone returns the Zone field value func (o *ZoneResponse) GetZone() *Zone { - if o == nil { + if o == nil || IsNil(o.Zone) { var ret *Zone return ret }