diff --git a/services/dns/model_create_label_payload.go b/services/dns/model_create_label_payload.go index 35a9b9af5..6badeacae 100644 --- a/services/dns/model_create_label_payload.go +++ b/services/dns/model_create_label_payload.go @@ -76,9 +76,8 @@ type CreateLabelPayloadGetValueRetType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateLabelPayload struct { // REQUIRED - Key CreateLabelPayloadGetKeyAttributeType `json:"key" required:"true"` - // REQUIRED - Value CreateLabelPayloadGetValueAttributeType `json:"value" required:"true"` + Key CreateLabelPayloadGetKeyAttributeType `json:"key" required:"true"` + Value CreateLabelPayloadGetValueAttributeType `json:"value,omitempty"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -89,10 +88,9 @@ type _CreateLabelPayload CreateLabelPayload // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateLabelPayload(key CreateLabelPayloadGetKeyArgType, value CreateLabelPayloadGetValueArgType) *CreateLabelPayload { +func NewCreateLabelPayload(key CreateLabelPayloadGetKeyArgType) *CreateLabelPayload { this := CreateLabelPayload{} setCreateLabelPayloadGetKeyAttributeType(&this.Key, key) - setCreateLabelPayloadGetValueAttributeType(&this.Value, value) return &this } @@ -125,21 +123,28 @@ func (o *CreateLabelPayload) SetKey(v CreateLabelPayloadGetKeyRetType) { setCreateLabelPayloadGetKeyAttributeType(&o.Key, v) } -// GetValue returns the Value field value +// GetValue returns the Value field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateLabelPayload) GetValue() (ret CreateLabelPayloadGetValueRetType) { - ret, _ = o.GetValueOk() - return ret +func (o *CreateLabelPayload) GetValue() (res CreateLabelPayloadGetValueRetType) { + res, _ = o.GetValueOk() + return } -// GetValueOk returns a tuple with the Value field value +// GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateLabelPayload) GetValueOk() (ret CreateLabelPayloadGetValueRetType, ok bool) { return getCreateLabelPayloadGetValueAttributeTypeOk(o.Value) } -// SetValue sets field value +// HasValue returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateLabelPayload) HasValue() bool { + _, ok := o.GetValueOk() + return ok +} + +// SetValue gets a reference to the given string and assigns it to the Value field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateLabelPayload) SetValue(v CreateLabelPayloadGetValueRetType) { setCreateLabelPayloadGetValueAttributeType(&o.Value, v) diff --git a/services/dns/model_create_zone_payload.go b/services/dns/model_create_zone_payload.go index e85bd42ef..f8fa674e9 100644 --- a/services/dns/model_create_zone_payload.go +++ b/services/dns/model_create_zone_payload.go @@ -520,7 +520,7 @@ func setCreateZonePayloadGetTypeAttributeType(arg *CreateZonePayloadGetTypeAttri // CreateZonePayload Zone to create. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateZonePayload struct { - // access control list + // the access control list (note: this field currently has no effect and does not enforce any access restrictions on the DNS zone) Acl CreateZonePayloadGetAclAttributeType `json:"acl,omitempty"` // contact e-mail for the zone ContactEmail CreateZonePayloadGetContactEmailAttributeType `json:"contactEmail,omitempty"` diff --git a/services/dns/model_label.go b/services/dns/model_label.go index 1d7997227..65d42e592 100644 --- a/services/dns/model_label.go +++ b/services/dns/model_label.go @@ -76,9 +76,8 @@ type LabelGetValueRetType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Label struct { // REQUIRED - Key LabelGetKeyAttributeType `json:"key" required:"true"` - // REQUIRED - Value LabelGetValueAttributeType `json:"value" required:"true"` + Key LabelGetKeyAttributeType `json:"key" required:"true"` + Value LabelGetValueAttributeType `json:"value,omitempty"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -89,10 +88,9 @@ type _Label Label // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLabel(key LabelGetKeyArgType, value LabelGetValueArgType) *Label { +func NewLabel(key LabelGetKeyArgType) *Label { this := Label{} setLabelGetKeyAttributeType(&this.Key, key) - setLabelGetValueAttributeType(&this.Value, value) return &this } @@ -125,21 +123,28 @@ func (o *Label) SetKey(v LabelGetKeyRetType) { setLabelGetKeyAttributeType(&o.Key, v) } -// GetValue returns the Value field value +// GetValue returns the Value field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Label) GetValue() (ret LabelGetValueRetType) { - ret, _ = o.GetValueOk() - return ret +func (o *Label) GetValue() (res LabelGetValueRetType) { + res, _ = o.GetValueOk() + return } -// GetValueOk returns a tuple with the Value field value +// GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Label) GetValueOk() (ret LabelGetValueRetType, ok bool) { return getLabelGetValueAttributeTypeOk(o.Value) } -// SetValue sets field value +// HasValue returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Label) HasValue() bool { + _, ok := o.GetValueOk() + return ok +} + +// SetValue gets a reference to the given string and assigns it to the Value field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Label) SetValue(v LabelGetValueRetType) { setLabelGetValueAttributeType(&o.Value, v) diff --git a/services/dns/model_partial_update_zone_payload.go b/services/dns/model_partial_update_zone_payload.go index 9bd01e14c..b0ed911d8 100644 --- a/services/dns/model_partial_update_zone_payload.go +++ b/services/dns/model_partial_update_zone_payload.go @@ -318,7 +318,7 @@ func setPartialUpdateZonePayloadGetRetryTimeAttributeType(arg *PartialUpdateZone // PartialUpdateZonePayload struct for PartialUpdateZonePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateZonePayload struct { - // access control list + // the access control list (note: this field currently has no effect and does not enforce any access restrictions on the DNS zone) Acl PartialUpdateZonePayloadGetAclAttributeType `json:"acl,omitempty"` // contact e-mail for the zone ContactEmail PartialUpdateZonePayloadGetContactEmailAttributeType `json:"contactEmail,omitempty"` diff --git a/services/dns/oas_commit b/services/dns/oas_commit index c08a6770d..50394dd36 100644 --- a/services/dns/oas_commit +++ b/services/dns/oas_commit @@ -1 +1 @@ -4407196dbbef4e53e6798809e856725cbc84ae05 +6e703c94d996a0f88bbfa56ef90d3f6d9adf2b64 diff --git a/services/dns/v1api/model_create_label_payload.go b/services/dns/v1api/model_create_label_payload.go index 113ab2824..eb591542a 100644 --- a/services/dns/v1api/model_create_label_payload.go +++ b/services/dns/v1api/model_create_label_payload.go @@ -21,8 +21,8 @@ var _ MappedNullable = &CreateLabelPayload{} // CreateLabelPayload struct for CreateLabelPayload type CreateLabelPayload struct { - Key string `json:"key"` - Value string `json:"value"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` AdditionalProperties map[string]interface{} } @@ -32,10 +32,9 @@ type _CreateLabelPayload CreateLabelPayload // 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 { +func NewCreateLabelPayload(key string) *CreateLabelPayload { this := CreateLabelPayload{} this.Key = key - this.Value = value return &this } @@ -71,28 +70,36 @@ func (o *CreateLabelPayload) SetKey(v string) { o.Key = v } -// GetValue returns the Value field value +// GetValue returns the Value field value if set, zero value otherwise. func (o *CreateLabelPayload) GetValue() string { - if o == nil { + if o == nil || IsNil(o.Value) { var ret string return ret } - - return o.Value + return *o.Value } -// GetValueOk returns a tuple with the Value field value +// GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CreateLabelPayload) GetValueOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Value) { return nil, false } - return &o.Value, true + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CreateLabelPayload) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false } -// SetValue sets field value +// SetValue gets a reference to the given string and assigns it to the Value field. func (o *CreateLabelPayload) SetValue(v string) { - o.Value = v + o.Value = &v } func (o CreateLabelPayload) MarshalJSON() ([]byte, error) { @@ -106,7 +113,9 @@ func (o CreateLabelPayload) MarshalJSON() ([]byte, error) { func (o CreateLabelPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["key"] = o.Key - toSerialize["value"] = o.Value + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -121,7 +130,6 @@ func (o *CreateLabelPayload) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "key", - "value", } allProperties := make(map[string]interface{}) diff --git a/services/dns/v1api/model_create_zone_payload.go b/services/dns/v1api/model_create_zone_payload.go index a7058e001..1ecacce4e 100644 --- a/services/dns/v1api/model_create_zone_payload.go +++ b/services/dns/v1api/model_create_zone_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &CreateZonePayload{} // CreateZonePayload Zone to create. type CreateZonePayload struct { - // access control list + // the access control list (note: this field currently has no effect and does not enforce any access restrictions on the DNS zone) Acl *string `json:"acl,omitempty"` // contact e-mail for the zone ContactEmail *string `json:"contactEmail,omitempty"` diff --git a/services/dns/v1api/model_label.go b/services/dns/v1api/model_label.go index 3be59687f..ba5ad640e 100644 --- a/services/dns/v1api/model_label.go +++ b/services/dns/v1api/model_label.go @@ -21,8 +21,8 @@ var _ MappedNullable = &Label{} // Label struct for Label type Label struct { - Key string `json:"key"` - Value string `json:"value"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` AdditionalProperties map[string]interface{} } @@ -32,10 +32,9 @@ type _Label Label // 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 { +func NewLabel(key string) *Label { this := Label{} this.Key = key - this.Value = value return &this } @@ -71,28 +70,36 @@ func (o *Label) SetKey(v string) { o.Key = v } -// GetValue returns the Value field value +// GetValue returns the Value field value if set, zero value otherwise. func (o *Label) GetValue() string { - if o == nil { + if o == nil || IsNil(o.Value) { var ret string return ret } - - return o.Value + return *o.Value } -// GetValueOk returns a tuple with the Value field value +// GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Label) GetValueOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Value) { return nil, false } - return &o.Value, true + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Label) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false } -// SetValue sets field value +// SetValue gets a reference to the given string and assigns it to the Value field. func (o *Label) SetValue(v string) { - o.Value = v + o.Value = &v } func (o Label) MarshalJSON() ([]byte, error) { @@ -106,7 +113,9 @@ func (o Label) MarshalJSON() ([]byte, error) { func (o Label) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["key"] = o.Key - toSerialize["value"] = o.Value + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -121,7 +130,6 @@ func (o *Label) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "key", - "value", } allProperties := make(map[string]interface{}) diff --git a/services/dns/v1api/model_partial_update_zone_payload.go b/services/dns/v1api/model_partial_update_zone_payload.go index 200f22ea3..2d21062f0 100644 --- a/services/dns/v1api/model_partial_update_zone_payload.go +++ b/services/dns/v1api/model_partial_update_zone_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PartialUpdateZonePayload{} // PartialUpdateZonePayload struct for PartialUpdateZonePayload type PartialUpdateZonePayload struct { - // access control list + // the access control list (note: this field currently has no effect and does not enforce any access restrictions on the DNS zone) Acl *string `json:"acl,omitempty"` // contact e-mail for the zone ContactEmail *string `json:"contactEmail,omitempty"`