chore: initial push to be able to work together
This commit is contained in:
parent
81e8d48cf6
commit
30070d8470
263 changed files with 45437 additions and 2 deletions
261
pkg/postgresflexalpha/model_instance_encryption.go
Normal file
261
pkg/postgresflexalpha/model_instance_encryption.go
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
PostgreSQL Flex API
|
||||
|
||||
This is the documentation for the STACKIT Postgres Flex service
|
||||
|
||||
API version: 3alpha1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package postgresflexalpha
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the InstanceEncryption type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &InstanceEncryption{}
|
||||
|
||||
/*
|
||||
types and functions for kekKeyId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetKekKeyIdAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetKekKeyIdAttributeTypeOk(arg InstanceEncryptionGetKekKeyIdAttributeType) (ret InstanceEncryptionGetKekKeyIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetKekKeyIdAttributeType(arg *InstanceEncryptionGetKekKeyIdAttributeType, val InstanceEncryptionGetKekKeyIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetKekKeyIdArgType = string
|
||||
type InstanceEncryptionGetKekKeyIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for kekKeyRingId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetKekKeyRingIdAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(arg InstanceEncryptionGetKekKeyRingIdAttributeType) (ret InstanceEncryptionGetKekKeyRingIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetKekKeyRingIdAttributeType(arg *InstanceEncryptionGetKekKeyRingIdAttributeType, val InstanceEncryptionGetKekKeyRingIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetKekKeyRingIdArgType = string
|
||||
type InstanceEncryptionGetKekKeyRingIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for kekKeyVersion
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetKekKeyVersionAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(arg InstanceEncryptionGetKekKeyVersionAttributeType) (ret InstanceEncryptionGetKekKeyVersionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetKekKeyVersionAttributeType(arg *InstanceEncryptionGetKekKeyVersionAttributeType, val InstanceEncryptionGetKekKeyVersionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetKekKeyVersionArgType = string
|
||||
type InstanceEncryptionGetKekKeyVersionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for serviceAccount
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetServiceAccountAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetServiceAccountAttributeTypeOk(arg InstanceEncryptionGetServiceAccountAttributeType) (ret InstanceEncryptionGetServiceAccountRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetServiceAccountAttributeType(arg *InstanceEncryptionGetServiceAccountAttributeType, val InstanceEncryptionGetServiceAccountRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetServiceAccountArgType = string
|
||||
type InstanceEncryptionGetServiceAccountRetType = string
|
||||
|
||||
// InstanceEncryption The configuration for instance's volume and backup storage encryption. ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
|
||||
type InstanceEncryption struct {
|
||||
// The encryption-key key identifier
|
||||
// REQUIRED
|
||||
KekKeyId InstanceEncryptionGetKekKeyIdAttributeType `json:"kekKeyId" required:"true"`
|
||||
// The encryption-key keyring identifier
|
||||
// REQUIRED
|
||||
KekKeyRingId InstanceEncryptionGetKekKeyRingIdAttributeType `json:"kekKeyRingId" required:"true"`
|
||||
// The encryption-key version
|
||||
// REQUIRED
|
||||
KekKeyVersion InstanceEncryptionGetKekKeyVersionAttributeType `json:"kekKeyVersion" required:"true"`
|
||||
// REQUIRED
|
||||
ServiceAccount InstanceEncryptionGetServiceAccountAttributeType `json:"serviceAccount" required:"true"`
|
||||
}
|
||||
|
||||
type _InstanceEncryption InstanceEncryption
|
||||
|
||||
// NewInstanceEncryption instantiates a new InstanceEncryption 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 NewInstanceEncryption(kekKeyId InstanceEncryptionGetKekKeyIdArgType, kekKeyRingId InstanceEncryptionGetKekKeyRingIdArgType, kekKeyVersion InstanceEncryptionGetKekKeyVersionArgType, serviceAccount InstanceEncryptionGetServiceAccountArgType) *InstanceEncryption {
|
||||
this := InstanceEncryption{}
|
||||
setInstanceEncryptionGetKekKeyIdAttributeType(&this.KekKeyId, kekKeyId)
|
||||
setInstanceEncryptionGetKekKeyRingIdAttributeType(&this.KekKeyRingId, kekKeyRingId)
|
||||
setInstanceEncryptionGetKekKeyVersionAttributeType(&this.KekKeyVersion, kekKeyVersion)
|
||||
setInstanceEncryptionGetServiceAccountAttributeType(&this.ServiceAccount, serviceAccount)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInstanceEncryptionWithDefaults instantiates a new InstanceEncryption 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 NewInstanceEncryptionWithDefaults() *InstanceEncryption {
|
||||
this := InstanceEncryption{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetKekKeyId returns the KekKeyId field value
|
||||
func (o *InstanceEncryption) GetKekKeyId() (ret InstanceEncryptionGetKekKeyIdRetType) {
|
||||
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 *InstanceEncryption) GetKekKeyIdOk() (ret InstanceEncryptionGetKekKeyIdRetType, ok bool) {
|
||||
return getInstanceEncryptionGetKekKeyIdAttributeTypeOk(o.KekKeyId)
|
||||
}
|
||||
|
||||
// SetKekKeyId sets field value
|
||||
func (o *InstanceEncryption) SetKekKeyId(v InstanceEncryptionGetKekKeyIdRetType) {
|
||||
setInstanceEncryptionGetKekKeyIdAttributeType(&o.KekKeyId, v)
|
||||
}
|
||||
|
||||
// GetKekKeyRingId returns the KekKeyRingId field value
|
||||
func (o *InstanceEncryption) GetKekKeyRingId() (ret InstanceEncryptionGetKekKeyRingIdRetType) {
|
||||
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 *InstanceEncryption) GetKekKeyRingIdOk() (ret InstanceEncryptionGetKekKeyRingIdRetType, ok bool) {
|
||||
return getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(o.KekKeyRingId)
|
||||
}
|
||||
|
||||
// SetKekKeyRingId sets field value
|
||||
func (o *InstanceEncryption) SetKekKeyRingId(v InstanceEncryptionGetKekKeyRingIdRetType) {
|
||||
setInstanceEncryptionGetKekKeyRingIdAttributeType(&o.KekKeyRingId, v)
|
||||
}
|
||||
|
||||
// GetKekKeyVersion returns the KekKeyVersion field value
|
||||
func (o *InstanceEncryption) GetKekKeyVersion() (ret InstanceEncryptionGetKekKeyVersionRetType) {
|
||||
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 *InstanceEncryption) GetKekKeyVersionOk() (ret InstanceEncryptionGetKekKeyVersionRetType, ok bool) {
|
||||
return getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion)
|
||||
}
|
||||
|
||||
// SetKekKeyVersion sets field value
|
||||
func (o *InstanceEncryption) SetKekKeyVersion(v InstanceEncryptionGetKekKeyVersionRetType) {
|
||||
setInstanceEncryptionGetKekKeyVersionAttributeType(&o.KekKeyVersion, v)
|
||||
}
|
||||
|
||||
// GetServiceAccount returns the ServiceAccount field value
|
||||
func (o *InstanceEncryption) GetServiceAccount() (ret InstanceEncryptionGetServiceAccountRetType) {
|
||||
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 *InstanceEncryption) GetServiceAccountOk() (ret InstanceEncryptionGetServiceAccountRetType, ok bool) {
|
||||
return getInstanceEncryptionGetServiceAccountAttributeTypeOk(o.ServiceAccount)
|
||||
}
|
||||
|
||||
// SetServiceAccount sets field value
|
||||
func (o *InstanceEncryption) SetServiceAccount(v InstanceEncryptionGetServiceAccountRetType) {
|
||||
setInstanceEncryptionGetServiceAccountAttributeType(&o.ServiceAccount, v)
|
||||
}
|
||||
|
||||
func (o InstanceEncryption) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getInstanceEncryptionGetKekKeyIdAttributeTypeOk(o.KekKeyId); ok {
|
||||
toSerialize["KekKeyId"] = val
|
||||
}
|
||||
if val, ok := getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(o.KekKeyRingId); ok {
|
||||
toSerialize["KekKeyRingId"] = val
|
||||
}
|
||||
if val, ok := getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion); ok {
|
||||
toSerialize["KekKeyVersion"] = val
|
||||
}
|
||||
if val, ok := getInstanceEncryptionGetServiceAccountAttributeTypeOk(o.ServiceAccount); ok {
|
||||
toSerialize["ServiceAccount"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableInstanceEncryption struct {
|
||||
value *InstanceEncryption
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceEncryption) Get() *InstanceEncryption {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEncryption) Set(val *InstanceEncryption) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceEncryption) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEncryption) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceEncryption(val *InstanceEncryption) *NullableInstanceEncryption {
|
||||
return &NullableInstanceEncryption{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceEncryption) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEncryption) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue