diff --git a/CHANGELOG.md b/CHANGELOG.md index c5c981701..5f2035c9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,10 @@ - [v0.1.0](services/logs/CHANGELOG.md#v010) - **New:** API for logs service - `kms`: + - [v1.3.0](services/kms/CHANGELOG.md#v130) + - Set field `Description` to optional in struct `Key`, `KeyRing` and `WrappingKey` + - **Breaking change:** Remove `description` parameter from `NewKey`, `NewKeyRing` and `NewWrappingKey` constructors + - **Feature:** Add method `HasDescription`in `Key`, `KeyRing` and `WrappingKey` models - [v1.2.1](services/kms/CHANGELOG.md#v121) - **Bugfix:** Correctly handle file closing for file uploads - Bump STACKIT SDK core module from `v0.20.1` to `v0.21.0` diff --git a/services/kms/CHANGELOG.md b/services/kms/CHANGELOG.md index d02524b77..5ea3061b8 100644 --- a/services/kms/CHANGELOG.md +++ b/services/kms/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.3.0 +- Set field `Description` to optional in struct `Key`, `KeyRing` and `WrappingKey` + - **Breaking change:** Remove `description` parameter from `NewKey`, `NewKeyRing` and `NewWrappingKey` constructors + - **Feature:** Add method `HasDescription`in `Key`, `KeyRing` and `WrappingKey` models + ## v1.2.1 - **Bugfix:** Correctly handle file closing for file uploads - Bump STACKIT SDK core module from `v0.20.1` to `v0.21.0` diff --git a/services/kms/VERSION b/services/kms/VERSION index 24e56e03c..8b3a0227b 100644 --- a/services/kms/VERSION +++ b/services/kms/VERSION @@ -1 +1 @@ -v1.2.1 \ No newline at end of file +v1.3.0 \ No newline at end of file diff --git a/services/kms/model_key.go b/services/kms/model_key.go index 3e8600e7f..ed82e6e85 100644 --- a/services/kms/model_key.go +++ b/services/kms/model_key.go @@ -387,8 +387,7 @@ type Key struct { // This date is set when a key is pending deletion and refers to the scheduled date of deletion DeletionDate KeyGetDeletionDateAttributeType `json:"deletionDate,omitempty"` // A user chosen description to distinguish multiple keys. - // REQUIRED - Description KeyGetDescriptionAttributeType `json:"description" required:"true"` + Description KeyGetDescriptionAttributeType `json:"description,omitempty"` // The display name to distinguish multiple keys. // REQUIRED DisplayName KeyGetDisplayNameAttributeType `json:"displayName" required:"true"` @@ -416,12 +415,11 @@ type _Key Key // 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 NewKey(accessScope KeyGetAccessScopeArgType, algorithm KeyGetAlgorithmArgType, createdAt KeyGetCreatedAtArgType, description KeyGetDescriptionArgType, displayName KeyGetDisplayNameArgType, id KeyGetIdArgType, importOnly KeygetImportOnlyArgType, keyRingId KeyGetKeyRingIdArgType, protection KeyGetProtectionArgType, purpose KeyGetPurposeArgType, state KeyGetStateArgType) *Key { +func NewKey(accessScope KeyGetAccessScopeArgType, algorithm KeyGetAlgorithmArgType, createdAt KeyGetCreatedAtArgType, displayName KeyGetDisplayNameArgType, id KeyGetIdArgType, importOnly KeygetImportOnlyArgType, keyRingId KeyGetKeyRingIdArgType, protection KeyGetProtectionArgType, purpose KeyGetPurposeArgType, state KeyGetStateArgType) *Key { this := Key{} setKeyGetAccessScopeAttributeType(&this.AccessScope, accessScope) setKeyGetAlgorithmAttributeType(&this.Algorithm, algorithm) setKeyGetCreatedAtAttributeType(&this.CreatedAt, createdAt) - setKeyGetDescriptionAttributeType(&this.Description, description) setKeyGetDisplayNameAttributeType(&this.DisplayName, displayName) setKeyGetIdAttributeType(&this.Id, id) setKeygetImportOnlyAttributeType(&this.ImportOnly, importOnly) @@ -518,19 +516,25 @@ func (o *Key) SetDeletionDate(v KeyGetDeletionDateRetType) { setKeyGetDeletionDateAttributeType(&o.DeletionDate, v) } -// GetDescription returns the Description field value -func (o *Key) GetDescription() (ret KeyGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Key) GetDescription() (res KeyGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } -// GetDescriptionOk returns a tuple with the Description field value +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Key) GetDescriptionOk() (ret KeyGetDescriptionRetType, ok bool) { return getKeyGetDescriptionAttributeTypeOk(o.Description) } -// SetDescription sets field value +// HasDescription returns a boolean if a field has been set. +func (o *Key) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *Key) SetDescription(v KeyGetDescriptionRetType) { setKeyGetDescriptionAttributeType(&o.Description, v) } diff --git a/services/kms/model_key_ring.go b/services/kms/model_key_ring.go index c1f4e940e..222705063 100644 --- a/services/kms/model_key_ring.go +++ b/services/kms/model_key_ring.go @@ -234,8 +234,7 @@ type KeyRing struct { // REQUIRED CreatedAt KeyRingGetCreatedAtAttributeType `json:"createdAt" required:"true"` // A user chosen description to distinguish multiple key rings. - // REQUIRED - Description KeyRingGetDescriptionAttributeType `json:"description" required:"true"` + Description KeyRingGetDescriptionAttributeType `json:"description,omitempty"` // The display name to distinguish multiple key rings. // REQUIRED DisplayName KeyRingGetDisplayNameAttributeType `json:"displayName" required:"true"` @@ -253,10 +252,9 @@ type _KeyRing KeyRing // 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 NewKeyRing(createdAt KeyRingGetCreatedAtArgType, description KeyRingGetDescriptionArgType, displayName KeyRingGetDisplayNameArgType, id KeyRingGetIdArgType, state KeyRingGetStateArgType) *KeyRing { +func NewKeyRing(createdAt KeyRingGetCreatedAtArgType, displayName KeyRingGetDisplayNameArgType, id KeyRingGetIdArgType, state KeyRingGetStateArgType) *KeyRing { this := KeyRing{} setKeyRingGetCreatedAtAttributeType(&this.CreatedAt, createdAt) - setKeyRingGetDescriptionAttributeType(&this.Description, description) setKeyRingGetDisplayNameAttributeType(&this.DisplayName, displayName) setKeyRingGetIdAttributeType(&this.Id, id) setKeyRingGetStateAttributeType(&this.State, state) @@ -288,19 +286,25 @@ func (o *KeyRing) SetCreatedAt(v KeyRingGetCreatedAtRetType) { setKeyRingGetCreatedAtAttributeType(&o.CreatedAt, v) } -// GetDescription returns the Description field value -func (o *KeyRing) GetDescription() (ret KeyRingGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *KeyRing) GetDescription() (res KeyRingGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } -// GetDescriptionOk returns a tuple with the Description field value +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KeyRing) GetDescriptionOk() (ret KeyRingGetDescriptionRetType, ok bool) { return getKeyRingGetDescriptionAttributeTypeOk(o.Description) } -// SetDescription sets field value +// HasDescription returns a boolean if a field has been set. +func (o *KeyRing) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *KeyRing) SetDescription(v KeyRingGetDescriptionRetType) { setKeyRingGetDescriptionAttributeType(&o.Description, v) } diff --git a/services/kms/model_wrapping_key.go b/services/kms/model_wrapping_key.go index e12320124..c3810e67c 100644 --- a/services/kms/model_wrapping_key.go +++ b/services/kms/model_wrapping_key.go @@ -384,8 +384,7 @@ type WrappingKey struct { // REQUIRED CreatedAt WrappingKeyGetCreatedAtAttributeType `json:"createdAt" required:"true"` // A user chosen description to distinguish multiple wrapping keys. - // REQUIRED - Description WrappingKeyGetDescriptionAttributeType `json:"description" required:"true"` + Description WrappingKeyGetDescriptionAttributeType `json:"description,omitempty"` // The display name to distinguish multiple wrapping keys. // REQUIRED DisplayName WrappingKeyGetDisplayNameAttributeType `json:"displayName" required:"true"` @@ -415,12 +414,11 @@ 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 WrappingKeyGetAccessScopeArgType, algorithm WrappingKeyGetAlgorithmArgType, createdAt WrappingKeyGetCreatedAtArgType, description WrappingKeyGetDescriptionArgType, 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, publicKey WrappingKeyGetPublicKeyArgType, purpose WrappingKeyGetPurposeArgType, state WrappingKeyGetStateArgType) *WrappingKey { this := WrappingKey{} setWrappingKeyGetAccessScopeAttributeType(&this.AccessScope, accessScope) setWrappingKeyGetAlgorithmAttributeType(&this.Algorithm, algorithm) setWrappingKeyGetCreatedAtAttributeType(&this.CreatedAt, createdAt) - setWrappingKeyGetDescriptionAttributeType(&this.Description, description) setWrappingKeyGetDisplayNameAttributeType(&this.DisplayName, displayName) setWrappingKeyGetExpiresAtAttributeType(&this.ExpiresAt, expiresAt) setWrappingKeyGetIdAttributeType(&this.Id, id) @@ -493,19 +491,25 @@ func (o *WrappingKey) SetCreatedAt(v WrappingKeyGetCreatedAtRetType) { setWrappingKeyGetCreatedAtAttributeType(&o.CreatedAt, v) } -// GetDescription returns the Description field value -func (o *WrappingKey) GetDescription() (ret WrappingKeyGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *WrappingKey) GetDescription() (res WrappingKeyGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } -// GetDescriptionOk returns a tuple with the Description field value +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *WrappingKey) GetDescriptionOk() (ret WrappingKeyGetDescriptionRetType, ok bool) { return getWrappingKeyGetDescriptionAttributeTypeOk(o.Description) } -// SetDescription sets field value +// HasDescription returns a boolean if a field has been set. +func (o *WrappingKey) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *WrappingKey) SetDescription(v WrappingKeyGetDescriptionRetType) { setWrappingKeyGetDescriptionAttributeType(&o.Description, v) }