From 5c337d9525e41b757fb0521501b60591fc1df99a Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 14 Oct 2025 08:40:03 +0000 Subject: [PATCH 1/2] Generate postgresflex --- .../model_partial_update_instance_payload.go | 8 +- services/postgresflex/model_storage_update.go | 179 ++++++++++++++++++ .../postgresflex/model_storage_update_test.go | 11 ++ .../model_update_instance_payload.go | 8 +- 4 files changed, 198 insertions(+), 8 deletions(-) create mode 100644 services/postgresflex/model_storage_update.go create mode 100644 services/postgresflex/model_storage_update_test.go diff --git a/services/postgresflex/model_partial_update_instance_payload.go b/services/postgresflex/model_partial_update_instance_payload.go index 2db7f1e8f..03cdb4b8c 100644 --- a/services/postgresflex/model_partial_update_instance_payload.go +++ b/services/postgresflex/model_partial_update_instance_payload.go @@ -165,9 +165,9 @@ func setPartialUpdateInstancePayloadGetReplicasAttributeType(arg *PartialUpdateI */ // isModel -type PartialUpdateInstancePayloadGetStorageAttributeType = *Storage -type PartialUpdateInstancePayloadGetStorageArgType = Storage -type PartialUpdateInstancePayloadGetStorageRetType = Storage +type PartialUpdateInstancePayloadGetStorageAttributeType = *StorageUpdate +type PartialUpdateInstancePayloadGetStorageArgType = StorageUpdate +type PartialUpdateInstancePayloadGetStorageRetType = StorageUpdate func getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(arg PartialUpdateInstancePayloadGetStorageAttributeType) (ret PartialUpdateInstancePayloadGetStorageRetType, ok bool) { if arg == nil { @@ -412,7 +412,7 @@ func (o *PartialUpdateInstancePayload) HasStorage() bool { return ok } -// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +// SetStorage gets a reference to the given StorageUpdate and assigns it to the Storage field. func (o *PartialUpdateInstancePayload) SetStorage(v PartialUpdateInstancePayloadGetStorageRetType) { setPartialUpdateInstancePayloadGetStorageAttributeType(&o.Storage, v) } diff --git a/services/postgresflex/model_storage_update.go b/services/postgresflex/model_storage_update.go new file mode 100644 index 000000000..caa00bf26 --- /dev/null +++ b/services/postgresflex/model_storage_update.go @@ -0,0 +1,179 @@ +/* +STACKIT PostgreSQL Flex API + +This is the documentation for the STACKIT postgres service + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package postgresflex + +import ( + "encoding/json" +) + +// checks if the StorageUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageUpdate{} + +/* + types and functions for class +*/ + +// isNotNullableString +type StorageUpdateGetClassAttributeType = *string + +func getStorageUpdateGetClassAttributeTypeOk(arg StorageUpdateGetClassAttributeType) (ret StorageUpdateGetClassRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStorageUpdateGetClassAttributeType(arg *StorageUpdateGetClassAttributeType, val StorageUpdateGetClassRetType) { + *arg = &val +} + +type StorageUpdateGetClassArgType = string +type StorageUpdateGetClassRetType = string + +/* + types and functions for size +*/ + +// isLong +type StorageUpdateGetSizeAttributeType = *int64 +type StorageUpdateGetSizeArgType = int64 +type StorageUpdateGetSizeRetType = int64 + +func getStorageUpdateGetSizeAttributeTypeOk(arg StorageUpdateGetSizeAttributeType) (ret StorageUpdateGetSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStorageUpdateGetSizeAttributeType(arg *StorageUpdateGetSizeAttributeType, val StorageUpdateGetSizeRetType) { + *arg = &val +} + +// StorageUpdate struct for StorageUpdate +type StorageUpdate struct { + // Deprecated: ⚠️ **DEPRECATED AND NON-FUNCTIONAL:** Updating the performance class field is not possible. + Class StorageUpdateGetClassAttributeType `json:"class,omitempty"` + Size StorageUpdateGetSizeAttributeType `json:"size,omitempty"` +} + +// NewStorageUpdate instantiates a new StorageUpdate 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 NewStorageUpdate() *StorageUpdate { + this := StorageUpdate{} + return &this +} + +// NewStorageUpdateWithDefaults instantiates a new StorageUpdate 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 NewStorageUpdateWithDefaults() *StorageUpdate { + this := StorageUpdate{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +// Deprecated +func (o *StorageUpdate) GetClass() (res StorageUpdateGetClassRetType) { + res, _ = o.GetClassOk() + return +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *StorageUpdate) GetClassOk() (ret StorageUpdateGetClassRetType, ok bool) { + return getStorageUpdateGetClassAttributeTypeOk(o.Class) +} + +// HasClass returns a boolean if a field has been set. +func (o *StorageUpdate) HasClass() bool { + _, ok := o.GetClassOk() + return ok +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +// Deprecated +func (o *StorageUpdate) SetClass(v StorageUpdateGetClassRetType) { + setStorageUpdateGetClassAttributeType(&o.Class, v) +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *StorageUpdate) GetSize() (res StorageUpdateGetSizeRetType) { + res, _ = o.GetSizeOk() + return +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageUpdate) GetSizeOk() (ret StorageUpdateGetSizeRetType, ok bool) { + return getStorageUpdateGetSizeAttributeTypeOk(o.Size) +} + +// HasSize returns a boolean if a field has been set. +func (o *StorageUpdate) HasSize() bool { + _, ok := o.GetSizeOk() + return ok +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *StorageUpdate) SetSize(v StorageUpdateGetSizeRetType) { + setStorageUpdateGetSizeAttributeType(&o.Size, v) +} + +func (o StorageUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getStorageUpdateGetClassAttributeTypeOk(o.Class); ok { + toSerialize["Class"] = val + } + if val, ok := getStorageUpdateGetSizeAttributeTypeOk(o.Size); ok { + toSerialize["Size"] = val + } + return toSerialize, nil +} + +type NullableStorageUpdate struct { + value *StorageUpdate + isSet bool +} + +func (v NullableStorageUpdate) Get() *StorageUpdate { + return v.value +} + +func (v *NullableStorageUpdate) Set(val *StorageUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableStorageUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageUpdate(val *StorageUpdate) *NullableStorageUpdate { + return &NullableStorageUpdate{value: val, isSet: true} +} + +func (v NullableStorageUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_storage_update_test.go b/services/postgresflex/model_storage_update_test.go new file mode 100644 index 000000000..51f50494d --- /dev/null +++ b/services/postgresflex/model_storage_update_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PostgreSQL Flex API + +This is the documentation for the STACKIT postgres service + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package postgresflex diff --git a/services/postgresflex/model_update_instance_payload.go b/services/postgresflex/model_update_instance_payload.go index e4a87dea8..4c50d6121 100644 --- a/services/postgresflex/model_update_instance_payload.go +++ b/services/postgresflex/model_update_instance_payload.go @@ -165,9 +165,9 @@ func setUpdateInstancePayloadGetReplicasAttributeType(arg *UpdateInstancePayload */ // isModel -type UpdateInstancePayloadGetStorageAttributeType = *Storage -type UpdateInstancePayloadGetStorageArgType = Storage -type UpdateInstancePayloadGetStorageRetType = Storage +type UpdateInstancePayloadGetStorageAttributeType = *StorageUpdate +type UpdateInstancePayloadGetStorageArgType = StorageUpdate +type UpdateInstancePayloadGetStorageRetType = StorageUpdate func getUpdateInstancePayloadGetStorageAttributeTypeOk(arg UpdateInstancePayloadGetStorageAttributeType) (ret UpdateInstancePayloadGetStorageRetType, ok bool) { if arg == nil { @@ -412,7 +412,7 @@ func (o *UpdateInstancePayload) HasStorage() bool { return ok } -// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +// SetStorage gets a reference to the given StorageUpdate and assigns it to the Storage field. func (o *UpdateInstancePayload) SetStorage(v UpdateInstancePayloadGetStorageRetType) { setUpdateInstancePayloadGetStorageAttributeType(&o.Storage, v) } From 117e24f876ed36415ddc938ee315946d2cb58780 Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Tue, 14 Oct 2025 12:48:53 +0200 Subject: [PATCH 2/2] Add changelog Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 5 +++++ services/postgresflex/CHANGELOG.md | 6 +++++- services/postgresflex/VERSION | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b6048369..cf0fe4aa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## Release (2025-xx-xx) +- `postgresflex`: [v1.3.0](services/postgresflex/CHANGELOG.md#v130) + - **Breaking Change:** The attribute type for `PartialUpdateInstancePayload` and `UpdateInstancePayload` changed from `Storage` to `StorageUpdate`. + - **Deprecation:** `StorageUpdate`: updating the performance class field is not possible. + ## Release (2025-10-13) - `observability`: [v0.15.0](services/observability/CHANGELOG.md#v0150) - **Deprecation:** The `JaegerHttpTracesUrl` field is now deprecated in all relevant models and will be removed after 9th April 2026. Use the new `JaegerHttpUrl` field instead. diff --git a/services/postgresflex/CHANGELOG.md b/services/postgresflex/CHANGELOG.md index 0096bc864..cff834d19 100644 --- a/services/postgresflex/CHANGELOG.md +++ b/services/postgresflex/CHANGELOG.md @@ -1,5 +1,9 @@ +## v1.3.0 +- **Breaking Change:** The attribute type for `PartialUpdateInstancePayload` and `UpdateInstancePayload` changed from `Storage` to `StorageUpdate`. +- **Deprecation:** `StorageUpdate`: updating the performance class field is not possible. + ## v1.2.1 - - **Dependencies:** Bump `github.com/golang-jwt/jwt/v5` from `v5.2.2` to `v5.2.3` +- **Dependencies:** Bump `github.com/golang-jwt/jwt/v5` from `v5.2.2` to `v5.2.3` ## v1.2.0 - Add `required:"true"` tags to model structs diff --git a/services/postgresflex/VERSION b/services/postgresflex/VERSION index 24e56e03c..8b3a0227b 100644 --- a/services/postgresflex/VERSION +++ b/services/postgresflex/VERSION @@ -1 +1 @@ -v1.2.1 \ No newline at end of file +v1.3.0 \ No newline at end of file