terraform-provider-stackitp.../pkg/kmsbeta/model_create_wrapping_key_payload.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

405 lines
15 KiB
Go

/*
STACKIT Key Management Service API
### DEPRECATED! This service is no longer maintained. Please use the version v1 instead. This API provides endpoints for managing keys and key rings.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package kmsbeta
import (
"encoding/json"
)
// checks if the CreateWrappingKeyPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateWrappingKeyPayload{}
/*
types and functions for access_scope
*/
// isEnumRef
type CreateWrappingKeyPayloadGetAccessScopeAttributeType = *AccessScope
type CreateWrappingKeyPayloadGetAccessScopeArgType = AccessScope
type CreateWrappingKeyPayloadGetAccessScopeRetType = AccessScope
func getCreateWrappingKeyPayloadGetAccessScopeAttributeTypeOk(arg CreateWrappingKeyPayloadGetAccessScopeAttributeType) (ret CreateWrappingKeyPayloadGetAccessScopeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetAccessScopeAttributeType(arg *CreateWrappingKeyPayloadGetAccessScopeAttributeType, val CreateWrappingKeyPayloadGetAccessScopeRetType) {
*arg = &val
}
/*
types and functions for algorithm
*/
// isEnumRef
type CreateWrappingKeyPayloadGetAlgorithmAttributeType = *WrappingAlgorithm
type CreateWrappingKeyPayloadGetAlgorithmArgType = WrappingAlgorithm
type CreateWrappingKeyPayloadGetAlgorithmRetType = WrappingAlgorithm
func getCreateWrappingKeyPayloadGetAlgorithmAttributeTypeOk(arg CreateWrappingKeyPayloadGetAlgorithmAttributeType) (ret CreateWrappingKeyPayloadGetAlgorithmRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetAlgorithmAttributeType(arg *CreateWrappingKeyPayloadGetAlgorithmAttributeType, val CreateWrappingKeyPayloadGetAlgorithmRetType) {
*arg = &val
}
/*
types and functions for backend
*/
// isEnumRef
type CreateWrappingKeyPayloadGetBackendAttributeType = *Backend
type CreateWrappingKeyPayloadGetBackendArgType = Backend
type CreateWrappingKeyPayloadGetBackendRetType = Backend
func getCreateWrappingKeyPayloadGetBackendAttributeTypeOk(arg CreateWrappingKeyPayloadGetBackendAttributeType) (ret CreateWrappingKeyPayloadGetBackendRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetBackendAttributeType(arg *CreateWrappingKeyPayloadGetBackendAttributeType, val CreateWrappingKeyPayloadGetBackendRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type CreateWrappingKeyPayloadGetDescriptionAttributeType = *string
func getCreateWrappingKeyPayloadGetDescriptionAttributeTypeOk(arg CreateWrappingKeyPayloadGetDescriptionAttributeType) (ret CreateWrappingKeyPayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetDescriptionAttributeType(arg *CreateWrappingKeyPayloadGetDescriptionAttributeType, val CreateWrappingKeyPayloadGetDescriptionRetType) {
*arg = &val
}
type CreateWrappingKeyPayloadGetDescriptionArgType = string
type CreateWrappingKeyPayloadGetDescriptionRetType = string
/*
types and functions for displayName
*/
// isNotNullableString
type CreateWrappingKeyPayloadGetDisplayNameAttributeType = *string
func getCreateWrappingKeyPayloadGetDisplayNameAttributeTypeOk(arg CreateWrappingKeyPayloadGetDisplayNameAttributeType) (ret CreateWrappingKeyPayloadGetDisplayNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetDisplayNameAttributeType(arg *CreateWrappingKeyPayloadGetDisplayNameAttributeType, val CreateWrappingKeyPayloadGetDisplayNameRetType) {
*arg = &val
}
type CreateWrappingKeyPayloadGetDisplayNameArgType = string
type CreateWrappingKeyPayloadGetDisplayNameRetType = string
/*
types and functions for protection
*/
// isEnumRef
type CreateWrappingKeyPayloadGetProtectionAttributeType = *Protection
type CreateWrappingKeyPayloadGetProtectionArgType = Protection
type CreateWrappingKeyPayloadGetProtectionRetType = Protection
func getCreateWrappingKeyPayloadGetProtectionAttributeTypeOk(arg CreateWrappingKeyPayloadGetProtectionAttributeType) (ret CreateWrappingKeyPayloadGetProtectionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetProtectionAttributeType(arg *CreateWrappingKeyPayloadGetProtectionAttributeType, val CreateWrappingKeyPayloadGetProtectionRetType) {
*arg = &val
}
/*
types and functions for purpose
*/
// isEnumRef
type CreateWrappingKeyPayloadGetPurposeAttributeType = *WrappingPurpose
type CreateWrappingKeyPayloadGetPurposeArgType = WrappingPurpose
type CreateWrappingKeyPayloadGetPurposeRetType = WrappingPurpose
func getCreateWrappingKeyPayloadGetPurposeAttributeTypeOk(arg CreateWrappingKeyPayloadGetPurposeAttributeType) (ret CreateWrappingKeyPayloadGetPurposeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateWrappingKeyPayloadGetPurposeAttributeType(arg *CreateWrappingKeyPayloadGetPurposeAttributeType, val CreateWrappingKeyPayloadGetPurposeRetType) {
*arg = &val
}
// CreateWrappingKeyPayload struct for CreateWrappingKeyPayload
type CreateWrappingKeyPayload struct {
AccessScope CreateWrappingKeyPayloadGetAccessScopeAttributeType `json:"access_scope,omitempty"`
// REQUIRED
Algorithm CreateWrappingKeyPayloadGetAlgorithmAttributeType `json:"algorithm" required:"true"`
// Deprecated: Check the GitHub changelog for alternatives
// REQUIRED
Backend CreateWrappingKeyPayloadGetBackendAttributeType `json:"backend" required:"true"`
// A user chosen description to distinguish multiple wrapping keys.
Description CreateWrappingKeyPayloadGetDescriptionAttributeType `json:"description,omitempty"`
// The display name to distinguish multiple wrapping keys. Valid characters: letters, digits, underscores and hyphens.
// REQUIRED
DisplayName CreateWrappingKeyPayloadGetDisplayNameAttributeType `json:"displayName" required:"true"`
Protection CreateWrappingKeyPayloadGetProtectionAttributeType `json:"protection,omitempty"`
// REQUIRED
Purpose CreateWrappingKeyPayloadGetPurposeAttributeType `json:"purpose" required:"true"`
}
type _CreateWrappingKeyPayload CreateWrappingKeyPayload
// NewCreateWrappingKeyPayload instantiates a new CreateWrappingKeyPayload 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 NewCreateWrappingKeyPayload(algorithm CreateWrappingKeyPayloadGetAlgorithmArgType, backend CreateWrappingKeyPayloadGetBackendArgType, displayName CreateWrappingKeyPayloadGetDisplayNameArgType, purpose CreateWrappingKeyPayloadGetPurposeArgType) *CreateWrappingKeyPayload {
this := CreateWrappingKeyPayload{}
setCreateWrappingKeyPayloadGetAlgorithmAttributeType(&this.Algorithm, algorithm)
setCreateWrappingKeyPayloadGetBackendAttributeType(&this.Backend, backend)
setCreateWrappingKeyPayloadGetDisplayNameAttributeType(&this.DisplayName, displayName)
setCreateWrappingKeyPayloadGetPurposeAttributeType(&this.Purpose, purpose)
return &this
}
// NewCreateWrappingKeyPayloadWithDefaults instantiates a new CreateWrappingKeyPayload 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 NewCreateWrappingKeyPayloadWithDefaults() *CreateWrappingKeyPayload {
this := CreateWrappingKeyPayload{}
var accessScope AccessScope = ACCESSSCOPE_PUBLIC
this.AccessScope = &accessScope
return &this
}
// GetAccessScope returns the AccessScope field value if set, zero value otherwise.
func (o *CreateWrappingKeyPayload) GetAccessScope() (res CreateWrappingKeyPayloadGetAccessScopeRetType) {
res, _ = o.GetAccessScopeOk()
return
}
// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateWrappingKeyPayload) GetAccessScopeOk() (ret CreateWrappingKeyPayloadGetAccessScopeRetType, ok bool) {
return getCreateWrappingKeyPayloadGetAccessScopeAttributeTypeOk(o.AccessScope)
}
// HasAccessScope returns a boolean if a field has been set.
func (o *CreateWrappingKeyPayload) HasAccessScope() bool {
_, ok := o.GetAccessScopeOk()
return ok
}
// SetAccessScope gets a reference to the given AccessScope and assigns it to the AccessScope field.
func (o *CreateWrappingKeyPayload) SetAccessScope(v CreateWrappingKeyPayloadGetAccessScopeRetType) {
setCreateWrappingKeyPayloadGetAccessScopeAttributeType(&o.AccessScope, v)
}
// GetAlgorithm returns the Algorithm field value
func (o *CreateWrappingKeyPayload) GetAlgorithm() (ret CreateWrappingKeyPayloadGetAlgorithmRetType) {
ret, _ = o.GetAlgorithmOk()
return ret
}
// GetAlgorithmOk returns a tuple with the Algorithm field value
// and a boolean to check if the value has been set.
func (o *CreateWrappingKeyPayload) GetAlgorithmOk() (ret CreateWrappingKeyPayloadGetAlgorithmRetType, ok bool) {
return getCreateWrappingKeyPayloadGetAlgorithmAttributeTypeOk(o.Algorithm)
}
// SetAlgorithm sets field value
func (o *CreateWrappingKeyPayload) SetAlgorithm(v CreateWrappingKeyPayloadGetAlgorithmRetType) {
setCreateWrappingKeyPayloadGetAlgorithmAttributeType(&o.Algorithm, v)
}
// GetBackend returns the Backend field value
// Deprecated
func (o *CreateWrappingKeyPayload) GetBackend() (ret CreateWrappingKeyPayloadGetBackendRetType) {
ret, _ = o.GetBackendOk()
return ret
}
// GetBackendOk returns a tuple with the Backend field value
// and a boolean to check if the value has been set.
// Deprecated
func (o *CreateWrappingKeyPayload) GetBackendOk() (ret CreateWrappingKeyPayloadGetBackendRetType, ok bool) {
return getCreateWrappingKeyPayloadGetBackendAttributeTypeOk(o.Backend)
}
// SetBackend sets field value
// Deprecated
func (o *CreateWrappingKeyPayload) SetBackend(v CreateWrappingKeyPayloadGetBackendRetType) {
setCreateWrappingKeyPayloadGetBackendAttributeType(&o.Backend, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateWrappingKeyPayload) GetDescription() (res CreateWrappingKeyPayloadGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// 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 *CreateWrappingKeyPayload) GetDescriptionOk() (ret CreateWrappingKeyPayloadGetDescriptionRetType, ok bool) {
return getCreateWrappingKeyPayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateWrappingKeyPayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateWrappingKeyPayload) SetDescription(v CreateWrappingKeyPayloadGetDescriptionRetType) {
setCreateWrappingKeyPayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetDisplayName returns the DisplayName field value
func (o *CreateWrappingKeyPayload) GetDisplayName() (ret CreateWrappingKeyPayloadGetDisplayNameRetType) {
ret, _ = o.GetDisplayNameOk()
return ret
}
// GetDisplayNameOk returns a tuple with the DisplayName field value
// and a boolean to check if the value has been set.
func (o *CreateWrappingKeyPayload) GetDisplayNameOk() (ret CreateWrappingKeyPayloadGetDisplayNameRetType, ok bool) {
return getCreateWrappingKeyPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
}
// SetDisplayName sets field value
func (o *CreateWrappingKeyPayload) SetDisplayName(v CreateWrappingKeyPayloadGetDisplayNameRetType) {
setCreateWrappingKeyPayloadGetDisplayNameAttributeType(&o.DisplayName, v)
}
// GetProtection returns the Protection field value if set, zero value otherwise.
func (o *CreateWrappingKeyPayload) GetProtection() (res CreateWrappingKeyPayloadGetProtectionRetType) {
res, _ = o.GetProtectionOk()
return
}
// GetProtectionOk returns a tuple with the Protection field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateWrappingKeyPayload) GetProtectionOk() (ret CreateWrappingKeyPayloadGetProtectionRetType, ok bool) {
return getCreateWrappingKeyPayloadGetProtectionAttributeTypeOk(o.Protection)
}
// HasProtection returns a boolean if a field has been set.
func (o *CreateWrappingKeyPayload) HasProtection() bool {
_, ok := o.GetProtectionOk()
return ok
}
// SetProtection gets a reference to the given Protection and assigns it to the Protection field.
func (o *CreateWrappingKeyPayload) SetProtection(v CreateWrappingKeyPayloadGetProtectionRetType) {
setCreateWrappingKeyPayloadGetProtectionAttributeType(&o.Protection, v)
}
// GetPurpose returns the Purpose field value
func (o *CreateWrappingKeyPayload) GetPurpose() (ret CreateWrappingKeyPayloadGetPurposeRetType) {
ret, _ = o.GetPurposeOk()
return ret
}
// GetPurposeOk returns a tuple with the Purpose field value
// and a boolean to check if the value has been set.
func (o *CreateWrappingKeyPayload) GetPurposeOk() (ret CreateWrappingKeyPayloadGetPurposeRetType, ok bool) {
return getCreateWrappingKeyPayloadGetPurposeAttributeTypeOk(o.Purpose)
}
// SetPurpose sets field value
func (o *CreateWrappingKeyPayload) SetPurpose(v CreateWrappingKeyPayloadGetPurposeRetType) {
setCreateWrappingKeyPayloadGetPurposeAttributeType(&o.Purpose, v)
}
func (o CreateWrappingKeyPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateWrappingKeyPayloadGetAccessScopeAttributeTypeOk(o.AccessScope); ok {
toSerialize["AccessScope"] = val
}
if val, ok := getCreateWrappingKeyPayloadGetAlgorithmAttributeTypeOk(o.Algorithm); ok {
toSerialize["Algorithm"] = val
}
if val, ok := getCreateWrappingKeyPayloadGetBackendAttributeTypeOk(o.Backend); ok {
toSerialize["Backend"] = val
}
if val, ok := getCreateWrappingKeyPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateWrappingKeyPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
toSerialize["DisplayName"] = val
}
if val, ok := getCreateWrappingKeyPayloadGetProtectionAttributeTypeOk(o.Protection); ok {
toSerialize["Protection"] = val
}
if val, ok := getCreateWrappingKeyPayloadGetPurposeAttributeTypeOk(o.Purpose); ok {
toSerialize["Purpose"] = val
}
return toSerialize, nil
}
type NullableCreateWrappingKeyPayload struct {
value *CreateWrappingKeyPayload
isSet bool
}
func (v NullableCreateWrappingKeyPayload) Get() *CreateWrappingKeyPayload {
return v.value
}
func (v *NullableCreateWrappingKeyPayload) Set(val *CreateWrappingKeyPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateWrappingKeyPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateWrappingKeyPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateWrappingKeyPayload(val *CreateWrappingKeyPayload) *NullableCreateWrappingKeyPayload {
return &NullableCreateWrappingKeyPayload{value: val, isSet: true}
}
func (v NullableCreateWrappingKeyPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateWrappingKeyPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}