diff --git a/CHANGELOG.md b/CHANGELOG.md index b3971324f..6f08a77a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ - **Breaking change:** Remove enum `CRINAME_DOCKER` - **Breaking change:** Remove `RuntimeError` - **Docs:** Extend description of `AccessScope` +- `kms`: [v1.6.0](services/kms/CHANGELOG.md#v160) + - `v1api`: **Breaking change:** Change type of field `PublicKey` from `string` to `*string` in `WrappingKey` model struct + - Deprecated SDK layer in root of the module: The field `PublicKey` in the `WrappingKey` model struct is not marked as required anymore ## Release (2026-03-27) - `alb`: @@ -93,7 +96,7 @@ - **Dependencies:** Bump resourcemanager from `v0.19.0` to `v0.20.1` - `intake`: [v0.7.1](services/intake/CHANGELOG.md#v071) - **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` -- `kms`: [v1.5.1](services/kms/CHANGELOG.md#v151) +- `kms`: [v1.5.1](services/kms/CHANGELOG.md#v151) - **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` - `loadbalancer`: - [v1.10.1](services/loadbalancer/CHANGELOG.md#v1101) diff --git a/services/kms/CHANGELOG.md b/services/kms/CHANGELOG.md index 5e6ec9c5e..a922dd817 100644 --- a/services/kms/CHANGELOG.md +++ b/services/kms/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.6.0 +- `v1api`: **Breaking change:** Change type of field `PublicKey` from `string` to `*string` in `WrappingKey` model struct +- Deprecated SDK layer in root of the module: The field `PublicKey` in the `WrappingKey` model struct is not marked as required anymore + ## v1.5.1 - **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` diff --git a/services/kms/VERSION b/services/kms/VERSION index c9b3c015f..b7c0a9b1d 100644 --- a/services/kms/VERSION +++ b/services/kms/VERSION @@ -1 +1 @@ -v1.5.1 \ No newline at end of file +v1.6.0 diff --git a/services/kms/model_wrapping_key.go b/services/kms/model_wrapping_key.go index a38029fd4..df0954066 100644 --- a/services/kms/model_wrapping_key.go +++ b/services/kms/model_wrapping_key.go @@ -500,7 +500,7 @@ type WrappingKey struct { // REQUIRED Protection WrappingKeyGetProtectionAttributeType `json:"protection" required:"true"` // The public key of the wrapping key. - PublicKey WrappingKeyGetPublicKeyAttributeType `json:"publicKey,omitempty" required:"true"` + PublicKey WrappingKeyGetPublicKeyAttributeType `json:"publicKey,omitempty"` // REQUIRED Purpose WrappingKeyGetPurposeAttributeType `json:"purpose" required:"true"` // The current state of the wrapping key. @@ -516,7 +516,7 @@ type _WrappingKey WrappingKey // 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 NewWrappingKey(accessScope WrappingKeyGetAccessScopeArgType, algorithm WrappingKeyGetAlgorithmArgType, createdAt WrappingKeyGetCreatedAtArgType, displayName WrappingKeyGetDisplayNameArgType, expiresAt WrappingKeyGetExpiresAtArgType, id WrappingKeyGetIdArgType, keyRingId WrappingKeyGetKeyRingIdArgType, protection WrappingKeyGetProtectionArgType, publicKey WrappingKeyGetPublicKeyArgType, purpose WrappingKeyGetPurposeArgType, state WrappingKeyGetStateArgType) *WrappingKey { +func NewWrappingKey(accessScope WrappingKeyGetAccessScopeArgType, algorithm WrappingKeyGetAlgorithmArgType, createdAt WrappingKeyGetCreatedAtArgType, displayName WrappingKeyGetDisplayNameArgType, expiresAt WrappingKeyGetExpiresAtArgType, id WrappingKeyGetIdArgType, keyRingId WrappingKeyGetKeyRingIdArgType, protection WrappingKeyGetProtectionArgType, purpose WrappingKeyGetPurposeArgType, state WrappingKeyGetStateArgType) *WrappingKey { this := WrappingKey{} setWrappingKeyGetAccessScopeAttributeType(&this.AccessScope, accessScope) setWrappingKeyGetAlgorithmAttributeType(&this.Algorithm, algorithm) @@ -526,7 +526,6 @@ func NewWrappingKey(accessScope WrappingKeyGetAccessScopeArgType, algorithm Wrap setWrappingKeyGetIdAttributeType(&this.Id, id) setWrappingKeyGetKeyRingIdAttributeType(&this.KeyRingId, keyRingId) setWrappingKeyGetProtectionAttributeType(&this.Protection, protection) - setWrappingKeyGetPublicKeyAttributeType(&this.PublicKey, publicKey) setWrappingKeyGetPurposeAttributeType(&this.Purpose, purpose) setWrappingKeyGetStateAttributeType(&this.State, state) return &this @@ -730,21 +729,28 @@ func (o *WrappingKey) SetProtection(v WrappingKeyGetProtectionRetType) { setWrappingKeyGetProtectionAttributeType(&o.Protection, v) } -// GetPublicKey returns the PublicKey field value +// GetPublicKey returns the PublicKey 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 *WrappingKey) GetPublicKey() (ret WrappingKeyGetPublicKeyRetType) { - ret, _ = o.GetPublicKeyOk() - return ret +func (o *WrappingKey) GetPublicKey() (res WrappingKeyGetPublicKeyRetType) { + res, _ = o.GetPublicKeyOk() + return } -// GetPublicKeyOk returns a tuple with the PublicKey field value +// GetPublicKeyOk returns a tuple with the PublicKey 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 *WrappingKey) GetPublicKeyOk() (ret WrappingKeyGetPublicKeyRetType, ok bool) { return getWrappingKeyGetPublicKeyAttributeTypeOk(o.PublicKey) } -// SetPublicKey sets field value +// HasPublicKey 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 *WrappingKey) HasPublicKey() bool { + _, ok := o.GetPublicKeyOk() + return ok +} + +// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *WrappingKey) SetPublicKey(v WrappingKeyGetPublicKeyRetType) { setWrappingKeyGetPublicKeyAttributeType(&o.PublicKey, v) diff --git a/services/kms/oas_commit b/services/kms/oas_commit index e3713dde3..c0e556958 100644 --- a/services/kms/oas_commit +++ b/services/kms/oas_commit @@ -1 +1 @@ -0e64886dd0847341800d7191ed193b75413be998 +779c34469d663919ed700f2c69487eb5cccf70f3 diff --git a/services/kms/v1api/model_wrapping_key.go b/services/kms/v1api/model_wrapping_key.go index 99561b1dc..e3f375300 100644 --- a/services/kms/v1api/model_wrapping_key.go +++ b/services/kms/v1api/model_wrapping_key.go @@ -37,7 +37,7 @@ type WrappingKey struct { KeyRingId string `json:"keyRingId"` Protection Protection `json:"protection"` // The public key of the wrapping key. - PublicKey string `json:"publicKey"` + PublicKey *string `json:"publicKey,omitempty"` Purpose WrappingPurpose `json:"purpose"` // The current state of the wrapping key. State string `json:"state"` @@ -50,7 +50,7 @@ type _WrappingKey WrappingKey // 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 NewWrappingKey(accessScope AccessScope, algorithm WrappingAlgorithm, createdAt time.Time, displayName string, expiresAt time.Time, id string, keyRingId string, protection Protection, publicKey string, purpose WrappingPurpose, state string) *WrappingKey { +func NewWrappingKey(accessScope AccessScope, algorithm WrappingAlgorithm, createdAt time.Time, displayName string, expiresAt time.Time, id string, keyRingId string, protection Protection, purpose WrappingPurpose, state string) *WrappingKey { this := WrappingKey{} this.AccessScope = accessScope this.Algorithm = algorithm @@ -60,7 +60,6 @@ func NewWrappingKey(accessScope AccessScope, algorithm WrappingAlgorithm, create this.Id = id this.KeyRingId = keyRingId this.Protection = protection - this.PublicKey = publicKey this.Purpose = purpose this.State = state return &this @@ -300,28 +299,36 @@ func (o *WrappingKey) SetProtection(v Protection) { o.Protection = v } -// GetPublicKey returns the PublicKey field value +// GetPublicKey returns the PublicKey field value if set, zero value otherwise. func (o *WrappingKey) GetPublicKey() string { - if o == nil { + if o == nil || IsNil(o.PublicKey) { var ret string return ret } - - return o.PublicKey + return *o.PublicKey } -// GetPublicKeyOk returns a tuple with the PublicKey field value +// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *WrappingKey) GetPublicKeyOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PublicKey) { return nil, false } - return &o.PublicKey, true + return o.PublicKey, true +} + +// HasPublicKey returns a boolean if a field has been set. +func (o *WrappingKey) HasPublicKey() bool { + if o != nil && !IsNil(o.PublicKey) { + return true + } + + return false } -// SetPublicKey sets field value +// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. func (o *WrappingKey) SetPublicKey(v string) { - o.PublicKey = v + o.PublicKey = &v } // GetPurpose returns the Purpose field value @@ -393,7 +400,9 @@ func (o WrappingKey) ToMap() (map[string]interface{}, error) { toSerialize["id"] = o.Id toSerialize["keyRingId"] = o.KeyRingId toSerialize["protection"] = o.Protection - toSerialize["publicKey"] = o.PublicKey + if !IsNil(o.PublicKey) { + toSerialize["publicKey"] = o.PublicKey + } toSerialize["purpose"] = o.Purpose toSerialize["state"] = o.State @@ -417,7 +426,6 @@ func (o *WrappingKey) UnmarshalJSON(data []byte) (err error) { "id", "keyRingId", "protection", - "publicKey", "purpose", "state", } diff --git a/services/kms/v1api/wait/wait_test.go b/services/kms/v1api/wait/wait_test.go index f15de3631..ec3387ce8 100644 --- a/services/kms/v1api/wait/wait_test.go +++ b/services/kms/v1api/wait/wait_test.go @@ -122,7 +122,7 @@ func fixtureWrappingKey(state string) *kms.WrappingKey { Purpose: kms.WRAPPINGPURPOSE_WRAP_SYMMETRIC_KEY, State: state, ExpiresAt: testDate, - PublicKey: testPublicKey, + PublicKey: utils.Ptr(testPublicKey), } }