diff --git a/services/dns/CHANGELOG.md b/services/dns/CHANGELOG.md index 6ddf9a51c..68be5a803 100644 --- a/services/dns/CHANGELOG.md +++ b/services/dns/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.11.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.10.0 (2024-05-23) - **Feature**: New method `CloneZone` to clone an existing zone with all record sets to a new zone with a different name diff --git a/services/dns/model_clone_zone_payload.go b/services/dns/model_clone_zone_payload.go index 4fd82fbb3..3e12e066c 100644 --- a/services/dns/model_clone_zone_payload.go +++ b/services/dns/model_clone_zone_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the CloneZonePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneZonePayload{} + // CloneZonePayload metadata to clone a zone. type CloneZonePayload struct { // Adjust record set content and replace the dns name of the original zone with the new dns name of the cloned zone @@ -22,3 +29,194 @@ type CloneZonePayload struct { // New Name for the cloned zone. Leave empty to use the same name as the original zone Name *string `json:"name,omitempty"` } + +type _CloneZonePayload CloneZonePayload + +// NewCloneZonePayload instantiates a new CloneZonePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCloneZonePayload(dnsName *string) *CloneZonePayload { + this := CloneZonePayload{} + this.DnsName = dnsName + return &this +} + +// NewCloneZonePayloadWithDefaults instantiates a new CloneZonePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCloneZonePayloadWithDefaults() *CloneZonePayload { + this := CloneZonePayload{} + return &this +} + +// GetAdjustRecords returns the AdjustRecords field value if set, zero value otherwise. +func (o *CloneZonePayload) GetAdjustRecords() *bool { + if o == nil || IsNil(o.AdjustRecords) { + var ret *bool + return ret + } + return o.AdjustRecords +} + +// GetAdjustRecordsOk returns a tuple with the AdjustRecords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneZonePayload) GetAdjustRecordsOk() (*bool, bool) { + if o == nil || IsNil(o.AdjustRecords) { + return nil, false + } + return o.AdjustRecords, true +} + +// HasAdjustRecords returns a boolean if a field has been set. +func (o *CloneZonePayload) HasAdjustRecords() bool { + if o != nil && !IsNil(o.AdjustRecords) { + return true + } + + return false +} + +// SetAdjustRecords gets a reference to the given bool and assigns it to the AdjustRecords field. +func (o *CloneZonePayload) SetAdjustRecords(v *bool) { + o.AdjustRecords = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CloneZonePayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + 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. +func (o *CloneZonePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CloneZonePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CloneZonePayload) SetDescription(v *string) { + o.Description = v +} + +// GetDnsName returns the DnsName field value +func (o *CloneZonePayload) GetDnsName() *string { + if o == nil { + var ret *string + return ret + } + + return o.DnsName +} + +// GetDnsNameOk returns a tuple with the DnsName field value +// and a boolean to check if the value has been set. +func (o *CloneZonePayload) GetDnsNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DnsName, true +} + +// SetDnsName sets field value +func (o *CloneZonePayload) SetDnsName(v *string) { + o.DnsName = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CloneZonePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + 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. +func (o *CloneZonePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CloneZonePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CloneZonePayload) SetName(v *string) { + o.Name = v +} + +func (o CloneZonePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AdjustRecords) { + toSerialize["adjustRecords"] = o.AdjustRecords + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["dnsName"] = o.DnsName + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableCloneZonePayload struct { + value *CloneZonePayload + isSet bool +} + +func (v NullableCloneZonePayload) Get() *CloneZonePayload { + return v.value +} + +func (v *NullableCloneZonePayload) Set(val *CloneZonePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCloneZonePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneZonePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneZonePayload(val *CloneZonePayload) *NullableCloneZonePayload { + return &NullableCloneZonePayload{value: val, isSet: true} +} + +func (v NullableCloneZonePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneZonePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_create_label_payload.go b/services/dns/model_create_label_payload.go index 72c0f07f5..adcfabcf8 100644 --- a/services/dns/model_create_label_payload.go +++ b/services/dns/model_create_label_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the CreateLabelPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLabelPayload{} + // CreateLabelPayload struct for CreateLabelPayload type CreateLabelPayload struct { // REQUIRED @@ -17,3 +24,115 @@ type CreateLabelPayload struct { // REQUIRED Value *string `json:"value"` } + +type _CreateLabelPayload CreateLabelPayload + +// NewCreateLabelPayload instantiates a new CreateLabelPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateLabelPayload(key *string, value *string) *CreateLabelPayload { + this := CreateLabelPayload{} + this.Key = key + this.Value = value + return &this +} + +// NewCreateLabelPayloadWithDefaults instantiates a new CreateLabelPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateLabelPayloadWithDefaults() *CreateLabelPayload { + this := CreateLabelPayload{} + return &this +} + +// GetKey returns the Key field value +func (o *CreateLabelPayload) GetKey() *string { + if o == nil { + var ret *string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *CreateLabelPayload) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key, true +} + +// SetKey sets field value +func (o *CreateLabelPayload) SetKey(v *string) { + o.Key = v +} + +// GetValue returns the Value field value +func (o *CreateLabelPayload) GetValue() *string { + if o == nil { + var ret *string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CreateLabelPayload) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *CreateLabelPayload) SetValue(v *string) { + o.Value = v +} + +func (o CreateLabelPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["value"] = o.Value + return toSerialize, nil +} + +type NullableCreateLabelPayload struct { + value *CreateLabelPayload + isSet bool +} + +func (v NullableCreateLabelPayload) Get() *CreateLabelPayload { + return v.value +} + +func (v *NullableCreateLabelPayload) Set(val *CreateLabelPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLabelPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLabelPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLabelPayload(val *CreateLabelPayload) *NullableCreateLabelPayload { + return &NullableCreateLabelPayload{value: val, isSet: true} +} + +func (v NullableCreateLabelPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLabelPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_create_label_response.go b/services/dns/model_create_label_response.go index adda95f23..13e4d0c62 100644 --- a/services/dns/model_create_label_response.go +++ b/services/dns/model_create_label_response.go @@ -10,8 +10,143 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the CreateLabelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLabelResponse{} + // CreateLabelResponse ResponseUpsertLabel. type CreateLabelResponse struct { Label *Label `json:"label,omitempty"` Message *string `json:"message,omitempty"` } + +// NewCreateLabelResponse instantiates a new CreateLabelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateLabelResponse() *CreateLabelResponse { + this := CreateLabelResponse{} + return &this +} + +// NewCreateLabelResponseWithDefaults instantiates a new CreateLabelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateLabelResponseWithDefaults() *CreateLabelResponse { + this := CreateLabelResponse{} + return &this +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *CreateLabelResponse) GetLabel() *Label { + if o == nil || IsNil(o.Label) { + var ret *Label + return ret + } + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLabelResponse) GetLabelOk() (*Label, bool) { + if o == nil || IsNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *CreateLabelResponse) HasLabel() bool { + if o != nil && !IsNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given Label and assigns it to the Label field. +func (o *CreateLabelResponse) SetLabel(v *Label) { + o.Label = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CreateLabelResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLabelResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *CreateLabelResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *CreateLabelResponse) SetMessage(v *string) { + o.Message = v +} + +func (o CreateLabelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Label) { + toSerialize["label"] = o.Label + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableCreateLabelResponse struct { + value *CreateLabelResponse + isSet bool +} + +func (v NullableCreateLabelResponse) Get() *CreateLabelResponse { + return v.value +} + +func (v *NullableCreateLabelResponse) Set(val *CreateLabelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLabelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLabelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLabelResponse(val *CreateLabelResponse) *NullableCreateLabelResponse { + return &NullableCreateLabelResponse{value: val, isSet: true} +} + +func (v NullableCreateLabelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLabelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_create_record_set_payload.go b/services/dns/model_create_record_set_payload.go index 6cf65857e..c5fd310fe 100644 --- a/services/dns/model_create_record_set_payload.go +++ b/services/dns/model_create_record_set_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the CreateRecordSetPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateRecordSetPayload{} + // CreateRecordSetPayload RRSetPost for rr set info. type CreateRecordSetPayload struct { // user comment @@ -26,3 +33,211 @@ type CreateRecordSetPayload struct { // REQUIRED Type *string `json:"type"` } + +type _CreateRecordSetPayload CreateRecordSetPayload + +// NewCreateRecordSetPayload instantiates a new CreateRecordSetPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateRecordSetPayload(name *string, records *[]RecordPayload, type_ *string) *CreateRecordSetPayload { + this := CreateRecordSetPayload{} + this.Name = name + this.Records = records + this.Type = type_ + return &this +} + +// NewCreateRecordSetPayloadWithDefaults instantiates a new CreateRecordSetPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateRecordSetPayloadWithDefaults() *CreateRecordSetPayload { + this := CreateRecordSetPayload{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *CreateRecordSetPayload) GetComment() *string { + if o == nil || IsNil(o.Comment) { + var ret *string + return ret + } + return o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRecordSetPayload) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *CreateRecordSetPayload) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *CreateRecordSetPayload) SetComment(v *string) { + o.Comment = v +} + +// GetName returns the Name field value +func (o *CreateRecordSetPayload) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateRecordSetPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateRecordSetPayload) SetName(v *string) { + o.Name = v +} + +// GetRecords returns the Records field value +func (o *CreateRecordSetPayload) GetRecords() *[]RecordPayload { + if o == nil { + var ret *[]RecordPayload + return ret + } + + return o.Records +} + +// GetRecordsOk returns a tuple with the Records field value +// and a boolean to check if the value has been set. +func (o *CreateRecordSetPayload) GetRecordsOk() (*[]RecordPayload, bool) { + if o == nil { + return nil, false + } + return o.Records, true +} + +// SetRecords sets field value +func (o *CreateRecordSetPayload) SetRecords(v *[]RecordPayload) { + o.Records = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *CreateRecordSetPayload) GetTtl() *int64 { + if o == nil || IsNil(o.Ttl) { + var ret *int64 + return ret + } + return o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRecordSetPayload) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *CreateRecordSetPayload) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *CreateRecordSetPayload) SetTtl(v *int64) { + o.Ttl = v +} + +// GetType returns the Type field value +func (o *CreateRecordSetPayload) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateRecordSetPayload) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *CreateRecordSetPayload) SetType(v *string) { + o.Type = v +} + +func (o CreateRecordSetPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + toSerialize["name"] = o.Name + toSerialize["records"] = o.Records + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableCreateRecordSetPayload struct { + value *CreateRecordSetPayload + isSet bool +} + +func (v NullableCreateRecordSetPayload) Get() *CreateRecordSetPayload { + return v.value +} + +func (v *NullableCreateRecordSetPayload) Set(val *CreateRecordSetPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateRecordSetPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateRecordSetPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateRecordSetPayload(val *CreateRecordSetPayload) *NullableCreateRecordSetPayload { + return &NullableCreateRecordSetPayload{value: val, isSet: true} +} + +func (v NullableCreateRecordSetPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateRecordSetPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_create_zone_payload.go b/services/dns/model_create_zone_payload.go index ed46f6cd9..8d2536e53 100644 --- a/services/dns/model_create_zone_payload.go +++ b/services/dns/model_create_zone_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the CreateZonePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateZonePayload{} + // CreateZonePayload Zone to create. type CreateZonePayload struct { // access control list @@ -41,3 +48,516 @@ type CreateZonePayload struct { // zone type Type *string `json:"type,omitempty"` } + +type _CreateZonePayload CreateZonePayload + +// NewCreateZonePayload instantiates a new CreateZonePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateZonePayload(dnsName *string, name *string) *CreateZonePayload { + this := CreateZonePayload{} + var acl string = "0.0.0.0/0,::/0" + this.Acl = &acl + var contactEmail string = "hostmaster@stackit.cloud" + this.ContactEmail = &contactEmail + this.DnsName = dnsName + var isReverseZone bool = false + this.IsReverseZone = &isReverseZone + this.Name = name + var type_ string = "primary" + this.Type = &type_ + return &this +} + +// NewCreateZonePayloadWithDefaults instantiates a new CreateZonePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateZonePayloadWithDefaults() *CreateZonePayload { + this := CreateZonePayload{} + var acl string = "0.0.0.0/0,::/0" + this.Acl = &acl + var contactEmail string = "hostmaster@stackit.cloud" + this.ContactEmail = &contactEmail + var isReverseZone bool = false + this.IsReverseZone = &isReverseZone + var type_ string = "primary" + this.Type = &type_ + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *CreateZonePayload) GetAcl() *string { + if o == nil || IsNil(o.Acl) { + var ret *string + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetAclOk() (*string, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *CreateZonePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given string and assigns it to the Acl field. +func (o *CreateZonePayload) SetAcl(v *string) { + o.Acl = v +} + +// GetContactEmail returns the ContactEmail field value if set, zero value otherwise. +func (o *CreateZonePayload) GetContactEmail() *string { + if o == nil || IsNil(o.ContactEmail) { + var ret *string + return ret + } + return o.ContactEmail +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetContactEmailOk() (*string, bool) { + if o == nil || IsNil(o.ContactEmail) { + return nil, false + } + return o.ContactEmail, true +} + +// HasContactEmail returns a boolean if a field has been set. +func (o *CreateZonePayload) HasContactEmail() bool { + if o != nil && !IsNil(o.ContactEmail) { + return true + } + + return false +} + +// SetContactEmail gets a reference to the given string and assigns it to the ContactEmail field. +func (o *CreateZonePayload) SetContactEmail(v *string) { + o.ContactEmail = v +} + +// GetDefaultTTL returns the DefaultTTL field value if set, zero value otherwise. +func (o *CreateZonePayload) GetDefaultTTL() *int64 { + if o == nil || IsNil(o.DefaultTTL) { + var ret *int64 + return ret + } + return o.DefaultTTL +} + +// GetDefaultTTLOk returns a tuple with the DefaultTTL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetDefaultTTLOk() (*int64, bool) { + if o == nil || IsNil(o.DefaultTTL) { + return nil, false + } + return o.DefaultTTL, true +} + +// HasDefaultTTL returns a boolean if a field has been set. +func (o *CreateZonePayload) HasDefaultTTL() bool { + if o != nil && !IsNil(o.DefaultTTL) { + return true + } + + return false +} + +// SetDefaultTTL gets a reference to the given int64 and assigns it to the DefaultTTL field. +func (o *CreateZonePayload) SetDefaultTTL(v *int64) { + o.DefaultTTL = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateZonePayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + 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. +func (o *CreateZonePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateZonePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateZonePayload) SetDescription(v *string) { + o.Description = v +} + +// GetDnsName returns the DnsName field value +func (o *CreateZonePayload) GetDnsName() *string { + if o == nil { + var ret *string + return ret + } + + return o.DnsName +} + +// GetDnsNameOk returns a tuple with the DnsName field value +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetDnsNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DnsName, true +} + +// SetDnsName sets field value +func (o *CreateZonePayload) SetDnsName(v *string) { + o.DnsName = v +} + +// GetExpireTime returns the ExpireTime field value if set, zero value otherwise. +func (o *CreateZonePayload) GetExpireTime() *int64 { + if o == nil || IsNil(o.ExpireTime) { + var ret *int64 + return ret + } + return o.ExpireTime +} + +// GetExpireTimeOk returns a tuple with the ExpireTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetExpireTimeOk() (*int64, bool) { + if o == nil || IsNil(o.ExpireTime) { + return nil, false + } + return o.ExpireTime, true +} + +// HasExpireTime returns a boolean if a field has been set. +func (o *CreateZonePayload) HasExpireTime() bool { + if o != nil && !IsNil(o.ExpireTime) { + return true + } + + return false +} + +// SetExpireTime gets a reference to the given int64 and assigns it to the ExpireTime field. +func (o *CreateZonePayload) SetExpireTime(v *int64) { + o.ExpireTime = v +} + +// GetIsReverseZone returns the IsReverseZone field value if set, zero value otherwise. +func (o *CreateZonePayload) GetIsReverseZone() *bool { + if o == nil || IsNil(o.IsReverseZone) { + var ret *bool + return ret + } + return o.IsReverseZone +} + +// GetIsReverseZoneOk returns a tuple with the IsReverseZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetIsReverseZoneOk() (*bool, bool) { + if o == nil || IsNil(o.IsReverseZone) { + return nil, false + } + return o.IsReverseZone, true +} + +// HasIsReverseZone returns a boolean if a field has been set. +func (o *CreateZonePayload) HasIsReverseZone() bool { + if o != nil && !IsNil(o.IsReverseZone) { + return true + } + + return false +} + +// SetIsReverseZone gets a reference to the given bool and assigns it to the IsReverseZone field. +func (o *CreateZonePayload) SetIsReverseZone(v *bool) { + o.IsReverseZone = v +} + +// GetName returns the Name field value +func (o *CreateZonePayload) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateZonePayload) SetName(v *string) { + o.Name = v +} + +// GetNegativeCache returns the NegativeCache field value if set, zero value otherwise. +func (o *CreateZonePayload) GetNegativeCache() *int64 { + if o == nil || IsNil(o.NegativeCache) { + var ret *int64 + return ret + } + return o.NegativeCache +} + +// GetNegativeCacheOk returns a tuple with the NegativeCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetNegativeCacheOk() (*int64, bool) { + if o == nil || IsNil(o.NegativeCache) { + return nil, false + } + return o.NegativeCache, true +} + +// HasNegativeCache returns a boolean if a field has been set. +func (o *CreateZonePayload) HasNegativeCache() bool { + if o != nil && !IsNil(o.NegativeCache) { + return true + } + + return false +} + +// SetNegativeCache gets a reference to the given int64 and assigns it to the NegativeCache field. +func (o *CreateZonePayload) SetNegativeCache(v *int64) { + o.NegativeCache = v +} + +// GetPrimaries returns the Primaries field value if set, zero value otherwise. +func (o *CreateZonePayload) GetPrimaries() *[]string { + if o == nil || IsNil(o.Primaries) { + var ret *[]string + return ret + } + return o.Primaries +} + +// GetPrimariesOk returns a tuple with the Primaries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetPrimariesOk() (*[]string, bool) { + if o == nil || IsNil(o.Primaries) { + return nil, false + } + return o.Primaries, true +} + +// HasPrimaries returns a boolean if a field has been set. +func (o *CreateZonePayload) HasPrimaries() bool { + if o != nil && !IsNil(o.Primaries) { + return true + } + + return false +} + +// SetPrimaries gets a reference to the given []string and assigns it to the Primaries field. +func (o *CreateZonePayload) SetPrimaries(v *[]string) { + o.Primaries = v +} + +// GetRefreshTime returns the RefreshTime field value if set, zero value otherwise. +func (o *CreateZonePayload) GetRefreshTime() *int64 { + if o == nil || IsNil(o.RefreshTime) { + var ret *int64 + return ret + } + return o.RefreshTime +} + +// GetRefreshTimeOk returns a tuple with the RefreshTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetRefreshTimeOk() (*int64, bool) { + if o == nil || IsNil(o.RefreshTime) { + return nil, false + } + return o.RefreshTime, true +} + +// HasRefreshTime returns a boolean if a field has been set. +func (o *CreateZonePayload) HasRefreshTime() bool { + if o != nil && !IsNil(o.RefreshTime) { + return true + } + + return false +} + +// SetRefreshTime gets a reference to the given int64 and assigns it to the RefreshTime field. +func (o *CreateZonePayload) SetRefreshTime(v *int64) { + o.RefreshTime = v +} + +// GetRetryTime returns the RetryTime field value if set, zero value otherwise. +func (o *CreateZonePayload) GetRetryTime() *int64 { + if o == nil || IsNil(o.RetryTime) { + var ret *int64 + return ret + } + return o.RetryTime +} + +// GetRetryTimeOk returns a tuple with the RetryTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetRetryTimeOk() (*int64, bool) { + if o == nil || IsNil(o.RetryTime) { + return nil, false + } + return o.RetryTime, true +} + +// HasRetryTime returns a boolean if a field has been set. +func (o *CreateZonePayload) HasRetryTime() bool { + if o != nil && !IsNil(o.RetryTime) { + return true + } + + return false +} + +// SetRetryTime gets a reference to the given int64 and assigns it to the RetryTime field. +func (o *CreateZonePayload) SetRetryTime(v *int64) { + o.RetryTime = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CreateZonePayload) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateZonePayload) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CreateZonePayload) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CreateZonePayload) SetType(v *string) { + o.Type = v +} + +func (o CreateZonePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.ContactEmail) { + toSerialize["contactEmail"] = o.ContactEmail + } + if !IsNil(o.DefaultTTL) { + toSerialize["defaultTTL"] = o.DefaultTTL + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["dnsName"] = o.DnsName + if !IsNil(o.ExpireTime) { + toSerialize["expireTime"] = o.ExpireTime + } + if !IsNil(o.IsReverseZone) { + toSerialize["isReverseZone"] = o.IsReverseZone + } + toSerialize["name"] = o.Name + if !IsNil(o.NegativeCache) { + toSerialize["negativeCache"] = o.NegativeCache + } + if !IsNil(o.Primaries) { + toSerialize["primaries"] = o.Primaries + } + if !IsNil(o.RefreshTime) { + toSerialize["refreshTime"] = o.RefreshTime + } + if !IsNil(o.RetryTime) { + toSerialize["retryTime"] = o.RetryTime + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableCreateZonePayload struct { + value *CreateZonePayload + isSet bool +} + +func (v NullableCreateZonePayload) Get() *CreateZonePayload { + return v.value +} + +func (v *NullableCreateZonePayload) Set(val *CreateZonePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateZonePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateZonePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateZonePayload(val *CreateZonePayload) *NullableCreateZonePayload { + return &NullableCreateZonePayload{value: val, isSet: true} +} + +func (v NullableCreateZonePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateZonePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_delete_label_response.go b/services/dns/model_delete_label_response.go index 0f7f6241e..3a8ee2f78 100644 --- a/services/dns/model_delete_label_response.go +++ b/services/dns/model_delete_label_response.go @@ -10,8 +10,143 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the DeleteLabelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteLabelResponse{} + // DeleteLabelResponse ResponseDeleteLabel. type DeleteLabelResponse struct { Label *Label `json:"label,omitempty"` Message *string `json:"message,omitempty"` } + +// NewDeleteLabelResponse instantiates a new DeleteLabelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeleteLabelResponse() *DeleteLabelResponse { + this := DeleteLabelResponse{} + return &this +} + +// NewDeleteLabelResponseWithDefaults instantiates a new DeleteLabelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeleteLabelResponseWithDefaults() *DeleteLabelResponse { + this := DeleteLabelResponse{} + return &this +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *DeleteLabelResponse) GetLabel() *Label { + if o == nil || IsNil(o.Label) { + var ret *Label + return ret + } + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeleteLabelResponse) GetLabelOk() (*Label, bool) { + if o == nil || IsNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *DeleteLabelResponse) HasLabel() bool { + if o != nil && !IsNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given Label and assigns it to the Label field. +func (o *DeleteLabelResponse) SetLabel(v *Label) { + o.Label = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *DeleteLabelResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeleteLabelResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *DeleteLabelResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *DeleteLabelResponse) SetMessage(v *string) { + o.Message = v +} + +func (o DeleteLabelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Label) { + toSerialize["label"] = o.Label + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableDeleteLabelResponse struct { + value *DeleteLabelResponse + isSet bool +} + +func (v NullableDeleteLabelResponse) Get() *DeleteLabelResponse { + return v.value +} + +func (v *NullableDeleteLabelResponse) Set(val *DeleteLabelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteLabelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteLabelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteLabelResponse(val *DeleteLabelResponse) *NullableDeleteLabelResponse { + return &NullableDeleteLabelResponse{value: val, isSet: true} +} + +func (v NullableDeleteLabelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteLabelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_error_message.go b/services/dns/model_error_message.go index eb8f841df..88f8a5504 100644 --- a/services/dns/model_error_message.go +++ b/services/dns/model_error_message.go @@ -10,8 +10,143 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ErrorMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorMessage{} + // ErrorMessage struct for ErrorMessage type ErrorMessage struct { Error *string `json:"error,omitempty"` Message *string `json:"message,omitempty"` } + +// NewErrorMessage instantiates a new ErrorMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorMessage() *ErrorMessage { + this := ErrorMessage{} + return &this +} + +// NewErrorMessageWithDefaults instantiates a new ErrorMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorMessageWithDefaults() *ErrorMessage { + this := ErrorMessage{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ErrorMessage) GetError() *string { + if o == nil || IsNil(o.Error) { + var ret *string + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorMessage) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ErrorMessage) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *ErrorMessage) SetError(v *string) { + o.Error = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorMessage) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorMessage) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorMessage) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ErrorMessage) SetMessage(v *string) { + o.Message = v +} + +func (o ErrorMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableErrorMessage struct { + value *ErrorMessage + isSet bool +} + +func (v NullableErrorMessage) Get() *ErrorMessage { + return v.value +} + +func (v *NullableErrorMessage) Set(val *ErrorMessage) { + v.value = val + v.isSet = true +} + +func (v NullableErrorMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorMessage(val *ErrorMessage) *NullableErrorMessage { + return &NullableErrorMessage{value: val, isSet: true} +} + +func (v NullableErrorMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_export_record_sets_payload.go b/services/dns/model_export_record_sets_payload.go index 2d495e6f9..97e955335 100644 --- a/services/dns/model_export_record_sets_payload.go +++ b/services/dns/model_export_record_sets_payload.go @@ -10,8 +10,151 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ExportRecordSetsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportRecordSetsPayload{} + // ExportRecordSetsPayload struct for ExportRecordSetsPayload type ExportRecordSetsPayload struct { ExportAsFQDN *bool `json:"exportAsFQDN,omitempty"` Format *string `json:"format,omitempty"` } + +// NewExportRecordSetsPayload instantiates a new ExportRecordSetsPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportRecordSetsPayload() *ExportRecordSetsPayload { + this := ExportRecordSetsPayload{} + var exportAsFQDN bool = true + this.ExportAsFQDN = &exportAsFQDN + var format string = "csv" + this.Format = &format + return &this +} + +// NewExportRecordSetsPayloadWithDefaults instantiates a new ExportRecordSetsPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportRecordSetsPayloadWithDefaults() *ExportRecordSetsPayload { + this := ExportRecordSetsPayload{} + var exportAsFQDN bool = true + this.ExportAsFQDN = &exportAsFQDN + var format string = "csv" + this.Format = &format + return &this +} + +// GetExportAsFQDN returns the ExportAsFQDN field value if set, zero value otherwise. +func (o *ExportRecordSetsPayload) GetExportAsFQDN() *bool { + if o == nil || IsNil(o.ExportAsFQDN) { + var ret *bool + return ret + } + return o.ExportAsFQDN +} + +// GetExportAsFQDNOk returns a tuple with the ExportAsFQDN field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportRecordSetsPayload) GetExportAsFQDNOk() (*bool, bool) { + if o == nil || IsNil(o.ExportAsFQDN) { + return nil, false + } + return o.ExportAsFQDN, true +} + +// HasExportAsFQDN returns a boolean if a field has been set. +func (o *ExportRecordSetsPayload) HasExportAsFQDN() bool { + if o != nil && !IsNil(o.ExportAsFQDN) { + return true + } + + return false +} + +// SetExportAsFQDN gets a reference to the given bool and assigns it to the ExportAsFQDN field. +func (o *ExportRecordSetsPayload) SetExportAsFQDN(v *bool) { + o.ExportAsFQDN = v +} + +// GetFormat returns the Format field value if set, zero value otherwise. +func (o *ExportRecordSetsPayload) GetFormat() *string { + if o == nil || IsNil(o.Format) { + var ret *string + return ret + } + return o.Format +} + +// GetFormatOk returns a tuple with the Format field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportRecordSetsPayload) GetFormatOk() (*string, bool) { + if o == nil || IsNil(o.Format) { + return nil, false + } + return o.Format, true +} + +// HasFormat returns a boolean if a field has been set. +func (o *ExportRecordSetsPayload) HasFormat() bool { + if o != nil && !IsNil(o.Format) { + return true + } + + return false +} + +// SetFormat gets a reference to the given string and assigns it to the Format field. +func (o *ExportRecordSetsPayload) SetFormat(v *string) { + o.Format = v +} + +func (o ExportRecordSetsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExportAsFQDN) { + toSerialize["exportAsFQDN"] = o.ExportAsFQDN + } + if !IsNil(o.Format) { + toSerialize["format"] = o.Format + } + return toSerialize, nil +} + +type NullableExportRecordSetsPayload struct { + value *ExportRecordSetsPayload + isSet bool +} + +func (v NullableExportRecordSetsPayload) Get() *ExportRecordSetsPayload { + return v.value +} + +func (v *NullableExportRecordSetsPayload) Set(val *ExportRecordSetsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableExportRecordSetsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableExportRecordSetsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportRecordSetsPayload(val *ExportRecordSetsPayload) *NullableExportRecordSetsPayload { + return &NullableExportRecordSetsPayload{value: val, isSet: true} +} + +func (v NullableExportRecordSetsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportRecordSetsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_import_record_sets_payload.go b/services/dns/model_import_record_sets_payload.go index 2721436f6..e683eee4d 100644 --- a/services/dns/model_import_record_sets_payload.go +++ b/services/dns/model_import_record_sets_payload.go @@ -10,7 +10,107 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ImportRecordSetsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportRecordSetsPayload{} + // ImportRecordSetsPayload struct for ImportRecordSetsPayload type ImportRecordSetsPayload struct { RrSets *[]RecordDataExchange `json:"rrSets,omitempty"` } + +// NewImportRecordSetsPayload instantiates a new ImportRecordSetsPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportRecordSetsPayload() *ImportRecordSetsPayload { + this := ImportRecordSetsPayload{} + return &this +} + +// NewImportRecordSetsPayloadWithDefaults instantiates a new ImportRecordSetsPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportRecordSetsPayloadWithDefaults() *ImportRecordSetsPayload { + this := ImportRecordSetsPayload{} + return &this +} + +// GetRrSets returns the RrSets field value if set, zero value otherwise. +func (o *ImportRecordSetsPayload) GetRrSets() *[]RecordDataExchange { + if o == nil || IsNil(o.RrSets) { + var ret *[]RecordDataExchange + return ret + } + return o.RrSets +} + +// GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportRecordSetsPayload) GetRrSetsOk() (*[]RecordDataExchange, bool) { + if o == nil || IsNil(o.RrSets) { + return nil, false + } + return o.RrSets, true +} + +// HasRrSets returns a boolean if a field has been set. +func (o *ImportRecordSetsPayload) HasRrSets() bool { + if o != nil && !IsNil(o.RrSets) { + return true + } + + return false +} + +// SetRrSets gets a reference to the given []RecordDataExchange and assigns it to the RrSets field. +func (o *ImportRecordSetsPayload) SetRrSets(v *[]RecordDataExchange) { + o.RrSets = v +} + +func (o ImportRecordSetsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RrSets) { + toSerialize["rrSets"] = o.RrSets + } + return toSerialize, nil +} + +type NullableImportRecordSetsPayload struct { + value *ImportRecordSetsPayload + isSet bool +} + +func (v NullableImportRecordSetsPayload) Get() *ImportRecordSetsPayload { + return v.value +} + +func (v *NullableImportRecordSetsPayload) Set(val *ImportRecordSetsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableImportRecordSetsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableImportRecordSetsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportRecordSetsPayload(val *ImportRecordSetsPayload) *NullableImportRecordSetsPayload { + return &NullableImportRecordSetsPayload{value: val, isSet: true} +} + +func (v NullableImportRecordSetsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportRecordSetsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_import_record_sets_response.go b/services/dns/model_import_record_sets_response.go index e14332ddf..9a45f4196 100644 --- a/services/dns/model_import_record_sets_response.go +++ b/services/dns/model_import_record_sets_response.go @@ -10,9 +10,137 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ImportRecordSetsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportRecordSetsResponse{} + // ImportRecordSetsResponse ImportSummaryResponse is the response of the import. type ImportRecordSetsResponse struct { Message *string `json:"message,omitempty"` // REQUIRED Summary *ImportSummary `json:"summary"` } + +type _ImportRecordSetsResponse ImportRecordSetsResponse + +// NewImportRecordSetsResponse instantiates a new ImportRecordSetsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportRecordSetsResponse(summary *ImportSummary) *ImportRecordSetsResponse { + this := ImportRecordSetsResponse{} + this.Summary = summary + return &this +} + +// NewImportRecordSetsResponseWithDefaults instantiates a new ImportRecordSetsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportRecordSetsResponseWithDefaults() *ImportRecordSetsResponse { + this := ImportRecordSetsResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ImportRecordSetsResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportRecordSetsResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ImportRecordSetsResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ImportRecordSetsResponse) SetMessage(v *string) { + o.Message = v +} + +// GetSummary returns the Summary field value +func (o *ImportRecordSetsResponse) GetSummary() *ImportSummary { + if o == nil { + var ret *ImportSummary + return ret + } + + return o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value +// and a boolean to check if the value has been set. +func (o *ImportRecordSetsResponse) GetSummaryOk() (*ImportSummary, bool) { + if o == nil { + return nil, false + } + return o.Summary, true +} + +// SetSummary sets field value +func (o *ImportRecordSetsResponse) SetSummary(v *ImportSummary) { + o.Summary = v +} + +func (o ImportRecordSetsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + toSerialize["summary"] = o.Summary + return toSerialize, nil +} + +type NullableImportRecordSetsResponse struct { + value *ImportRecordSetsResponse + isSet bool +} + +func (v NullableImportRecordSetsResponse) Get() *ImportRecordSetsResponse { + return v.value +} + +func (v *NullableImportRecordSetsResponse) Set(val *ImportRecordSetsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableImportRecordSetsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableImportRecordSetsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportRecordSetsResponse(val *ImportRecordSetsResponse) *NullableImportRecordSetsResponse { + return &NullableImportRecordSetsResponse{value: val, isSet: true} +} + +func (v NullableImportRecordSetsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportRecordSetsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_import_summary.go b/services/dns/model_import_summary.go index e3e8e3cab..ae15dcb01 100644 --- a/services/dns/model_import_summary.go +++ b/services/dns/model_import_summary.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ImportSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportSummary{} + // ImportSummary ImportSummary is the summary of the import. type ImportSummary struct { CreatedRRSets *int64 `json:"createdRRSets,omitempty"` @@ -19,3 +26,271 @@ type ImportSummary struct { UpdatedRRSets *int64 `json:"updatedRRSets,omitempty"` UpdatedRecords *int64 `json:"updatedRecords,omitempty"` } + +// NewImportSummary instantiates a new ImportSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportSummary() *ImportSummary { + this := ImportSummary{} + return &this +} + +// NewImportSummaryWithDefaults instantiates a new ImportSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportSummaryWithDefaults() *ImportSummary { + this := ImportSummary{} + return &this +} + +// GetCreatedRRSets returns the CreatedRRSets field value if set, zero value otherwise. +func (o *ImportSummary) GetCreatedRRSets() *int64 { + if o == nil || IsNil(o.CreatedRRSets) { + var ret *int64 + return ret + } + return o.CreatedRRSets +} + +// GetCreatedRRSetsOk returns a tuple with the CreatedRRSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportSummary) GetCreatedRRSetsOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedRRSets) { + return nil, false + } + return o.CreatedRRSets, true +} + +// HasCreatedRRSets returns a boolean if a field has been set. +func (o *ImportSummary) HasCreatedRRSets() bool { + if o != nil && !IsNil(o.CreatedRRSets) { + return true + } + + return false +} + +// SetCreatedRRSets gets a reference to the given int64 and assigns it to the CreatedRRSets field. +func (o *ImportSummary) SetCreatedRRSets(v *int64) { + o.CreatedRRSets = v +} + +// GetCreatedRecords returns the CreatedRecords field value if set, zero value otherwise. +func (o *ImportSummary) GetCreatedRecords() *int64 { + if o == nil || IsNil(o.CreatedRecords) { + var ret *int64 + return ret + } + return o.CreatedRecords +} + +// GetCreatedRecordsOk returns a tuple with the CreatedRecords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportSummary) GetCreatedRecordsOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedRecords) { + return nil, false + } + return o.CreatedRecords, true +} + +// HasCreatedRecords returns a boolean if a field has been set. +func (o *ImportSummary) HasCreatedRecords() bool { + if o != nil && !IsNil(o.CreatedRecords) { + return true + } + + return false +} + +// SetCreatedRecords gets a reference to the given int64 and assigns it to the CreatedRecords field. +func (o *ImportSummary) SetCreatedRecords(v *int64) { + o.CreatedRecords = v +} + +// GetDeletedRRSets returns the DeletedRRSets field value if set, zero value otherwise. +func (o *ImportSummary) GetDeletedRRSets() *int64 { + if o == nil || IsNil(o.DeletedRRSets) { + var ret *int64 + return ret + } + return o.DeletedRRSets +} + +// GetDeletedRRSetsOk returns a tuple with the DeletedRRSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportSummary) GetDeletedRRSetsOk() (*int64, bool) { + if o == nil || IsNil(o.DeletedRRSets) { + return nil, false + } + return o.DeletedRRSets, true +} + +// HasDeletedRRSets returns a boolean if a field has been set. +func (o *ImportSummary) HasDeletedRRSets() bool { + if o != nil && !IsNil(o.DeletedRRSets) { + return true + } + + return false +} + +// SetDeletedRRSets gets a reference to the given int64 and assigns it to the DeletedRRSets field. +func (o *ImportSummary) SetDeletedRRSets(v *int64) { + o.DeletedRRSets = v +} + +// GetDeletedRecords returns the DeletedRecords field value if set, zero value otherwise. +func (o *ImportSummary) GetDeletedRecords() *int64 { + if o == nil || IsNil(o.DeletedRecords) { + var ret *int64 + return ret + } + return o.DeletedRecords +} + +// GetDeletedRecordsOk returns a tuple with the DeletedRecords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportSummary) GetDeletedRecordsOk() (*int64, bool) { + if o == nil || IsNil(o.DeletedRecords) { + return nil, false + } + return o.DeletedRecords, true +} + +// HasDeletedRecords returns a boolean if a field has been set. +func (o *ImportSummary) HasDeletedRecords() bool { + if o != nil && !IsNil(o.DeletedRecords) { + return true + } + + return false +} + +// SetDeletedRecords gets a reference to the given int64 and assigns it to the DeletedRecords field. +func (o *ImportSummary) SetDeletedRecords(v *int64) { + o.DeletedRecords = v +} + +// GetUpdatedRRSets returns the UpdatedRRSets field value if set, zero value otherwise. +func (o *ImportSummary) GetUpdatedRRSets() *int64 { + if o == nil || IsNil(o.UpdatedRRSets) { + var ret *int64 + return ret + } + return o.UpdatedRRSets +} + +// GetUpdatedRRSetsOk returns a tuple with the UpdatedRRSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportSummary) GetUpdatedRRSetsOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedRRSets) { + return nil, false + } + return o.UpdatedRRSets, true +} + +// HasUpdatedRRSets returns a boolean if a field has been set. +func (o *ImportSummary) HasUpdatedRRSets() bool { + if o != nil && !IsNil(o.UpdatedRRSets) { + return true + } + + return false +} + +// SetUpdatedRRSets gets a reference to the given int64 and assigns it to the UpdatedRRSets field. +func (o *ImportSummary) SetUpdatedRRSets(v *int64) { + o.UpdatedRRSets = v +} + +// GetUpdatedRecords returns the UpdatedRecords field value if set, zero value otherwise. +func (o *ImportSummary) GetUpdatedRecords() *int64 { + if o == nil || IsNil(o.UpdatedRecords) { + var ret *int64 + return ret + } + return o.UpdatedRecords +} + +// GetUpdatedRecordsOk returns a tuple with the UpdatedRecords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportSummary) GetUpdatedRecordsOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedRecords) { + return nil, false + } + return o.UpdatedRecords, true +} + +// HasUpdatedRecords returns a boolean if a field has been set. +func (o *ImportSummary) HasUpdatedRecords() bool { + if o != nil && !IsNil(o.UpdatedRecords) { + return true + } + + return false +} + +// SetUpdatedRecords gets a reference to the given int64 and assigns it to the UpdatedRecords field. +func (o *ImportSummary) SetUpdatedRecords(v *int64) { + o.UpdatedRecords = v +} + +func (o ImportSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedRRSets) { + toSerialize["createdRRSets"] = o.CreatedRRSets + } + if !IsNil(o.CreatedRecords) { + toSerialize["createdRecords"] = o.CreatedRecords + } + if !IsNil(o.DeletedRRSets) { + toSerialize["deletedRRSets"] = o.DeletedRRSets + } + if !IsNil(o.DeletedRecords) { + toSerialize["deletedRecords"] = o.DeletedRecords + } + if !IsNil(o.UpdatedRRSets) { + toSerialize["updatedRRSets"] = o.UpdatedRRSets + } + if !IsNil(o.UpdatedRecords) { + toSerialize["updatedRecords"] = o.UpdatedRecords + } + return toSerialize, nil +} + +type NullableImportSummary struct { + value *ImportSummary + isSet bool +} + +func (v NullableImportSummary) Get() *ImportSummary { + return v.value +} + +func (v *NullableImportSummary) Set(val *ImportSummary) { + v.value = val + v.isSet = true +} + +func (v NullableImportSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableImportSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportSummary(val *ImportSummary) *NullableImportSummary { + return &NullableImportSummary{value: val, isSet: true} +} + +func (v NullableImportSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_label.go b/services/dns/model_label.go index 25a6975e5..d228500e9 100644 --- a/services/dns/model_label.go +++ b/services/dns/model_label.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the Label type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Label{} + // Label struct for Label type Label struct { // REQUIRED @@ -17,3 +24,115 @@ type Label struct { // REQUIRED Value *string `json:"value"` } + +type _Label Label + +// NewLabel instantiates a new Label object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLabel(key *string, value *string) *Label { + this := Label{} + this.Key = key + this.Value = value + return &this +} + +// NewLabelWithDefaults instantiates a new Label object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLabelWithDefaults() *Label { + this := Label{} + return &this +} + +// GetKey returns the Key field value +func (o *Label) GetKey() *string { + if o == nil { + var ret *string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *Label) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key, true +} + +// SetKey sets field value +func (o *Label) SetKey(v *string) { + o.Key = v +} + +// GetValue returns the Value field value +func (o *Label) GetValue() *string { + if o == nil { + var ret *string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *Label) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *Label) SetValue(v *string) { + o.Value = v +} + +func (o Label) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["value"] = o.Value + return toSerialize, nil +} + +type NullableLabel struct { + value *Label + isSet bool +} + +func (v NullableLabel) Get() *Label { + return v.value +} + +func (v *NullableLabel) Set(val *Label) { + v.value = val + v.isSet = true +} + +func (v NullableLabel) IsSet() bool { + return v.isSet +} + +func (v *NullableLabel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLabel(val *Label) *NullableLabel { + return &NullableLabel{value: val, isSet: true} +} + +func (v NullableLabel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLabel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_list_labels_response.go b/services/dns/model_list_labels_response.go index f28babf25..30531d4b1 100644 --- a/services/dns/model_list_labels_response.go +++ b/services/dns/model_list_labels_response.go @@ -10,8 +10,143 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ListLabelsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListLabelsResponse{} + // ListLabelsResponse ResponseAllLabels. type ListLabelsResponse struct { Labels *[]Label `json:"labels,omitempty"` Message *string `json:"message,omitempty"` } + +// NewListLabelsResponse instantiates a new ListLabelsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListLabelsResponse() *ListLabelsResponse { + this := ListLabelsResponse{} + return &this +} + +// NewListLabelsResponseWithDefaults instantiates a new ListLabelsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListLabelsResponseWithDefaults() *ListLabelsResponse { + this := ListLabelsResponse{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ListLabelsResponse) GetLabels() *[]Label { + if o == nil || IsNil(o.Labels) { + var ret *[]Label + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLabelsResponse) GetLabelsOk() (*[]Label, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ListLabelsResponse) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []Label and assigns it to the Labels field. +func (o *ListLabelsResponse) SetLabels(v *[]Label) { + o.Labels = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ListLabelsResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLabelsResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ListLabelsResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ListLabelsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o ListLabelsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableListLabelsResponse struct { + value *ListLabelsResponse + isSet bool +} + +func (v NullableListLabelsResponse) Get() *ListLabelsResponse { + return v.value +} + +func (v *NullableListLabelsResponse) Set(val *ListLabelsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListLabelsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListLabelsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListLabelsResponse(val *ListLabelsResponse) *NullableListLabelsResponse { + return &NullableListLabelsResponse{value: val, isSet: true} +} + +func (v NullableListLabelsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListLabelsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_list_record_sets_response.go b/services/dns/model_list_record_sets_response.go index dc30cabd6..36dec98eb 100644 --- a/services/dns/model_list_record_sets_response.go +++ b/services/dns/model_list_record_sets_response.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ListRecordSetsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRecordSetsResponse{} + // ListRecordSetsResponse ResponseRRSetAll. type ListRecordSetsResponse struct { // REQUIRED @@ -22,3 +29,202 @@ type ListRecordSetsResponse struct { // REQUIRED TotalPages *int64 `json:"totalPages"` } + +type _ListRecordSetsResponse ListRecordSetsResponse + +// NewListRecordSetsResponse instantiates a new ListRecordSetsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListRecordSetsResponse(itemsPerPage *int64, rrSets *[]RecordSet, totalItems *int64, totalPages *int64) *ListRecordSetsResponse { + this := ListRecordSetsResponse{} + this.ItemsPerPage = itemsPerPage + this.RrSets = rrSets + this.TotalItems = totalItems + this.TotalPages = totalPages + return &this +} + +// NewListRecordSetsResponseWithDefaults instantiates a new ListRecordSetsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListRecordSetsResponseWithDefaults() *ListRecordSetsResponse { + this := ListRecordSetsResponse{} + return &this +} + +// GetItemsPerPage returns the ItemsPerPage field value +func (o *ListRecordSetsResponse) GetItemsPerPage() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.ItemsPerPage +} + +// GetItemsPerPageOk returns a tuple with the ItemsPerPage field value +// and a boolean to check if the value has been set. +func (o *ListRecordSetsResponse) GetItemsPerPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.ItemsPerPage, true +} + +// SetItemsPerPage sets field value +func (o *ListRecordSetsResponse) SetItemsPerPage(v *int64) { + o.ItemsPerPage = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ListRecordSetsResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRecordSetsResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ListRecordSetsResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ListRecordSetsResponse) SetMessage(v *string) { + o.Message = v +} + +// GetRrSets returns the RrSets field value +func (o *ListRecordSetsResponse) GetRrSets() *[]RecordSet { + if o == nil { + var ret *[]RecordSet + return ret + } + + return o.RrSets +} + +// GetRrSetsOk returns a tuple with the RrSets field value +// and a boolean to check if the value has been set. +func (o *ListRecordSetsResponse) GetRrSetsOk() (*[]RecordSet, bool) { + if o == nil { + return nil, false + } + return o.RrSets, true +} + +// SetRrSets sets field value +func (o *ListRecordSetsResponse) SetRrSets(v *[]RecordSet) { + o.RrSets = v +} + +// GetTotalItems returns the TotalItems field value +func (o *ListRecordSetsResponse) GetTotalItems() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TotalItems +} + +// GetTotalItemsOk returns a tuple with the TotalItems field value +// and a boolean to check if the value has been set. +func (o *ListRecordSetsResponse) GetTotalItemsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalItems, true +} + +// SetTotalItems sets field value +func (o *ListRecordSetsResponse) SetTotalItems(v *int64) { + o.TotalItems = v +} + +// GetTotalPages returns the TotalPages field value +func (o *ListRecordSetsResponse) GetTotalPages() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *ListRecordSetsResponse) GetTotalPagesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *ListRecordSetsResponse) SetTotalPages(v *int64) { + o.TotalPages = v +} + +func (o ListRecordSetsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["itemsPerPage"] = o.ItemsPerPage + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + toSerialize["rrSets"] = o.RrSets + toSerialize["totalItems"] = o.TotalItems + toSerialize["totalPages"] = o.TotalPages + return toSerialize, nil +} + +type NullableListRecordSetsResponse struct { + value *ListRecordSetsResponse + isSet bool +} + +func (v NullableListRecordSetsResponse) Get() *ListRecordSetsResponse { + return v.value +} + +func (v *NullableListRecordSetsResponse) Set(val *ListRecordSetsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRecordSetsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRecordSetsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRecordSetsResponse(val *ListRecordSetsResponse) *NullableListRecordSetsResponse { + return &NullableListRecordSetsResponse{value: val, isSet: true} +} + +func (v NullableListRecordSetsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRecordSetsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_list_zones_response.go b/services/dns/model_list_zones_response.go index 688deb173..ac8da81d4 100644 --- a/services/dns/model_list_zones_response.go +++ b/services/dns/model_list_zones_response.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ListZonesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListZonesResponse{} + // ListZonesResponse ResponseZoneAll for filtered zones. type ListZonesResponse struct { // REQUIRED @@ -22,3 +29,202 @@ type ListZonesResponse struct { // REQUIRED Zones *[]Zone `json:"zones"` } + +type _ListZonesResponse ListZonesResponse + +// NewListZonesResponse instantiates a new ListZonesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListZonesResponse(itemsPerPage *int64, totalItems *int64, totalPages *int64, zones *[]Zone) *ListZonesResponse { + this := ListZonesResponse{} + this.ItemsPerPage = itemsPerPage + this.TotalItems = totalItems + this.TotalPages = totalPages + this.Zones = zones + return &this +} + +// NewListZonesResponseWithDefaults instantiates a new ListZonesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListZonesResponseWithDefaults() *ListZonesResponse { + this := ListZonesResponse{} + return &this +} + +// GetItemsPerPage returns the ItemsPerPage field value +func (o *ListZonesResponse) GetItemsPerPage() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.ItemsPerPage +} + +// GetItemsPerPageOk returns a tuple with the ItemsPerPage field value +// and a boolean to check if the value has been set. +func (o *ListZonesResponse) GetItemsPerPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.ItemsPerPage, true +} + +// SetItemsPerPage sets field value +func (o *ListZonesResponse) SetItemsPerPage(v *int64) { + o.ItemsPerPage = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ListZonesResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListZonesResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ListZonesResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ListZonesResponse) SetMessage(v *string) { + o.Message = v +} + +// GetTotalItems returns the TotalItems field value +func (o *ListZonesResponse) GetTotalItems() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TotalItems +} + +// GetTotalItemsOk returns a tuple with the TotalItems field value +// and a boolean to check if the value has been set. +func (o *ListZonesResponse) GetTotalItemsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalItems, true +} + +// SetTotalItems sets field value +func (o *ListZonesResponse) SetTotalItems(v *int64) { + o.TotalItems = v +} + +// GetTotalPages returns the TotalPages field value +func (o *ListZonesResponse) GetTotalPages() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *ListZonesResponse) GetTotalPagesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *ListZonesResponse) SetTotalPages(v *int64) { + o.TotalPages = v +} + +// GetZones returns the Zones field value +func (o *ListZonesResponse) GetZones() *[]Zone { + if o == nil { + var ret *[]Zone + return ret + } + + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value +// and a boolean to check if the value has been set. +func (o *ListZonesResponse) GetZonesOk() (*[]Zone, bool) { + if o == nil { + return nil, false + } + return o.Zones, true +} + +// SetZones sets field value +func (o *ListZonesResponse) SetZones(v *[]Zone) { + o.Zones = v +} + +func (o ListZonesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["itemsPerPage"] = o.ItemsPerPage + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + toSerialize["totalItems"] = o.TotalItems + toSerialize["totalPages"] = o.TotalPages + toSerialize["zones"] = o.Zones + return toSerialize, nil +} + +type NullableListZonesResponse struct { + value *ListZonesResponse + isSet bool +} + +func (v NullableListZonesResponse) Get() *ListZonesResponse { + return v.value +} + +func (v *NullableListZonesResponse) Set(val *ListZonesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListZonesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListZonesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListZonesResponse(val *ListZonesResponse) *NullableListZonesResponse { + return &NullableListZonesResponse{value: val, isSet: true} +} + +func (v NullableListZonesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListZonesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_message.go b/services/dns/model_message.go index d4f0fff44..7a8daac3e 100644 --- a/services/dns/model_message.go +++ b/services/dns/model_message.go @@ -10,7 +10,107 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the Message type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Message{} + // Message struct for Message type Message struct { Message *string `json:"message,omitempty"` } + +// NewMessage instantiates a new Message object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMessage() *Message { + this := Message{} + return &this +} + +// NewMessageWithDefaults instantiates a new Message object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMessageWithDefaults() *Message { + this := Message{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Message) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Message) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Message) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Message) SetMessage(v *string) { + o.Message = v +} + +func (o Message) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableMessage struct { + value *Message + isSet bool +} + +func (v NullableMessage) Get() *Message { + return v.value +} + +func (v *NullableMessage) Set(val *Message) { + v.value = val + v.isSet = true +} + +func (v NullableMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessage(val *Message) *NullableMessage { + return &NullableMessage{value: val, isSet: true} +} + +func (v NullableMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_move_code_response.go b/services/dns/model_move_code_response.go index 05425c25d..33fd6e8b6 100644 --- a/services/dns/model_move_code_response.go +++ b/services/dns/model_move_code_response.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the MoveCodeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MoveCodeResponse{} + // MoveCodeResponse struct for MoveCodeResponse type MoveCodeResponse struct { // code to move the zone. It is one time shown so better keep it. @@ -21,3 +28,150 @@ type MoveCodeResponse struct { // human readable message Message *string `json:"message,omitempty"` } + +type _MoveCodeResponse MoveCodeResponse + +// NewMoveCodeResponse instantiates a new MoveCodeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMoveCodeResponse(code *string, expiresAt *string) *MoveCodeResponse { + this := MoveCodeResponse{} + this.Code = code + this.ExpiresAt = expiresAt + return &this +} + +// NewMoveCodeResponseWithDefaults instantiates a new MoveCodeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMoveCodeResponseWithDefaults() *MoveCodeResponse { + this := MoveCodeResponse{} + return &this +} + +// GetCode returns the Code field value +func (o *MoveCodeResponse) GetCode() *string { + if o == nil { + var ret *string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *MoveCodeResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code, true +} + +// SetCode sets field value +func (o *MoveCodeResponse) SetCode(v *string) { + o.Code = v +} + +// GetExpiresAt returns the ExpiresAt field value +func (o *MoveCodeResponse) GetExpiresAt() *string { + if o == nil { + var ret *string + return ret + } + + return o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value +// and a boolean to check if the value has been set. +func (o *MoveCodeResponse) GetExpiresAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExpiresAt, true +} + +// SetExpiresAt sets field value +func (o *MoveCodeResponse) SetExpiresAt(v *string) { + o.ExpiresAt = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *MoveCodeResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MoveCodeResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *MoveCodeResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *MoveCodeResponse) SetMessage(v *string) { + o.Message = v +} + +func (o MoveCodeResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["expiresAt"] = o.ExpiresAt + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableMoveCodeResponse struct { + value *MoveCodeResponse + isSet bool +} + +func (v NullableMoveCodeResponse) Get() *MoveCodeResponse { + return v.value +} + +func (v *NullableMoveCodeResponse) Set(val *MoveCodeResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMoveCodeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMoveCodeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMoveCodeResponse(val *MoveCodeResponse) *NullableMoveCodeResponse { + return &NullableMoveCodeResponse{value: val, isSet: true} +} + +func (v NullableMoveCodeResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMoveCodeResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_move_zone_payload.go b/services/dns/model_move_zone_payload.go index 8138bd2bd..0c7a97bb1 100644 --- a/services/dns/model_move_zone_payload.go +++ b/services/dns/model_move_zone_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the MoveZonePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MoveZonePayload{} + // MoveZonePayload body to move zone from one project to another. type MoveZonePayload struct { // Code to move the zone. It must be valid, not expired and belong @@ -19,3 +26,115 @@ type MoveZonePayload struct { // REQUIRED ZoneDnsName *string `json:"zoneDnsName"` } + +type _MoveZonePayload MoveZonePayload + +// NewMoveZonePayload instantiates a new MoveZonePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMoveZonePayload(code *string, zoneDnsName *string) *MoveZonePayload { + this := MoveZonePayload{} + this.Code = code + this.ZoneDnsName = zoneDnsName + return &this +} + +// NewMoveZonePayloadWithDefaults instantiates a new MoveZonePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMoveZonePayloadWithDefaults() *MoveZonePayload { + this := MoveZonePayload{} + return &this +} + +// GetCode returns the Code field value +func (o *MoveZonePayload) GetCode() *string { + if o == nil { + var ret *string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *MoveZonePayload) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code, true +} + +// SetCode sets field value +func (o *MoveZonePayload) SetCode(v *string) { + o.Code = v +} + +// GetZoneDnsName returns the ZoneDnsName field value +func (o *MoveZonePayload) GetZoneDnsName() *string { + if o == nil { + var ret *string + return ret + } + + return o.ZoneDnsName +} + +// GetZoneDnsNameOk returns a tuple with the ZoneDnsName field value +// and a boolean to check if the value has been set. +func (o *MoveZonePayload) GetZoneDnsNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ZoneDnsName, true +} + +// SetZoneDnsName sets field value +func (o *MoveZonePayload) SetZoneDnsName(v *string) { + o.ZoneDnsName = v +} + +func (o MoveZonePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["zoneDnsName"] = o.ZoneDnsName + return toSerialize, nil +} + +type NullableMoveZonePayload struct { + value *MoveZonePayload + isSet bool +} + +func (v NullableMoveZonePayload) Get() *MoveZonePayload { + return v.value +} + +func (v *NullableMoveZonePayload) Set(val *MoveZonePayload) { + v.value = val + v.isSet = true +} + +func (v NullableMoveZonePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableMoveZonePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMoveZonePayload(val *MoveZonePayload) *NullableMoveZonePayload { + return &NullableMoveZonePayload{value: val, isSet: true} +} + +func (v NullableMoveZonePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMoveZonePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_partial_update_record_payload.go b/services/dns/model_partial_update_record_payload.go index e7f81418b..25c072739 100644 --- a/services/dns/model_partial_update_record_payload.go +++ b/services/dns/model_partial_update_record_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the PartialUpdateRecordPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateRecordPayload{} + // PartialUpdateRecordPayload RecordPatch for record patch in record set. type PartialUpdateRecordPayload struct { // REQUIRED @@ -18,3 +25,115 @@ type PartialUpdateRecordPayload struct { // REQUIRED Records *[]RecordPayload `json:"records"` } + +type _PartialUpdateRecordPayload PartialUpdateRecordPayload + +// NewPartialUpdateRecordPayload instantiates a new PartialUpdateRecordPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPartialUpdateRecordPayload(action *string, records *[]RecordPayload) *PartialUpdateRecordPayload { + this := PartialUpdateRecordPayload{} + this.Action = action + this.Records = records + return &this +} + +// NewPartialUpdateRecordPayloadWithDefaults instantiates a new PartialUpdateRecordPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPartialUpdateRecordPayloadWithDefaults() *PartialUpdateRecordPayload { + this := PartialUpdateRecordPayload{} + return &this +} + +// GetAction returns the Action field value +func (o *PartialUpdateRecordPayload) GetAction() *string { + if o == nil { + var ret *string + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateRecordPayload) GetActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Action, true +} + +// SetAction sets field value +func (o *PartialUpdateRecordPayload) SetAction(v *string) { + o.Action = v +} + +// GetRecords returns the Records field value +func (o *PartialUpdateRecordPayload) GetRecords() *[]RecordPayload { + if o == nil { + var ret *[]RecordPayload + return ret + } + + return o.Records +} + +// GetRecordsOk returns a tuple with the Records field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateRecordPayload) GetRecordsOk() (*[]RecordPayload, bool) { + if o == nil { + return nil, false + } + return o.Records, true +} + +// SetRecords sets field value +func (o *PartialUpdateRecordPayload) SetRecords(v *[]RecordPayload) { + o.Records = v +} + +func (o PartialUpdateRecordPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["action"] = o.Action + toSerialize["records"] = o.Records + return toSerialize, nil +} + +type NullablePartialUpdateRecordPayload struct { + value *PartialUpdateRecordPayload + isSet bool +} + +func (v NullablePartialUpdateRecordPayload) Get() *PartialUpdateRecordPayload { + return v.value +} + +func (v *NullablePartialUpdateRecordPayload) Set(val *PartialUpdateRecordPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateRecordPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateRecordPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateRecordPayload(val *PartialUpdateRecordPayload) *NullablePartialUpdateRecordPayload { + return &NullablePartialUpdateRecordPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateRecordPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateRecordPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_partial_update_record_set_payload.go b/services/dns/model_partial_update_record_set_payload.go index ca3208d59..685ad266a 100644 --- a/services/dns/model_partial_update_record_set_payload.go +++ b/services/dns/model_partial_update_record_set_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the PartialUpdateRecordSetPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateRecordSetPayload{} + // PartialUpdateRecordSetPayload RRSetPatch for rr patch set info. type PartialUpdateRecordSetPayload struct { // user comment @@ -21,3 +28,201 @@ type PartialUpdateRecordSetPayload struct { // time to live Ttl *int64 `json:"ttl,omitempty"` } + +// NewPartialUpdateRecordSetPayload instantiates a new PartialUpdateRecordSetPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPartialUpdateRecordSetPayload() *PartialUpdateRecordSetPayload { + this := PartialUpdateRecordSetPayload{} + return &this +} + +// NewPartialUpdateRecordSetPayloadWithDefaults instantiates a new PartialUpdateRecordSetPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPartialUpdateRecordSetPayloadWithDefaults() *PartialUpdateRecordSetPayload { + this := PartialUpdateRecordSetPayload{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *PartialUpdateRecordSetPayload) GetComment() *string { + if o == nil || IsNil(o.Comment) { + var ret *string + return ret + } + return o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateRecordSetPayload) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *PartialUpdateRecordSetPayload) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *PartialUpdateRecordSetPayload) SetComment(v *string) { + o.Comment = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateRecordSetPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + 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. +func (o *PartialUpdateRecordSetPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PartialUpdateRecordSetPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PartialUpdateRecordSetPayload) SetName(v *string) { + o.Name = v +} + +// GetRecords returns the Records field value if set, zero value otherwise. +func (o *PartialUpdateRecordSetPayload) GetRecords() *[]RecordPayload { + if o == nil || IsNil(o.Records) { + var ret *[]RecordPayload + return ret + } + return o.Records +} + +// GetRecordsOk returns a tuple with the Records field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateRecordSetPayload) GetRecordsOk() (*[]RecordPayload, bool) { + if o == nil || IsNil(o.Records) { + return nil, false + } + return o.Records, true +} + +// HasRecords returns a boolean if a field has been set. +func (o *PartialUpdateRecordSetPayload) HasRecords() bool { + if o != nil && !IsNil(o.Records) { + return true + } + + return false +} + +// SetRecords gets a reference to the given []RecordPayload and assigns it to the Records field. +func (o *PartialUpdateRecordSetPayload) SetRecords(v *[]RecordPayload) { + o.Records = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *PartialUpdateRecordSetPayload) GetTtl() *int64 { + if o == nil || IsNil(o.Ttl) { + var ret *int64 + return ret + } + return o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateRecordSetPayload) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *PartialUpdateRecordSetPayload) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *PartialUpdateRecordSetPayload) SetTtl(v *int64) { + o.Ttl = v +} + +func (o PartialUpdateRecordSetPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Records) { + toSerialize["records"] = o.Records + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + return toSerialize, nil +} + +type NullablePartialUpdateRecordSetPayload struct { + value *PartialUpdateRecordSetPayload + isSet bool +} + +func (v NullablePartialUpdateRecordSetPayload) Get() *PartialUpdateRecordSetPayload { + return v.value +} + +func (v *NullablePartialUpdateRecordSetPayload) Set(val *PartialUpdateRecordSetPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateRecordSetPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateRecordSetPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateRecordSetPayload(val *PartialUpdateRecordSetPayload) *NullablePartialUpdateRecordSetPayload { + return &NullablePartialUpdateRecordSetPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateRecordSetPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateRecordSetPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_partial_update_zone_payload.go b/services/dns/model_partial_update_zone_payload.go index 64d2f44ef..fee7a6b73 100644 --- a/services/dns/model_partial_update_zone_payload.go +++ b/services/dns/model_partial_update_zone_payload.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the PartialUpdateZonePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateZonePayload{} + // PartialUpdateZonePayload struct for PartialUpdateZonePayload type PartialUpdateZonePayload struct { // access control list @@ -33,3 +40,419 @@ type PartialUpdateZonePayload struct { // retry time RetryTime *int64 `json:"retryTime,omitempty"` } + +// NewPartialUpdateZonePayload instantiates a new PartialUpdateZonePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPartialUpdateZonePayload() *PartialUpdateZonePayload { + this := PartialUpdateZonePayload{} + var acl string = "0.0.0.0/0,::/0" + this.Acl = &acl + var contactEmail string = "hostmaster@stackit.cloud" + this.ContactEmail = &contactEmail + return &this +} + +// NewPartialUpdateZonePayloadWithDefaults instantiates a new PartialUpdateZonePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPartialUpdateZonePayloadWithDefaults() *PartialUpdateZonePayload { + this := PartialUpdateZonePayload{} + var acl string = "0.0.0.0/0,::/0" + this.Acl = &acl + var contactEmail string = "hostmaster@stackit.cloud" + this.ContactEmail = &contactEmail + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetAcl() *string { + if o == nil || IsNil(o.Acl) { + var ret *string + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetAclOk() (*string, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given string and assigns it to the Acl field. +func (o *PartialUpdateZonePayload) SetAcl(v *string) { + o.Acl = v +} + +// GetContactEmail returns the ContactEmail field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetContactEmail() *string { + if o == nil || IsNil(o.ContactEmail) { + var ret *string + return ret + } + return o.ContactEmail +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetContactEmailOk() (*string, bool) { + if o == nil || IsNil(o.ContactEmail) { + return nil, false + } + return o.ContactEmail, true +} + +// HasContactEmail returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasContactEmail() bool { + if o != nil && !IsNil(o.ContactEmail) { + return true + } + + return false +} + +// SetContactEmail gets a reference to the given string and assigns it to the ContactEmail field. +func (o *PartialUpdateZonePayload) SetContactEmail(v *string) { + o.ContactEmail = v +} + +// GetDefaultTTL returns the DefaultTTL field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetDefaultTTL() *int64 { + if o == nil || IsNil(o.DefaultTTL) { + var ret *int64 + return ret + } + return o.DefaultTTL +} + +// GetDefaultTTLOk returns a tuple with the DefaultTTL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetDefaultTTLOk() (*int64, bool) { + if o == nil || IsNil(o.DefaultTTL) { + return nil, false + } + return o.DefaultTTL, true +} + +// HasDefaultTTL returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasDefaultTTL() bool { + if o != nil && !IsNil(o.DefaultTTL) { + return true + } + + return false +} + +// SetDefaultTTL gets a reference to the given int64 and assigns it to the DefaultTTL field. +func (o *PartialUpdateZonePayload) SetDefaultTTL(v *int64) { + o.DefaultTTL = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + 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. +func (o *PartialUpdateZonePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PartialUpdateZonePayload) SetDescription(v *string) { + o.Description = v +} + +// GetExpireTime returns the ExpireTime field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetExpireTime() *int64 { + if o == nil || IsNil(o.ExpireTime) { + var ret *int64 + return ret + } + return o.ExpireTime +} + +// GetExpireTimeOk returns a tuple with the ExpireTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetExpireTimeOk() (*int64, bool) { + if o == nil || IsNil(o.ExpireTime) { + return nil, false + } + return o.ExpireTime, true +} + +// HasExpireTime returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasExpireTime() bool { + if o != nil && !IsNil(o.ExpireTime) { + return true + } + + return false +} + +// SetExpireTime gets a reference to the given int64 and assigns it to the ExpireTime field. +func (o *PartialUpdateZonePayload) SetExpireTime(v *int64) { + o.ExpireTime = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + 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. +func (o *PartialUpdateZonePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PartialUpdateZonePayload) SetName(v *string) { + o.Name = v +} + +// GetNegativeCache returns the NegativeCache field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetNegativeCache() *int64 { + if o == nil || IsNil(o.NegativeCache) { + var ret *int64 + return ret + } + return o.NegativeCache +} + +// GetNegativeCacheOk returns a tuple with the NegativeCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetNegativeCacheOk() (*int64, bool) { + if o == nil || IsNil(o.NegativeCache) { + return nil, false + } + return o.NegativeCache, true +} + +// HasNegativeCache returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasNegativeCache() bool { + if o != nil && !IsNil(o.NegativeCache) { + return true + } + + return false +} + +// SetNegativeCache gets a reference to the given int64 and assigns it to the NegativeCache field. +func (o *PartialUpdateZonePayload) SetNegativeCache(v *int64) { + o.NegativeCache = v +} + +// GetPrimaries returns the Primaries field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetPrimaries() *[]string { + if o == nil || IsNil(o.Primaries) { + var ret *[]string + return ret + } + return o.Primaries +} + +// GetPrimariesOk returns a tuple with the Primaries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetPrimariesOk() (*[]string, bool) { + if o == nil || IsNil(o.Primaries) { + return nil, false + } + return o.Primaries, true +} + +// HasPrimaries returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasPrimaries() bool { + if o != nil && !IsNil(o.Primaries) { + return true + } + + return false +} + +// SetPrimaries gets a reference to the given []string and assigns it to the Primaries field. +func (o *PartialUpdateZonePayload) SetPrimaries(v *[]string) { + o.Primaries = v +} + +// GetRefreshTime returns the RefreshTime field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetRefreshTime() *int64 { + if o == nil || IsNil(o.RefreshTime) { + var ret *int64 + return ret + } + return o.RefreshTime +} + +// GetRefreshTimeOk returns a tuple with the RefreshTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetRefreshTimeOk() (*int64, bool) { + if o == nil || IsNil(o.RefreshTime) { + return nil, false + } + return o.RefreshTime, true +} + +// HasRefreshTime returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasRefreshTime() bool { + if o != nil && !IsNil(o.RefreshTime) { + return true + } + + return false +} + +// SetRefreshTime gets a reference to the given int64 and assigns it to the RefreshTime field. +func (o *PartialUpdateZonePayload) SetRefreshTime(v *int64) { + o.RefreshTime = v +} + +// GetRetryTime returns the RetryTime field value if set, zero value otherwise. +func (o *PartialUpdateZonePayload) GetRetryTime() *int64 { + if o == nil || IsNil(o.RetryTime) { + var ret *int64 + return ret + } + return o.RetryTime +} + +// GetRetryTimeOk returns a tuple with the RetryTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateZonePayload) GetRetryTimeOk() (*int64, bool) { + if o == nil || IsNil(o.RetryTime) { + return nil, false + } + return o.RetryTime, true +} + +// HasRetryTime returns a boolean if a field has been set. +func (o *PartialUpdateZonePayload) HasRetryTime() bool { + if o != nil && !IsNil(o.RetryTime) { + return true + } + + return false +} + +// SetRetryTime gets a reference to the given int64 and assigns it to the RetryTime field. +func (o *PartialUpdateZonePayload) SetRetryTime(v *int64) { + o.RetryTime = v +} + +func (o PartialUpdateZonePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.ContactEmail) { + toSerialize["contactEmail"] = o.ContactEmail + } + if !IsNil(o.DefaultTTL) { + toSerialize["defaultTTL"] = o.DefaultTTL + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExpireTime) { + toSerialize["expireTime"] = o.ExpireTime + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.NegativeCache) { + toSerialize["negativeCache"] = o.NegativeCache + } + if !IsNil(o.Primaries) { + toSerialize["primaries"] = o.Primaries + } + if !IsNil(o.RefreshTime) { + toSerialize["refreshTime"] = o.RefreshTime + } + if !IsNil(o.RetryTime) { + toSerialize["retryTime"] = o.RetryTime + } + return toSerialize, nil +} + +type NullablePartialUpdateZonePayload struct { + value *PartialUpdateZonePayload + isSet bool +} + +func (v NullablePartialUpdateZonePayload) Get() *PartialUpdateZonePayload { + return v.value +} + +func (v *NullablePartialUpdateZonePayload) Set(val *PartialUpdateZonePayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateZonePayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateZonePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateZonePayload(val *PartialUpdateZonePayload) *NullablePartialUpdateZonePayload { + return &NullablePartialUpdateZonePayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateZonePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateZonePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_record.go b/services/dns/model_record.go index 62d048044..7e00f59c0 100644 --- a/services/dns/model_record.go +++ b/services/dns/model_record.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the Record type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Record{} + // Record Record. type Record struct { // content of the record @@ -19,3 +26,115 @@ type Record struct { // REQUIRED Id *string `json:"id"` } + +type _Record Record + +// NewRecord instantiates a new Record object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecord(content *string, id *string) *Record { + this := Record{} + this.Content = content + this.Id = id + return &this +} + +// NewRecordWithDefaults instantiates a new Record object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordWithDefaults() *Record { + this := Record{} + return &this +} + +// GetContent returns the Content field value +func (o *Record) GetContent() *string { + if o == nil { + var ret *string + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *Record) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Content, true +} + +// SetContent sets field value +func (o *Record) SetContent(v *string) { + o.Content = v +} + +// GetId returns the Id field value +func (o *Record) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Record) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *Record) SetId(v *string) { + o.Id = v +} + +func (o Record) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content"] = o.Content + toSerialize["id"] = o.Id + return toSerialize, nil +} + +type NullableRecord struct { + value *Record + isSet bool +} + +func (v NullableRecord) Get() *Record { + return v.value +} + +func (v *NullableRecord) Set(val *Record) { + v.value = val + v.isSet = true +} + +func (v NullableRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecord(val *Record) *NullableRecord { + return &NullableRecord{value: val, isSet: true} +} + +func (v NullableRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_record_data_exchange.go b/services/dns/model_record_data_exchange.go index c71070112..f69ea488a 100644 --- a/services/dns/model_record_data_exchange.go +++ b/services/dns/model_record_data_exchange.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the RecordDataExchange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecordDataExchange{} + // RecordDataExchange struct for RecordDataExchange type RecordDataExchange struct { Comment *string `json:"comment,omitempty"` @@ -18,3 +25,236 @@ type RecordDataExchange struct { Ttl *int64 `json:"ttl,omitempty"` Type *string `json:"type,omitempty"` } + +// NewRecordDataExchange instantiates a new RecordDataExchange object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecordDataExchange() *RecordDataExchange { + this := RecordDataExchange{} + return &this +} + +// NewRecordDataExchangeWithDefaults instantiates a new RecordDataExchange object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordDataExchangeWithDefaults() *RecordDataExchange { + this := RecordDataExchange{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *RecordDataExchange) GetComment() *string { + if o == nil || IsNil(o.Comment) { + var ret *string + return ret + } + return o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordDataExchange) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *RecordDataExchange) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *RecordDataExchange) SetComment(v *string) { + o.Comment = v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *RecordDataExchange) GetContent() *[]string { + if o == nil || IsNil(o.Content) { + var ret *[]string + return ret + } + return o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordDataExchange) GetContentOk() (*[]string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *RecordDataExchange) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given []string and assigns it to the Content field. +func (o *RecordDataExchange) SetContent(v *[]string) { + o.Content = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RecordDataExchange) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + 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. +func (o *RecordDataExchange) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RecordDataExchange) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RecordDataExchange) SetName(v *string) { + o.Name = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *RecordDataExchange) GetTtl() *int64 { + if o == nil || IsNil(o.Ttl) { + var ret *int64 + return ret + } + return o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordDataExchange) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *RecordDataExchange) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *RecordDataExchange) SetTtl(v *int64) { + o.Ttl = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RecordDataExchange) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordDataExchange) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RecordDataExchange) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RecordDataExchange) SetType(v *string) { + o.Type = v +} + +func (o RecordDataExchange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableRecordDataExchange struct { + value *RecordDataExchange + isSet bool +} + +func (v NullableRecordDataExchange) Get() *RecordDataExchange { + return v.value +} + +func (v *NullableRecordDataExchange) Set(val *RecordDataExchange) { + v.value = val + v.isSet = true +} + +func (v NullableRecordDataExchange) IsSet() bool { + return v.isSet +} + +func (v *NullableRecordDataExchange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecordDataExchange(val *RecordDataExchange) *NullableRecordDataExchange { + return &NullableRecordDataExchange{value: val, isSet: true} +} + +func (v NullableRecordDataExchange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecordDataExchange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_record_payload.go b/services/dns/model_record_payload.go index 365ac6b77..c191d7c05 100644 --- a/services/dns/model_record_payload.go +++ b/services/dns/model_record_payload.go @@ -10,9 +10,102 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the RecordPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecordPayload{} + // RecordPayload RecordPost for rr set info. type RecordPayload struct { // content of the record // REQUIRED Content *string `json:"content"` } + +type _RecordPayload RecordPayload + +// NewRecordPayload instantiates a new RecordPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecordPayload(content *string) *RecordPayload { + this := RecordPayload{} + this.Content = content + return &this +} + +// NewRecordPayloadWithDefaults instantiates a new RecordPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordPayloadWithDefaults() *RecordPayload { + this := RecordPayload{} + return &this +} + +// GetContent returns the Content field value +func (o *RecordPayload) GetContent() *string { + if o == nil { + var ret *string + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *RecordPayload) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Content, true +} + +// SetContent sets field value +func (o *RecordPayload) SetContent(v *string) { + o.Content = v +} + +func (o RecordPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content"] = o.Content + return toSerialize, nil +} + +type NullableRecordPayload struct { + value *RecordPayload + isSet bool +} + +func (v NullableRecordPayload) Get() *RecordPayload { + return v.value +} + +func (v *NullableRecordPayload) Set(val *RecordPayload) { + v.value = val + v.isSet = true +} + +func (v NullableRecordPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRecordPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecordPayload(val *RecordPayload) *NullableRecordPayload { + return &NullableRecordPayload{value: val, isSet: true} +} + +func (v NullableRecordPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecordPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_record_set.go b/services/dns/model_record_set.go index 4e7d4f652..c9b2289dd 100644 --- a/services/dns/model_record_set.go +++ b/services/dns/model_record_set.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the RecordSet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecordSet{} + // RecordSet RRSet. type RecordSet struct { // if the record set is active or not @@ -49,3 +56,428 @@ type RecordSet struct { // REQUIRED UpdateStarted *string `json:"updateStarted"` } + +type _RecordSet RecordSet + +// NewRecordSet instantiates a new RecordSet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecordSet(creationFinished *string, creationStarted *string, id *string, name *string, records *[]Record, state *string, ttl *int64, type_ *string, updateFinished *string, updateStarted *string) *RecordSet { + this := RecordSet{} + this.CreationFinished = creationFinished + this.CreationStarted = creationStarted + this.Id = id + this.Name = name + this.Records = records + this.State = state + this.Ttl = ttl + this.Type = type_ + this.UpdateFinished = updateFinished + this.UpdateStarted = updateStarted + return &this +} + +// NewRecordSetWithDefaults instantiates a new RecordSet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordSetWithDefaults() *RecordSet { + this := RecordSet{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *RecordSet) GetActive() *bool { + if o == nil || IsNil(o.Active) { + var ret *bool + return ret + } + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordSet) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *RecordSet) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *RecordSet) SetActive(v *bool) { + o.Active = v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *RecordSet) GetComment() *string { + if o == nil || IsNil(o.Comment) { + var ret *string + return ret + } + return o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordSet) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *RecordSet) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *RecordSet) SetComment(v *string) { + o.Comment = v +} + +// GetCreationFinished returns the CreationFinished field value +func (o *RecordSet) GetCreationFinished() *string { + if o == nil { + var ret *string + return ret + } + + return o.CreationFinished +} + +// GetCreationFinishedOk returns a tuple with the CreationFinished field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetCreationFinishedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreationFinished, true +} + +// SetCreationFinished sets field value +func (o *RecordSet) SetCreationFinished(v *string) { + o.CreationFinished = v +} + +// GetCreationStarted returns the CreationStarted field value +func (o *RecordSet) GetCreationStarted() *string { + if o == nil { + var ret *string + return ret + } + + return o.CreationStarted +} + +// GetCreationStartedOk returns a tuple with the CreationStarted field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetCreationStartedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreationStarted, true +} + +// SetCreationStarted sets field value +func (o *RecordSet) SetCreationStarted(v *string) { + o.CreationStarted = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *RecordSet) GetError() *string { + if o == nil || IsNil(o.Error) { + var ret *string + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordSet) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *RecordSet) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *RecordSet) SetError(v *string) { + o.Error = v +} + +// GetId returns the Id field value +func (o *RecordSet) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *RecordSet) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *RecordSet) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *RecordSet) SetName(v *string) { + o.Name = v +} + +// GetRecords returns the Records field value +func (o *RecordSet) GetRecords() *[]Record { + if o == nil { + var ret *[]Record + return ret + } + + return o.Records +} + +// GetRecordsOk returns a tuple with the Records field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetRecordsOk() (*[]Record, bool) { + if o == nil { + return nil, false + } + return o.Records, true +} + +// SetRecords sets field value +func (o *RecordSet) SetRecords(v *[]Record) { + o.Records = v +} + +// GetState returns the State field value +func (o *RecordSet) GetState() *string { + if o == nil { + var ret *string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State, true +} + +// SetState sets field value +func (o *RecordSet) SetState(v *string) { + o.State = v +} + +// GetTtl returns the Ttl field value +func (o *RecordSet) GetTtl() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetTtlOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Ttl, true +} + +// SetTtl sets field value +func (o *RecordSet) SetTtl(v *int64) { + o.Ttl = v +} + +// GetType returns the Type field value +func (o *RecordSet) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *RecordSet) SetType(v *string) { + o.Type = v +} + +// GetUpdateFinished returns the UpdateFinished field value +func (o *RecordSet) GetUpdateFinished() *string { + if o == nil { + var ret *string + return ret + } + + return o.UpdateFinished +} + +// GetUpdateFinishedOk returns a tuple with the UpdateFinished field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetUpdateFinishedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdateFinished, true +} + +// SetUpdateFinished sets field value +func (o *RecordSet) SetUpdateFinished(v *string) { + o.UpdateFinished = v +} + +// GetUpdateStarted returns the UpdateStarted field value +func (o *RecordSet) GetUpdateStarted() *string { + if o == nil { + var ret *string + return ret + } + + return o.UpdateStarted +} + +// GetUpdateStartedOk returns a tuple with the UpdateStarted field value +// and a boolean to check if the value has been set. +func (o *RecordSet) GetUpdateStartedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdateStarted, true +} + +// SetUpdateStarted sets field value +func (o *RecordSet) SetUpdateStarted(v *string) { + o.UpdateStarted = v +} + +func (o RecordSet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + toSerialize["creationFinished"] = o.CreationFinished + toSerialize["creationStarted"] = o.CreationStarted + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["records"] = o.Records + toSerialize["state"] = o.State + toSerialize["ttl"] = o.Ttl + toSerialize["type"] = o.Type + toSerialize["updateFinished"] = o.UpdateFinished + toSerialize["updateStarted"] = o.UpdateStarted + return toSerialize, nil +} + +type NullableRecordSet struct { + value *RecordSet + isSet bool +} + +func (v NullableRecordSet) Get() *RecordSet { + return v.value +} + +func (v *NullableRecordSet) Set(val *RecordSet) { + v.value = val + v.isSet = true +} + +func (v NullableRecordSet) IsSet() bool { + return v.isSet +} + +func (v *NullableRecordSet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecordSet(val *RecordSet) *NullableRecordSet { + return &NullableRecordSet{value: val, isSet: true} +} + +func (v NullableRecordSet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecordSet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_record_set_response.go b/services/dns/model_record_set_response.go index 19a6deb01..a17475b54 100644 --- a/services/dns/model_record_set_response.go +++ b/services/dns/model_record_set_response.go @@ -10,9 +10,137 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the RecordSetResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecordSetResponse{} + // RecordSetResponse ResponseRRSet for rr set info. type RecordSetResponse struct { Message *string `json:"message,omitempty"` // REQUIRED Rrset *RecordSet `json:"rrset"` } + +type _RecordSetResponse RecordSetResponse + +// NewRecordSetResponse instantiates a new RecordSetResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecordSetResponse(rrset *RecordSet) *RecordSetResponse { + this := RecordSetResponse{} + this.Rrset = rrset + return &this +} + +// NewRecordSetResponseWithDefaults instantiates a new RecordSetResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordSetResponseWithDefaults() *RecordSetResponse { + this := RecordSetResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RecordSetResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordSetResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *RecordSetResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *RecordSetResponse) SetMessage(v *string) { + o.Message = v +} + +// GetRrset returns the Rrset field value +func (o *RecordSetResponse) GetRrset() *RecordSet { + if o == nil { + var ret *RecordSet + return ret + } + + return o.Rrset +} + +// GetRrsetOk returns a tuple with the Rrset field value +// and a boolean to check if the value has been set. +func (o *RecordSetResponse) GetRrsetOk() (*RecordSet, bool) { + if o == nil { + return nil, false + } + return o.Rrset, true +} + +// SetRrset sets field value +func (o *RecordSetResponse) SetRrset(v *RecordSet) { + o.Rrset = v +} + +func (o RecordSetResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + toSerialize["rrset"] = o.Rrset + return toSerialize, nil +} + +type NullableRecordSetResponse struct { + value *RecordSetResponse + isSet bool +} + +func (v NullableRecordSetResponse) Get() *RecordSetResponse { + return v.value +} + +func (v *NullableRecordSetResponse) Set(val *RecordSetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRecordSetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRecordSetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecordSetResponse(val *RecordSetResponse) *NullableRecordSetResponse { + return &NullableRecordSetResponse{value: val, isSet: true} +} + +func (v NullableRecordSetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecordSetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_validate_move_code_payload.go b/services/dns/model_validate_move_code_payload.go index 3aab47a16..2949988aa 100644 --- a/services/dns/model_validate_move_code_payload.go +++ b/services/dns/model_validate_move_code_payload.go @@ -10,9 +10,102 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ValidateMoveCodePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidateMoveCodePayload{} + // ValidateMoveCodePayload PostValidateMoveCodeRequest body to validate move code request. type ValidateMoveCodePayload struct { // code that should be validated. It validates if it is valid, not expired and belongs to the zone. // REQUIRED Code *string `json:"code"` } + +type _ValidateMoveCodePayload ValidateMoveCodePayload + +// NewValidateMoveCodePayload instantiates a new ValidateMoveCodePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidateMoveCodePayload(code *string) *ValidateMoveCodePayload { + this := ValidateMoveCodePayload{} + this.Code = code + return &this +} + +// NewValidateMoveCodePayloadWithDefaults instantiates a new ValidateMoveCodePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidateMoveCodePayloadWithDefaults() *ValidateMoveCodePayload { + this := ValidateMoveCodePayload{} + return &this +} + +// GetCode returns the Code field value +func (o *ValidateMoveCodePayload) GetCode() *string { + if o == nil { + var ret *string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *ValidateMoveCodePayload) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code, true +} + +// SetCode sets field value +func (o *ValidateMoveCodePayload) SetCode(v *string) { + o.Code = v +} + +func (o ValidateMoveCodePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + return toSerialize, nil +} + +type NullableValidateMoveCodePayload struct { + value *ValidateMoveCodePayload + isSet bool +} + +func (v NullableValidateMoveCodePayload) Get() *ValidateMoveCodePayload { + return v.value +} + +func (v *NullableValidateMoveCodePayload) Set(val *ValidateMoveCodePayload) { + v.value = val + v.isSet = true +} + +func (v NullableValidateMoveCodePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableValidateMoveCodePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidateMoveCodePayload(val *ValidateMoveCodePayload) *NullableValidateMoveCodePayload { + return &NullableValidateMoveCodePayload{value: val, isSet: true} +} + +func (v NullableValidateMoveCodePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidateMoveCodePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_zone.go b/services/dns/model_zone.go index 37927a2cb..ad2e47fb3 100644 --- a/services/dns/model_zone.go +++ b/services/dns/model_zone.go @@ -10,6 +10,13 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the Zone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Zone{} + // Zone Zone. type Zone struct { // access control list @@ -81,3 +88,811 @@ type Zone struct { // REQUIRED Visibility *string `json:"visibility"` } + +type _Zone Zone + +// NewZone instantiates a new Zone object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewZone(acl *string, creationFinished *string, creationStarted *string, defaultTTL *int64, dnsName *string, expireTime *int64, id *string, name *string, negativeCache *int64, primaryNameServer *string, refreshTime *int64, retryTime *int64, serialNumber *int64, state *string, type_ *string, updateFinished *string, updateStarted *string, visibility *string) *Zone { + this := Zone{} + this.Acl = acl + this.CreationFinished = creationFinished + this.CreationStarted = creationStarted + this.DefaultTTL = defaultTTL + this.DnsName = dnsName + this.ExpireTime = expireTime + this.Id = id + this.Name = name + this.NegativeCache = negativeCache + this.PrimaryNameServer = primaryNameServer + this.RefreshTime = refreshTime + this.RetryTime = retryTime + this.SerialNumber = serialNumber + this.State = state + this.Type = type_ + this.UpdateFinished = updateFinished + this.UpdateStarted = updateStarted + this.Visibility = visibility + return &this +} + +// NewZoneWithDefaults instantiates a new Zone object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewZoneWithDefaults() *Zone { + this := Zone{} + return &this +} + +// GetAcl returns the Acl field value +func (o *Zone) GetAcl() *string { + if o == nil { + var ret *string + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *Zone) GetAclOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *Zone) SetAcl(v *string) { + o.Acl = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Zone) GetActive() *bool { + if o == nil || IsNil(o.Active) { + var ret *bool + return ret + } + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Zone) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Zone) SetActive(v *bool) { + o.Active = v +} + +// GetContactEmail returns the ContactEmail field value if set, zero value otherwise. +func (o *Zone) GetContactEmail() *string { + if o == nil || IsNil(o.ContactEmail) { + var ret *string + return ret + } + return o.ContactEmail +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetContactEmailOk() (*string, bool) { + if o == nil || IsNil(o.ContactEmail) { + return nil, false + } + return o.ContactEmail, true +} + +// HasContactEmail returns a boolean if a field has been set. +func (o *Zone) HasContactEmail() bool { + if o != nil && !IsNil(o.ContactEmail) { + return true + } + + return false +} + +// SetContactEmail gets a reference to the given string and assigns it to the ContactEmail field. +func (o *Zone) SetContactEmail(v *string) { + o.ContactEmail = v +} + +// GetCreationFinished returns the CreationFinished field value +func (o *Zone) GetCreationFinished() *string { + if o == nil { + var ret *string + return ret + } + + return o.CreationFinished +} + +// GetCreationFinishedOk returns a tuple with the CreationFinished field value +// and a boolean to check if the value has been set. +func (o *Zone) GetCreationFinishedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreationFinished, true +} + +// SetCreationFinished sets field value +func (o *Zone) SetCreationFinished(v *string) { + o.CreationFinished = v +} + +// GetCreationStarted returns the CreationStarted field value +func (o *Zone) GetCreationStarted() *string { + if o == nil { + var ret *string + return ret + } + + return o.CreationStarted +} + +// GetCreationStartedOk returns a tuple with the CreationStarted field value +// and a boolean to check if the value has been set. +func (o *Zone) GetCreationStartedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreationStarted, true +} + +// SetCreationStarted sets field value +func (o *Zone) SetCreationStarted(v *string) { + o.CreationStarted = v +} + +// GetDefaultTTL returns the DefaultTTL field value +func (o *Zone) GetDefaultTTL() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.DefaultTTL +} + +// GetDefaultTTLOk returns a tuple with the DefaultTTL field value +// and a boolean to check if the value has been set. +func (o *Zone) GetDefaultTTLOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DefaultTTL, true +} + +// SetDefaultTTL sets field value +func (o *Zone) SetDefaultTTL(v *int64) { + o.DefaultTTL = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Zone) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + 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. +func (o *Zone) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Zone) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Zone) SetDescription(v *string) { + o.Description = v +} + +// GetDnsName returns the DnsName field value +func (o *Zone) GetDnsName() *string { + if o == nil { + var ret *string + return ret + } + + return o.DnsName +} + +// GetDnsNameOk returns a tuple with the DnsName field value +// and a boolean to check if the value has been set. +func (o *Zone) GetDnsNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DnsName, true +} + +// SetDnsName sets field value +func (o *Zone) SetDnsName(v *string) { + o.DnsName = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Zone) GetError() *string { + if o == nil || IsNil(o.Error) { + var ret *string + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Zone) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Zone) SetError(v *string) { + o.Error = v +} + +// GetExpireTime returns the ExpireTime field value +func (o *Zone) GetExpireTime() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.ExpireTime +} + +// GetExpireTimeOk returns a tuple with the ExpireTime field value +// and a boolean to check if the value has been set. +func (o *Zone) GetExpireTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.ExpireTime, true +} + +// SetExpireTime sets field value +func (o *Zone) SetExpireTime(v *int64) { + o.ExpireTime = v +} + +// GetId returns the Id field value +func (o *Zone) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Zone) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *Zone) SetId(v *string) { + o.Id = v +} + +// GetIsReverseZone returns the IsReverseZone field value if set, zero value otherwise. +func (o *Zone) GetIsReverseZone() *bool { + if o == nil || IsNil(o.IsReverseZone) { + var ret *bool + return ret + } + return o.IsReverseZone +} + +// GetIsReverseZoneOk returns a tuple with the IsReverseZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetIsReverseZoneOk() (*bool, bool) { + if o == nil || IsNil(o.IsReverseZone) { + return nil, false + } + return o.IsReverseZone, true +} + +// HasIsReverseZone returns a boolean if a field has been set. +func (o *Zone) HasIsReverseZone() bool { + if o != nil && !IsNil(o.IsReverseZone) { + return true + } + + return false +} + +// SetIsReverseZone gets a reference to the given bool and assigns it to the IsReverseZone field. +func (o *Zone) SetIsReverseZone(v *bool) { + o.IsReverseZone = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Zone) GetLabels() *[]Label { + if o == nil || IsNil(o.Labels) { + var ret *[]Label + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetLabelsOk() (*[]Label, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Zone) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []Label and assigns it to the Labels field. +func (o *Zone) SetLabels(v *[]Label) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *Zone) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Zone) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Zone) SetName(v *string) { + o.Name = v +} + +// GetNegativeCache returns the NegativeCache field value +func (o *Zone) GetNegativeCache() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.NegativeCache +} + +// GetNegativeCacheOk returns a tuple with the NegativeCache field value +// and a boolean to check if the value has been set. +func (o *Zone) GetNegativeCacheOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.NegativeCache, true +} + +// SetNegativeCache sets field value +func (o *Zone) SetNegativeCache(v *int64) { + o.NegativeCache = v +} + +// GetPrimaries returns the Primaries field value if set, zero value otherwise. +func (o *Zone) GetPrimaries() *[]string { + if o == nil || IsNil(o.Primaries) { + var ret *[]string + return ret + } + return o.Primaries +} + +// GetPrimariesOk returns a tuple with the Primaries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetPrimariesOk() (*[]string, bool) { + if o == nil || IsNil(o.Primaries) { + return nil, false + } + return o.Primaries, true +} + +// HasPrimaries returns a boolean if a field has been set. +func (o *Zone) HasPrimaries() bool { + if o != nil && !IsNil(o.Primaries) { + return true + } + + return false +} + +// SetPrimaries gets a reference to the given []string and assigns it to the Primaries field. +func (o *Zone) SetPrimaries(v *[]string) { + o.Primaries = v +} + +// GetPrimaryNameServer returns the PrimaryNameServer field value +func (o *Zone) GetPrimaryNameServer() *string { + if o == nil { + var ret *string + return ret + } + + return o.PrimaryNameServer +} + +// GetPrimaryNameServerOk returns a tuple with the PrimaryNameServer field value +// and a boolean to check if the value has been set. +func (o *Zone) GetPrimaryNameServerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrimaryNameServer, true +} + +// SetPrimaryNameServer sets field value +func (o *Zone) SetPrimaryNameServer(v *string) { + o.PrimaryNameServer = v +} + +// GetRecordCount returns the RecordCount field value if set, zero value otherwise. +func (o *Zone) GetRecordCount() *int64 { + if o == nil || IsNil(o.RecordCount) { + var ret *int64 + return ret + } + return o.RecordCount +} + +// GetRecordCountOk returns a tuple with the RecordCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zone) GetRecordCountOk() (*int64, bool) { + if o == nil || IsNil(o.RecordCount) { + return nil, false + } + return o.RecordCount, true +} + +// HasRecordCount returns a boolean if a field has been set. +func (o *Zone) HasRecordCount() bool { + if o != nil && !IsNil(o.RecordCount) { + return true + } + + return false +} + +// SetRecordCount gets a reference to the given int64 and assigns it to the RecordCount field. +func (o *Zone) SetRecordCount(v *int64) { + o.RecordCount = v +} + +// GetRefreshTime returns the RefreshTime field value +func (o *Zone) GetRefreshTime() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.RefreshTime +} + +// GetRefreshTimeOk returns a tuple with the RefreshTime field value +// and a boolean to check if the value has been set. +func (o *Zone) GetRefreshTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RefreshTime, true +} + +// SetRefreshTime sets field value +func (o *Zone) SetRefreshTime(v *int64) { + o.RefreshTime = v +} + +// GetRetryTime returns the RetryTime field value +func (o *Zone) GetRetryTime() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.RetryTime +} + +// GetRetryTimeOk returns a tuple with the RetryTime field value +// and a boolean to check if the value has been set. +func (o *Zone) GetRetryTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetryTime, true +} + +// SetRetryTime sets field value +func (o *Zone) SetRetryTime(v *int64) { + o.RetryTime = v +} + +// GetSerialNumber returns the SerialNumber field value +func (o *Zone) GetSerialNumber() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.SerialNumber +} + +// GetSerialNumberOk returns a tuple with the SerialNumber field value +// and a boolean to check if the value has been set. +func (o *Zone) GetSerialNumberOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.SerialNumber, true +} + +// SetSerialNumber sets field value +func (o *Zone) SetSerialNumber(v *int64) { + o.SerialNumber = v +} + +// GetState returns the State field value +func (o *Zone) GetState() *string { + if o == nil { + var ret *string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *Zone) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State, true +} + +// SetState sets field value +func (o *Zone) SetState(v *string) { + o.State = v +} + +// GetType returns the Type field value +func (o *Zone) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Zone) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *Zone) SetType(v *string) { + o.Type = v +} + +// GetUpdateFinished returns the UpdateFinished field value +func (o *Zone) GetUpdateFinished() *string { + if o == nil { + var ret *string + return ret + } + + return o.UpdateFinished +} + +// GetUpdateFinishedOk returns a tuple with the UpdateFinished field value +// and a boolean to check if the value has been set. +func (o *Zone) GetUpdateFinishedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdateFinished, true +} + +// SetUpdateFinished sets field value +func (o *Zone) SetUpdateFinished(v *string) { + o.UpdateFinished = v +} + +// GetUpdateStarted returns the UpdateStarted field value +func (o *Zone) GetUpdateStarted() *string { + if o == nil { + var ret *string + return ret + } + + return o.UpdateStarted +} + +// GetUpdateStartedOk returns a tuple with the UpdateStarted field value +// and a boolean to check if the value has been set. +func (o *Zone) GetUpdateStartedOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdateStarted, true +} + +// SetUpdateStarted sets field value +func (o *Zone) SetUpdateStarted(v *string) { + o.UpdateStarted = v +} + +// GetVisibility returns the Visibility field value +func (o *Zone) GetVisibility() *string { + if o == nil { + var ret *string + return ret + } + + return o.Visibility +} + +// GetVisibilityOk returns a tuple with the Visibility field value +// and a boolean to check if the value has been set. +func (o *Zone) GetVisibilityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Visibility, true +} + +// SetVisibility sets field value +func (o *Zone) SetVisibility(v *string) { + o.Visibility = v +} + +func (o Zone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.ContactEmail) { + toSerialize["contactEmail"] = o.ContactEmail + } + toSerialize["creationFinished"] = o.CreationFinished + toSerialize["creationStarted"] = o.CreationStarted + toSerialize["defaultTTL"] = o.DefaultTTL + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["dnsName"] = o.DnsName + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + toSerialize["expireTime"] = o.ExpireTime + toSerialize["id"] = o.Id + if !IsNil(o.IsReverseZone) { + toSerialize["isReverseZone"] = o.IsReverseZone + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["negativeCache"] = o.NegativeCache + if !IsNil(o.Primaries) { + toSerialize["primaries"] = o.Primaries + } + toSerialize["primaryNameServer"] = o.PrimaryNameServer + if !IsNil(o.RecordCount) { + toSerialize["recordCount"] = o.RecordCount + } + toSerialize["refreshTime"] = o.RefreshTime + toSerialize["retryTime"] = o.RetryTime + toSerialize["serialNumber"] = o.SerialNumber + toSerialize["state"] = o.State + toSerialize["type"] = o.Type + toSerialize["updateFinished"] = o.UpdateFinished + toSerialize["updateStarted"] = o.UpdateStarted + toSerialize["visibility"] = o.Visibility + return toSerialize, nil +} + +type NullableZone struct { + value *Zone + isSet bool +} + +func (v NullableZone) Get() *Zone { + return v.value +} + +func (v *NullableZone) Set(val *Zone) { + v.value = val + v.isSet = true +} + +func (v NullableZone) IsSet() bool { + return v.isSet +} + +func (v *NullableZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZone(val *Zone) *NullableZone { + return &NullableZone{value: val, isSet: true} +} + +func (v NullableZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_zone_data_exchange.go b/services/dns/model_zone_data_exchange.go index 142853ebc..c24bb12c3 100644 --- a/services/dns/model_zone_data_exchange.go +++ b/services/dns/model_zone_data_exchange.go @@ -10,7 +10,107 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ZoneDataExchange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ZoneDataExchange{} + // ZoneDataExchange struct for ZoneDataExchange type ZoneDataExchange struct { RrSets *[]RecordDataExchange `json:"rrSets,omitempty"` } + +// NewZoneDataExchange instantiates a new ZoneDataExchange object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewZoneDataExchange() *ZoneDataExchange { + this := ZoneDataExchange{} + return &this +} + +// NewZoneDataExchangeWithDefaults instantiates a new ZoneDataExchange object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewZoneDataExchangeWithDefaults() *ZoneDataExchange { + this := ZoneDataExchange{} + return &this +} + +// GetRrSets returns the RrSets field value if set, zero value otherwise. +func (o *ZoneDataExchange) GetRrSets() *[]RecordDataExchange { + if o == nil || IsNil(o.RrSets) { + var ret *[]RecordDataExchange + return ret + } + return o.RrSets +} + +// GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneDataExchange) GetRrSetsOk() (*[]RecordDataExchange, bool) { + if o == nil || IsNil(o.RrSets) { + return nil, false + } + return o.RrSets, true +} + +// HasRrSets returns a boolean if a field has been set. +func (o *ZoneDataExchange) HasRrSets() bool { + if o != nil && !IsNil(o.RrSets) { + return true + } + + return false +} + +// SetRrSets gets a reference to the given []RecordDataExchange and assigns it to the RrSets field. +func (o *ZoneDataExchange) SetRrSets(v *[]RecordDataExchange) { + o.RrSets = v +} + +func (o ZoneDataExchange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RrSets) { + toSerialize["rrSets"] = o.RrSets + } + return toSerialize, nil +} + +type NullableZoneDataExchange struct { + value *ZoneDataExchange + isSet bool +} + +func (v NullableZoneDataExchange) Get() *ZoneDataExchange { + return v.value +} + +func (v *NullableZoneDataExchange) Set(val *ZoneDataExchange) { + v.value = val + v.isSet = true +} + +func (v NullableZoneDataExchange) IsSet() bool { + return v.isSet +} + +func (v *NullableZoneDataExchange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZoneDataExchange(val *ZoneDataExchange) *NullableZoneDataExchange { + return &NullableZoneDataExchange{value: val, isSet: true} +} + +func (v NullableZoneDataExchange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZoneDataExchange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_zone_response.go b/services/dns/model_zone_response.go index 14325613e..9620a2732 100644 --- a/services/dns/model_zone_response.go +++ b/services/dns/model_zone_response.go @@ -10,9 +10,137 @@ API version: 1.0 package dns +import ( + "encoding/json" +) + +// checks if the ZoneResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ZoneResponse{} + // ZoneResponse ResponseZone for user info. type ZoneResponse struct { Message *string `json:"message,omitempty"` // REQUIRED Zone *Zone `json:"zone"` } + +type _ZoneResponse ZoneResponse + +// NewZoneResponse instantiates a new ZoneResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewZoneResponse(zone *Zone) *ZoneResponse { + this := ZoneResponse{} + this.Zone = zone + return &this +} + +// NewZoneResponseWithDefaults instantiates a new ZoneResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewZoneResponseWithDefaults() *ZoneResponse { + this := ZoneResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ZoneResponse) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ZoneResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ZoneResponse) SetMessage(v *string) { + o.Message = v +} + +// GetZone returns the Zone field value +func (o *ZoneResponse) GetZone() *Zone { + if o == nil { + var ret *Zone + return ret + } + + return o.Zone +} + +// GetZoneOk returns a tuple with the Zone field value +// and a boolean to check if the value has been set. +func (o *ZoneResponse) GetZoneOk() (*Zone, bool) { + if o == nil { + return nil, false + } + return o.Zone, true +} + +// SetZone sets field value +func (o *ZoneResponse) SetZone(v *Zone) { + o.Zone = v +} + +func (o ZoneResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + toSerialize["zone"] = o.Zone + return toSerialize, nil +} + +type NullableZoneResponse struct { + value *ZoneResponse + isSet bool +} + +func (v NullableZoneResponse) Get() *ZoneResponse { + return v.value +} + +func (v *NullableZoneResponse) Set(val *ZoneResponse) { + v.value = val + v.isSet = true +} + +func (v NullableZoneResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableZoneResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZoneResponse(val *ZoneResponse) *NullableZoneResponse { + return &NullableZoneResponse{value: val, isSet: true} +} + +func (v NullableZoneResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZoneResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}