## 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>
358 lines
14 KiB
Go
358 lines
14 KiB
Go
/*
|
|
STACKIT IaaS API
|
|
|
|
This API allows you to create and modify IaaS resources.
|
|
|
|
API version: 2beta1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package iaasbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the VolumeEncryptionParameter type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &VolumeEncryptionParameter{}
|
|
|
|
/*
|
|
types and functions for kekKeyId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type VolumeEncryptionParameterGetKekKeyIdAttributeType = *string
|
|
|
|
func getVolumeEncryptionParameterGetKekKeyIdAttributeTypeOk(arg VolumeEncryptionParameterGetKekKeyIdAttributeType) (ret VolumeEncryptionParameterGetKekKeyIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumeEncryptionParameterGetKekKeyIdAttributeType(arg *VolumeEncryptionParameterGetKekKeyIdAttributeType, val VolumeEncryptionParameterGetKekKeyIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type VolumeEncryptionParameterGetKekKeyIdArgType = string
|
|
type VolumeEncryptionParameterGetKekKeyIdRetType = string
|
|
|
|
/*
|
|
types and functions for kekKeyVersion
|
|
*/
|
|
|
|
// isLong
|
|
type VolumeEncryptionParameterGetKekKeyVersionAttributeType = *int64
|
|
type VolumeEncryptionParameterGetKekKeyVersionArgType = int64
|
|
type VolumeEncryptionParameterGetKekKeyVersionRetType = int64
|
|
|
|
func getVolumeEncryptionParameterGetKekKeyVersionAttributeTypeOk(arg VolumeEncryptionParameterGetKekKeyVersionAttributeType) (ret VolumeEncryptionParameterGetKekKeyVersionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumeEncryptionParameterGetKekKeyVersionAttributeType(arg *VolumeEncryptionParameterGetKekKeyVersionAttributeType, val VolumeEncryptionParameterGetKekKeyVersionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for kekKeyringId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type VolumeEncryptionParameterGetKekKeyringIdAttributeType = *string
|
|
|
|
func getVolumeEncryptionParameterGetKekKeyringIdAttributeTypeOk(arg VolumeEncryptionParameterGetKekKeyringIdAttributeType) (ret VolumeEncryptionParameterGetKekKeyringIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumeEncryptionParameterGetKekKeyringIdAttributeType(arg *VolumeEncryptionParameterGetKekKeyringIdAttributeType, val VolumeEncryptionParameterGetKekKeyringIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type VolumeEncryptionParameterGetKekKeyringIdArgType = string
|
|
type VolumeEncryptionParameterGetKekKeyringIdRetType = string
|
|
|
|
/*
|
|
types and functions for kekProjectId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type VolumeEncryptionParameterGetKekProjectIdAttributeType = *string
|
|
|
|
func getVolumeEncryptionParameterGetKekProjectIdAttributeTypeOk(arg VolumeEncryptionParameterGetKekProjectIdAttributeType) (ret VolumeEncryptionParameterGetKekProjectIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumeEncryptionParameterGetKekProjectIdAttributeType(arg *VolumeEncryptionParameterGetKekProjectIdAttributeType, val VolumeEncryptionParameterGetKekProjectIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type VolumeEncryptionParameterGetKekProjectIdArgType = string
|
|
type VolumeEncryptionParameterGetKekProjectIdRetType = string
|
|
|
|
/*
|
|
types and functions for keyPayload
|
|
*/
|
|
|
|
// isByteArray
|
|
type VolumeEncryptionParameterGetKeyPayloadAttributeType = *[]byte
|
|
type VolumeEncryptionParameterGetKeyPayloadArgType = []byte
|
|
type VolumeEncryptionParameterGetKeyPayloadRetType = []byte
|
|
|
|
func getVolumeEncryptionParameterGetKeyPayloadAttributeTypeOk(arg VolumeEncryptionParameterGetKeyPayloadAttributeType) (ret VolumeEncryptionParameterGetKeyPayloadRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumeEncryptionParameterGetKeyPayloadAttributeType(arg *VolumeEncryptionParameterGetKeyPayloadAttributeType, val VolumeEncryptionParameterGetKeyPayloadRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for serviceAccount
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type VolumeEncryptionParameterGetServiceAccountAttributeType = *string
|
|
|
|
func getVolumeEncryptionParameterGetServiceAccountAttributeTypeOk(arg VolumeEncryptionParameterGetServiceAccountAttributeType) (ret VolumeEncryptionParameterGetServiceAccountRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumeEncryptionParameterGetServiceAccountAttributeType(arg *VolumeEncryptionParameterGetServiceAccountAttributeType, val VolumeEncryptionParameterGetServiceAccountRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type VolumeEncryptionParameterGetServiceAccountArgType = string
|
|
type VolumeEncryptionParameterGetServiceAccountRetType = string
|
|
|
|
// VolumeEncryptionParameter Parameter to connect to a key-encryption-key within the STACKIT-KMS to create encrypted volumes. If no key_payload is set, a random passphrase is generated, which will be encrypted against the STACKIT-KMS. These parameter never leave the backend again. So these parameters are not in the responses.
|
|
type VolumeEncryptionParameter struct {
|
|
// Universally Unique Identifier (UUID).
|
|
// REQUIRED
|
|
KekKeyId VolumeEncryptionParameterGetKekKeyIdAttributeType `json:"kekKeyId" required:"true"`
|
|
// Version of a key within the STACKIT-KMS.
|
|
// REQUIRED
|
|
KekKeyVersion VolumeEncryptionParameterGetKekKeyVersionAttributeType `json:"kekKeyVersion" required:"true"`
|
|
// Universally Unique Identifier (UUID).
|
|
// REQUIRED
|
|
KekKeyringId VolumeEncryptionParameterGetKekKeyringIdAttributeType `json:"kekKeyringId" required:"true"`
|
|
// Universally Unique Identifier (UUID).
|
|
KekProjectId VolumeEncryptionParameterGetKekProjectIdAttributeType `json:"kekProjectId,omitempty"`
|
|
// base64 encoded secret.
|
|
KeyPayload VolumeEncryptionParameterGetKeyPayloadAttributeType `json:"keyPayload,omitempty"`
|
|
// Object that represents an e-mail address of a service account.
|
|
// REQUIRED
|
|
ServiceAccount VolumeEncryptionParameterGetServiceAccountAttributeType `json:"serviceAccount" required:"true"`
|
|
}
|
|
|
|
type _VolumeEncryptionParameter VolumeEncryptionParameter
|
|
|
|
// NewVolumeEncryptionParameter instantiates a new VolumeEncryptionParameter 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 NewVolumeEncryptionParameter(kekKeyId VolumeEncryptionParameterGetKekKeyIdArgType, kekKeyVersion VolumeEncryptionParameterGetKekKeyVersionArgType, kekKeyringId VolumeEncryptionParameterGetKekKeyringIdArgType, serviceAccount VolumeEncryptionParameterGetServiceAccountArgType) *VolumeEncryptionParameter {
|
|
this := VolumeEncryptionParameter{}
|
|
setVolumeEncryptionParameterGetKekKeyIdAttributeType(&this.KekKeyId, kekKeyId)
|
|
setVolumeEncryptionParameterGetKekKeyVersionAttributeType(&this.KekKeyVersion, kekKeyVersion)
|
|
setVolumeEncryptionParameterGetKekKeyringIdAttributeType(&this.KekKeyringId, kekKeyringId)
|
|
setVolumeEncryptionParameterGetServiceAccountAttributeType(&this.ServiceAccount, serviceAccount)
|
|
return &this
|
|
}
|
|
|
|
// NewVolumeEncryptionParameterWithDefaults instantiates a new VolumeEncryptionParameter 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 NewVolumeEncryptionParameterWithDefaults() *VolumeEncryptionParameter {
|
|
this := VolumeEncryptionParameter{}
|
|
return &this
|
|
}
|
|
|
|
// GetKekKeyId returns the KekKeyId field value
|
|
func (o *VolumeEncryptionParameter) GetKekKeyId() (ret VolumeEncryptionParameterGetKekKeyIdRetType) {
|
|
ret, _ = o.GetKekKeyIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetKekKeyIdOk returns a tuple with the KekKeyId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumeEncryptionParameter) GetKekKeyIdOk() (ret VolumeEncryptionParameterGetKekKeyIdRetType, ok bool) {
|
|
return getVolumeEncryptionParameterGetKekKeyIdAttributeTypeOk(o.KekKeyId)
|
|
}
|
|
|
|
// SetKekKeyId sets field value
|
|
func (o *VolumeEncryptionParameter) SetKekKeyId(v VolumeEncryptionParameterGetKekKeyIdRetType) {
|
|
setVolumeEncryptionParameterGetKekKeyIdAttributeType(&o.KekKeyId, v)
|
|
}
|
|
|
|
// GetKekKeyVersion returns the KekKeyVersion field value
|
|
func (o *VolumeEncryptionParameter) GetKekKeyVersion() (ret VolumeEncryptionParameterGetKekKeyVersionRetType) {
|
|
ret, _ = o.GetKekKeyVersionOk()
|
|
return ret
|
|
}
|
|
|
|
// GetKekKeyVersionOk returns a tuple with the KekKeyVersion field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumeEncryptionParameter) GetKekKeyVersionOk() (ret VolumeEncryptionParameterGetKekKeyVersionRetType, ok bool) {
|
|
return getVolumeEncryptionParameterGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion)
|
|
}
|
|
|
|
// SetKekKeyVersion sets field value
|
|
func (o *VolumeEncryptionParameter) SetKekKeyVersion(v VolumeEncryptionParameterGetKekKeyVersionRetType) {
|
|
setVolumeEncryptionParameterGetKekKeyVersionAttributeType(&o.KekKeyVersion, v)
|
|
}
|
|
|
|
// GetKekKeyringId returns the KekKeyringId field value
|
|
func (o *VolumeEncryptionParameter) GetKekKeyringId() (ret VolumeEncryptionParameterGetKekKeyringIdRetType) {
|
|
ret, _ = o.GetKekKeyringIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetKekKeyringIdOk returns a tuple with the KekKeyringId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumeEncryptionParameter) GetKekKeyringIdOk() (ret VolumeEncryptionParameterGetKekKeyringIdRetType, ok bool) {
|
|
return getVolumeEncryptionParameterGetKekKeyringIdAttributeTypeOk(o.KekKeyringId)
|
|
}
|
|
|
|
// SetKekKeyringId sets field value
|
|
func (o *VolumeEncryptionParameter) SetKekKeyringId(v VolumeEncryptionParameterGetKekKeyringIdRetType) {
|
|
setVolumeEncryptionParameterGetKekKeyringIdAttributeType(&o.KekKeyringId, v)
|
|
}
|
|
|
|
// GetKekProjectId returns the KekProjectId field value if set, zero value otherwise.
|
|
func (o *VolumeEncryptionParameter) GetKekProjectId() (res VolumeEncryptionParameterGetKekProjectIdRetType) {
|
|
res, _ = o.GetKekProjectIdOk()
|
|
return
|
|
}
|
|
|
|
// GetKekProjectIdOk returns a tuple with the KekProjectId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumeEncryptionParameter) GetKekProjectIdOk() (ret VolumeEncryptionParameterGetKekProjectIdRetType, ok bool) {
|
|
return getVolumeEncryptionParameterGetKekProjectIdAttributeTypeOk(o.KekProjectId)
|
|
}
|
|
|
|
// HasKekProjectId returns a boolean if a field has been set.
|
|
func (o *VolumeEncryptionParameter) HasKekProjectId() bool {
|
|
_, ok := o.GetKekProjectIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetKekProjectId gets a reference to the given string and assigns it to the KekProjectId field.
|
|
func (o *VolumeEncryptionParameter) SetKekProjectId(v VolumeEncryptionParameterGetKekProjectIdRetType) {
|
|
setVolumeEncryptionParameterGetKekProjectIdAttributeType(&o.KekProjectId, v)
|
|
}
|
|
|
|
// GetKeyPayload returns the KeyPayload field value if set, zero value otherwise.
|
|
func (o *VolumeEncryptionParameter) GetKeyPayload() (res VolumeEncryptionParameterGetKeyPayloadRetType) {
|
|
res, _ = o.GetKeyPayloadOk()
|
|
return
|
|
}
|
|
|
|
// GetKeyPayloadOk returns a tuple with the KeyPayload field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumeEncryptionParameter) GetKeyPayloadOk() (ret VolumeEncryptionParameterGetKeyPayloadRetType, ok bool) {
|
|
return getVolumeEncryptionParameterGetKeyPayloadAttributeTypeOk(o.KeyPayload)
|
|
}
|
|
|
|
// HasKeyPayload returns a boolean if a field has been set.
|
|
func (o *VolumeEncryptionParameter) HasKeyPayload() bool {
|
|
_, ok := o.GetKeyPayloadOk()
|
|
return ok
|
|
}
|
|
|
|
// SetKeyPayload gets a reference to the given string and assigns it to the KeyPayload field.
|
|
func (o *VolumeEncryptionParameter) SetKeyPayload(v VolumeEncryptionParameterGetKeyPayloadRetType) {
|
|
setVolumeEncryptionParameterGetKeyPayloadAttributeType(&o.KeyPayload, v)
|
|
}
|
|
|
|
// GetServiceAccount returns the ServiceAccount field value
|
|
func (o *VolumeEncryptionParameter) GetServiceAccount() (ret VolumeEncryptionParameterGetServiceAccountRetType) {
|
|
ret, _ = o.GetServiceAccountOk()
|
|
return ret
|
|
}
|
|
|
|
// GetServiceAccountOk returns a tuple with the ServiceAccount field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumeEncryptionParameter) GetServiceAccountOk() (ret VolumeEncryptionParameterGetServiceAccountRetType, ok bool) {
|
|
return getVolumeEncryptionParameterGetServiceAccountAttributeTypeOk(o.ServiceAccount)
|
|
}
|
|
|
|
// SetServiceAccount sets field value
|
|
func (o *VolumeEncryptionParameter) SetServiceAccount(v VolumeEncryptionParameterGetServiceAccountRetType) {
|
|
setVolumeEncryptionParameterGetServiceAccountAttributeType(&o.ServiceAccount, v)
|
|
}
|
|
|
|
func (o VolumeEncryptionParameter) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getVolumeEncryptionParameterGetKekKeyIdAttributeTypeOk(o.KekKeyId); ok {
|
|
toSerialize["KekKeyId"] = val
|
|
}
|
|
if val, ok := getVolumeEncryptionParameterGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion); ok {
|
|
toSerialize["KekKeyVersion"] = val
|
|
}
|
|
if val, ok := getVolumeEncryptionParameterGetKekKeyringIdAttributeTypeOk(o.KekKeyringId); ok {
|
|
toSerialize["KekKeyringId"] = val
|
|
}
|
|
if val, ok := getVolumeEncryptionParameterGetKekProjectIdAttributeTypeOk(o.KekProjectId); ok {
|
|
toSerialize["KekProjectId"] = val
|
|
}
|
|
if val, ok := getVolumeEncryptionParameterGetKeyPayloadAttributeTypeOk(o.KeyPayload); ok {
|
|
toSerialize["KeyPayload"] = val
|
|
}
|
|
if val, ok := getVolumeEncryptionParameterGetServiceAccountAttributeTypeOk(o.ServiceAccount); ok {
|
|
toSerialize["ServiceAccount"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableVolumeEncryptionParameter struct {
|
|
value *VolumeEncryptionParameter
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableVolumeEncryptionParameter) Get() *VolumeEncryptionParameter {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableVolumeEncryptionParameter) Set(val *VolumeEncryptionParameter) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableVolumeEncryptionParameter) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableVolumeEncryptionParameter) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableVolumeEncryptionParameter(val *VolumeEncryptionParameter) *NullableVolumeEncryptionParameter {
|
|
return &NullableVolumeEncryptionParameter{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableVolumeEncryptionParameter) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableVolumeEncryptionParameter) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|