diff --git a/services/postgresflex/model_clone_instance_overrides.go b/services/postgresflex/model_clone_instance_overrides.go index de82248c3..dcbc8495d 100644 --- a/services/postgresflex/model_clone_instance_overrides.go +++ b/services/postgresflex/model_clone_instance_overrides.go @@ -103,7 +103,8 @@ func setCloneInstanceOverridesGetSizeAttributeType(arg *CloneInstanceOverridesGe // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstanceOverrides struct { // The storage class for the storage. - Class CloneInstanceOverridesGetClassAttributeType `json:"class,omitempty"` + // REQUIRED + Class CloneInstanceOverridesGetClassAttributeType `json:"class" required:"true"` // The name of the cloned instance. If not provided, the default naming behavior of appending '-clone' to the source instance name is used. Name CloneInstanceOverridesGetNameAttributeType `json:"name,omitempty"` // The storage size in Gigabytes. @@ -119,8 +120,9 @@ type _CloneInstanceOverrides CloneInstanceOverrides // 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 NewCloneInstanceOverrides(size CloneInstanceOverridesGetSizeArgType) *CloneInstanceOverrides { +func NewCloneInstanceOverrides(class CloneInstanceOverridesGetClassArgType, size CloneInstanceOverridesGetSizeArgType) *CloneInstanceOverrides { this := CloneInstanceOverrides{} + setCloneInstanceOverridesGetClassAttributeType(&this.Class, class) setCloneInstanceOverridesGetSizeAttributeType(&this.Size, size) return &this } @@ -134,28 +136,21 @@ func NewCloneInstanceOverridesWithDefaults() *CloneInstanceOverrides { return &this } -// GetClass returns the Class field value if set, zero value otherwise. +// GetClass returns the Class field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CloneInstanceOverrides) GetClass() (res CloneInstanceOverridesGetClassRetType) { - res, _ = o.GetClassOk() - return +func (o *CloneInstanceOverrides) GetClass() (ret CloneInstanceOverridesGetClassRetType) { + ret, _ = o.GetClassOk() + return ret } -// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// GetClassOk returns a tuple with the Class field value // 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 *CloneInstanceOverrides) GetClassOk() (ret CloneInstanceOverridesGetClassRetType, ok bool) { return getCloneInstanceOverridesGetClassAttributeTypeOk(o.Class) } -// HasClass 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 *CloneInstanceOverrides) HasClass() bool { - _, ok := o.GetClassOk() - return ok -} - -// SetClass gets a reference to the given string and assigns it to the Class field. +// SetClass sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CloneInstanceOverrides) SetClass(v CloneInstanceOverridesGetClassRetType) { setCloneInstanceOverridesGetClassAttributeType(&o.Class, v) diff --git a/services/postgresflex/model_storage_create.go b/services/postgresflex/model_storage_create.go index eac3db97e..1529885e4 100644 --- a/services/postgresflex/model_storage_create.go +++ b/services/postgresflex/model_storage_create.go @@ -76,7 +76,8 @@ func setStorageCreateGetSizeAttributeType(arg *StorageCreateGetSizeAttributeType // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageCreate struct { // The storage class for the storage. - Class StorageCreateGetClassAttributeType `json:"class,omitempty"` + // REQUIRED + Class StorageCreateGetClassAttributeType `json:"class" required:"true"` // The storage size in Gigabytes. // REQUIRED Size StorageCreateGetSizeAttributeType `json:"size" required:"true"` @@ -90,8 +91,9 @@ type _StorageCreate StorageCreate // 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 NewStorageCreate(size StorageCreateGetSizeArgType) *StorageCreate { +func NewStorageCreate(class StorageCreateGetClassArgType, size StorageCreateGetSizeArgType) *StorageCreate { this := StorageCreate{} + setStorageCreateGetClassAttributeType(&this.Class, class) setStorageCreateGetSizeAttributeType(&this.Size, size) return &this } @@ -105,28 +107,21 @@ func NewStorageCreateWithDefaults() *StorageCreate { return &this } -// GetClass returns the Class field value if set, zero value otherwise. +// GetClass returns the Class field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StorageCreate) GetClass() (res StorageCreateGetClassRetType) { - res, _ = o.GetClassOk() - return +func (o *StorageCreate) GetClass() (ret StorageCreateGetClassRetType) { + ret, _ = o.GetClassOk() + return ret } -// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// GetClassOk returns a tuple with the Class field value // 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 *StorageCreate) GetClassOk() (ret StorageCreateGetClassRetType, ok bool) { return getStorageCreateGetClassAttributeTypeOk(o.Class) } -// HasClass 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 *StorageCreate) HasClass() bool { - _, ok := o.GetClassOk() - return ok -} - -// SetClass gets a reference to the given string and assigns it to the Class field. +// SetClass sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *StorageCreate) SetClass(v StorageCreateGetClassRetType) { setStorageCreateGetClassAttributeType(&o.Class, v) diff --git a/services/postgresflex/oas_commit b/services/postgresflex/oas_commit index 5be2ed399..c0a0c9b82 100644 --- a/services/postgresflex/oas_commit +++ b/services/postgresflex/oas_commit @@ -1 +1 @@ -3743740fd64567e45d0d0136ba9002f4f3c5e495 +43a874547d9e5b23655d0f351c47b32b46d4a19e diff --git a/services/postgresflex/v3api/model_clone_instance_overrides.go b/services/postgresflex/v3api/model_clone_instance_overrides.go index 546f20042..6943d5bd5 100644 --- a/services/postgresflex/v3api/model_clone_instance_overrides.go +++ b/services/postgresflex/v3api/model_clone_instance_overrides.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CloneInstanceOverrides{} // CloneInstanceOverrides struct for CloneInstanceOverrides type CloneInstanceOverrides struct { // The storage class for the storage. - Class *string `json:"class,omitempty"` + Class string `json:"class"` // The name of the cloned instance. If not provided, the default naming behavior of appending '-clone' to the source instance name is used. Name *string `json:"name,omitempty"` // The storage size in Gigabytes. @@ -36,8 +36,9 @@ type _CloneInstanceOverrides CloneInstanceOverrides // 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 NewCloneInstanceOverrides(size int64) *CloneInstanceOverrides { +func NewCloneInstanceOverrides(class string, size int64) *CloneInstanceOverrides { this := CloneInstanceOverrides{} + this.Class = class this.Size = size return &this } @@ -50,36 +51,28 @@ func NewCloneInstanceOverridesWithDefaults() *CloneInstanceOverrides { return &this } -// GetClass returns the Class field value if set, zero value otherwise. +// GetClass returns the Class field value func (o *CloneInstanceOverrides) GetClass() string { - if o == nil || IsNil(o.Class) { + if o == nil { var ret string return ret } - return *o.Class + + return o.Class } -// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// GetClassOk returns a tuple with the Class field value // and a boolean to check if the value has been set. func (o *CloneInstanceOverrides) GetClassOk() (*string, bool) { - if o == nil || IsNil(o.Class) { + if o == nil { return nil, false } - return o.Class, true -} - -// HasClass returns a boolean if a field has been set. -func (o *CloneInstanceOverrides) HasClass() bool { - if o != nil && !IsNil(o.Class) { - return true - } - - return false + return &o.Class, true } -// SetClass gets a reference to the given string and assigns it to the Class field. +// SetClass sets field value func (o *CloneInstanceOverrides) SetClass(v string) { - o.Class = &v + o.Class = v } // GetName returns the Name field value if set, zero value otherwise. @@ -148,9 +141,7 @@ func (o CloneInstanceOverrides) MarshalJSON() ([]byte, error) { func (o CloneInstanceOverrides) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Class) { - toSerialize["class"] = o.Class - } + toSerialize["class"] = o.Class if !IsNil(o.Name) { toSerialize["name"] = o.Name } @@ -168,6 +159,7 @@ func (o *CloneInstanceOverrides) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ + "class", "size", } diff --git a/services/postgresflex/v3api/model_storage_create.go b/services/postgresflex/v3api/model_storage_create.go index 810220b65..b8e084405 100644 --- a/services/postgresflex/v3api/model_storage_create.go +++ b/services/postgresflex/v3api/model_storage_create.go @@ -22,7 +22,7 @@ var _ MappedNullable = &StorageCreate{} // StorageCreate The object containing information about the storage size and class. type StorageCreate struct { // The storage class for the storage. - Class *string `json:"class,omitempty"` + Class string `json:"class"` // The storage size in Gigabytes. Size int64 `json:"size"` AdditionalProperties map[string]interface{} @@ -34,8 +34,9 @@ type _StorageCreate StorageCreate // 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 NewStorageCreate(size int64) *StorageCreate { +func NewStorageCreate(class string, size int64) *StorageCreate { this := StorageCreate{} + this.Class = class this.Size = size return &this } @@ -48,36 +49,28 @@ func NewStorageCreateWithDefaults() *StorageCreate { return &this } -// GetClass returns the Class field value if set, zero value otherwise. +// GetClass returns the Class field value func (o *StorageCreate) GetClass() string { - if o == nil || IsNil(o.Class) { + if o == nil { var ret string return ret } - return *o.Class + + return o.Class } -// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// GetClassOk returns a tuple with the Class field value // and a boolean to check if the value has been set. func (o *StorageCreate) GetClassOk() (*string, bool) { - if o == nil || IsNil(o.Class) { + if o == nil { return nil, false } - return o.Class, true -} - -// HasClass returns a boolean if a field has been set. -func (o *StorageCreate) HasClass() bool { - if o != nil && !IsNil(o.Class) { - return true - } - - return false + return &o.Class, true } -// SetClass gets a reference to the given string and assigns it to the Class field. +// SetClass sets field value func (o *StorageCreate) SetClass(v string) { - o.Class = &v + o.Class = v } // GetSize returns the Size field value @@ -114,9 +107,7 @@ func (o StorageCreate) MarshalJSON() ([]byte, error) { func (o StorageCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Class) { - toSerialize["class"] = o.Class - } + toSerialize["class"] = o.Class toSerialize["size"] = o.Size for key, value := range o.AdditionalProperties { @@ -131,6 +122,7 @@ func (o *StorageCreate) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ + "class", "size", }