diff --git a/services/postgresflex/oas_commit b/services/postgresflex/oas_commit index a77ddf5f5..6e745cd65 100644 --- a/services/postgresflex/oas_commit +++ b/services/postgresflex/oas_commit @@ -1 +1 @@ -d4da229ba7a242ed561223c67f68683be824c126 +9873a8f7a4120017699e43baba2e8b2af7bca93e diff --git a/services/postgresflex/v3alpha1api/model_clone_instance_overrides.go b/services/postgresflex/v3alpha1api/model_clone_instance_overrides.go index d6bec8478..0cb85373d 100644 --- a/services/postgresflex/v3alpha1api/model_clone_instance_overrides.go +++ b/services/postgresflex/v3alpha1api/model_clone_instance_overrides.go @@ -21,10 +21,13 @@ var _ MappedNullable = &CloneInstanceOverrides{} // CloneInstanceOverrides struct for CloneInstanceOverrides type CloneInstanceOverrides struct { + // The storage class for the storage. If both 'class' and 'performanceClass' are provided, the value of 'class' will take precedence. + Class *string `json:"class,omitempty"` // 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 class for the storage. - PerformanceClass string `json:"performanceClass"` + // Deprecated: The storage class for the storage. Use the 'class' field instead. If both fields are provided, the value of 'class' will take precedence. + // Deprecated + PerformanceClass *string `json:"performanceClass,omitempty"` // The storage size in Gigabytes. Size int32 `json:"size"` AdditionalProperties map[string]interface{} @@ -36,9 +39,8 @@ 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(performanceClass string, size int32) *CloneInstanceOverrides { +func NewCloneInstanceOverrides(size int32) *CloneInstanceOverrides { this := CloneInstanceOverrides{} - this.PerformanceClass = performanceClass this.Size = size return &this } @@ -51,6 +53,38 @@ func NewCloneInstanceOverridesWithDefaults() *CloneInstanceOverrides { return &this } +// GetClass returns the Class field value if set, zero value otherwise. +func (o *CloneInstanceOverrides) GetClass() string { + if o == nil || IsNil(o.Class) { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstanceOverrides) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + 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 +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *CloneInstanceOverrides) SetClass(v string) { + o.Class = &v +} + // GetName returns the Name field value if set, zero value otherwise. func (o *CloneInstanceOverrides) GetName() string { if o == nil || IsNil(o.Name) { @@ -83,28 +117,39 @@ func (o *CloneInstanceOverrides) SetName(v string) { o.Name = &v } -// GetPerformanceClass returns the PerformanceClass field value +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated func (o *CloneInstanceOverrides) GetPerformanceClass() string { - if o == nil { + if o == nil || IsNil(o.PerformanceClass) { var ret string return ret } - - return o.PerformanceClass + return *o.PerformanceClass } -// GetPerformanceClassOk returns a tuple with the PerformanceClass field value +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *CloneInstanceOverrides) GetPerformanceClassOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PerformanceClass) { return nil, false } - return &o.PerformanceClass, true + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *CloneInstanceOverrides) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false } -// SetPerformanceClass sets field value +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +// Deprecated func (o *CloneInstanceOverrides) SetPerformanceClass(v string) { - o.PerformanceClass = v + o.PerformanceClass = &v } // GetSize returns the Size field value @@ -141,10 +186,15 @@ 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 + } if !IsNil(o.Name) { toSerialize["name"] = o.Name } - toSerialize["performanceClass"] = o.PerformanceClass + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } toSerialize["size"] = o.Size for key, value := range o.AdditionalProperties { @@ -159,7 +209,6 @@ 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{ - "performanceClass", "size", } @@ -190,6 +239,7 @@ func (o *CloneInstanceOverrides) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "class") delete(additionalProperties, "name") delete(additionalProperties, "performanceClass") delete(additionalProperties, "size") diff --git a/services/postgresflex/v3alpha1api/model_storage.go b/services/postgresflex/v3alpha1api/model_storage.go index a5f40e70b..823cd26b5 100644 --- a/services/postgresflex/v3alpha1api/model_storage.go +++ b/services/postgresflex/v3alpha1api/model_storage.go @@ -20,7 +20,10 @@ var _ MappedNullable = &Storage{} // Storage The object containing information about the storage size and class. type Storage struct { - // The storage class for the storage. + // The storage class for the storage. If both 'class' and 'performanceClass' are provided, the value of 'class' will take precedence. + Class *string `json:"class,omitempty"` + // Deprecated: The storage class for the storage. Use the 'class' field instead. If both fields are provided, the value of 'class' will take precedence. + // Deprecated PerformanceClass *string `json:"performanceClass,omitempty"` // The storage size in Gigabytes. Size *int32 `json:"size,omitempty"` @@ -46,7 +49,40 @@ func NewStorageWithDefaults() *Storage { return &this } +// GetClass returns the Class field value if set, zero value otherwise. +func (o *Storage) GetClass() string { + if o == nil || IsNil(o.Class) { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Storage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Storage) SetClass(v string) { + o.Class = &v +} + // GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated func (o *Storage) GetPerformanceClass() string { if o == nil || IsNil(o.PerformanceClass) { var ret string @@ -57,6 +93,7 @@ func (o *Storage) GetPerformanceClass() string { // GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Storage) GetPerformanceClassOk() (*string, bool) { if o == nil || IsNil(o.PerformanceClass) { return nil, false @@ -74,6 +111,7 @@ func (o *Storage) HasPerformanceClass() bool { } // SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +// Deprecated func (o *Storage) SetPerformanceClass(v string) { o.PerformanceClass = &v } @@ -120,6 +158,9 @@ func (o Storage) MarshalJSON() ([]byte, error) { func (o Storage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } if !IsNil(o.PerformanceClass) { toSerialize["performanceClass"] = o.PerformanceClass } @@ -148,6 +189,7 @@ func (o *Storage) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "class") delete(additionalProperties, "performanceClass") delete(additionalProperties, "size") o.AdditionalProperties = additionalProperties diff --git a/services/postgresflex/v3alpha1api/model_storage_create.go b/services/postgresflex/v3alpha1api/model_storage_create.go index 1eae30644..9dc107cd0 100644 --- a/services/postgresflex/v3alpha1api/model_storage_create.go +++ b/services/postgresflex/v3alpha1api/model_storage_create.go @@ -21,8 +21,11 @@ var _ MappedNullable = &StorageCreate{} // StorageCreate The object containing information about the storage size and class. type StorageCreate struct { - // The storage class for the storage. - PerformanceClass string `json:"performanceClass"` + // The storage class for the storage. If both 'class' and 'performanceClass' are provided, the value of 'class' will take precedence. + Class *string `json:"class,omitempty"` + // Deprecated: The storage class for the storage. Use the 'class' field instead. If both fields are provided, the value of 'class' will take precedence. + // Deprecated + PerformanceClass *string `json:"performanceClass,omitempty"` // The storage size in Gigabytes. Size int32 `json:"size"` AdditionalProperties map[string]interface{} @@ -34,9 +37,8 @@ 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(performanceClass string, size int32) *StorageCreate { +func NewStorageCreate(size int32) *StorageCreate { this := StorageCreate{} - this.PerformanceClass = performanceClass this.Size = size return &this } @@ -49,28 +51,71 @@ func NewStorageCreateWithDefaults() *StorageCreate { return &this } -// GetPerformanceClass returns the PerformanceClass field value -func (o *StorageCreate) GetPerformanceClass() string { - if o == nil { +// GetClass returns the Class field value if set, zero value otherwise. +func (o *StorageCreate) GetClass() string { + if o == nil || IsNil(o.Class) { var ret string return ret } + return *o.Class +} - return o.PerformanceClass +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageCreate) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true } -// GetPerformanceClassOk returns a tuple with the PerformanceClass field value +// 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 +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *StorageCreate) SetClass(v string) { + o.Class = &v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated +func (o *StorageCreate) GetPerformanceClass() string { + if o == nil || IsNil(o.PerformanceClass) { + var ret string + return ret + } + return *o.PerformanceClass +} + +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *StorageCreate) GetPerformanceClassOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PerformanceClass) { return nil, false } - return &o.PerformanceClass, true + return o.PerformanceClass, true } -// SetPerformanceClass sets field value +// HasPerformanceClass returns a boolean if a field has been set. +func (o *StorageCreate) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +// Deprecated func (o *StorageCreate) SetPerformanceClass(v string) { - o.PerformanceClass = v + o.PerformanceClass = &v } // GetSize returns the Size field value @@ -107,7 +152,12 @@ func (o StorageCreate) MarshalJSON() ([]byte, error) { func (o StorageCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["performanceClass"] = o.PerformanceClass + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } toSerialize["size"] = o.Size for key, value := range o.AdditionalProperties { @@ -122,7 +172,6 @@ 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{ - "performanceClass", "size", } @@ -153,6 +202,7 @@ func (o *StorageCreate) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "class") delete(additionalProperties, "performanceClass") delete(additionalProperties, "size") o.AdditionalProperties = additionalProperties