* chore: initial push to be able to work together * chore: add missing wait folder * chore: add missing folders * chore: cleanup alpha branch * feat: mssql alpha instance (#2) * fix: remove unused attribute types and functions from backup models * fix: update API client references to use sqlserverflexalpha package * fix: update package references to use sqlserverflexalpha and modify user data source model * fix: add sqlserverflexalpha user data source to provider * fix: add sqlserverflexalpha user resource and update related functionality * chore: add stackit_sqlserverflexalpha_user resource and instance_id variable * fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database --------- Co-authored-by: Andre Harms <andre.harms@stackit.cloud> Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> * feat: add sqlserver instance * chore: fixing tests * chore: update docs --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
261 lines
9.2 KiB
Go
261 lines
9.2 KiB
Go
/*
|
|
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)
|
|
}
|