From 2c6d7aa7654a00d406ebe8abf075c72467d2c531 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 29 Jan 2026 10:06:27 +0100 Subject: [PATCH] chore: work save --- docs/resources/sqlserverflexalpha_instance.md | 24 +-- .../model_instance_connection_info.go | 171 ++++++++++++++++++ .../model_instance_connection_info_test.go | 11 ++ 3 files changed, 194 insertions(+), 12 deletions(-) create mode 100644 pkg/postgresflexalpha/model_instance_connection_info.go create mode 100644 pkg/postgresflexalpha/model_instance_connection_info_test.go diff --git a/docs/resources/sqlserverflexalpha_instance.md b/docs/resources/sqlserverflexalpha_instance.md index 28dcbeca..d5926387 100644 --- a/docs/resources/sqlserverflexalpha_instance.md +++ b/docs/resources/sqlserverflexalpha_instance.md @@ -41,7 +41,6 @@ import { ### Required -- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption)) - `flavor_id` (String) - `name` (String) Instance name. - `network` (Attributes) The network block. (see [below for nested schema](#nestedatt--network)) @@ -50,6 +49,7 @@ import { ### Optional - `backup_schedule` (String) The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *") +- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption)) - `is_deletable` (Boolean) - `region` (String) The resource region. If not defined, the provider region is used. - `retention_days` (Number) @@ -64,17 +64,6 @@ import { - `instance_id` (String) ID of the SQLServer Flex instance. - `replicas` (Number) - -### Nested Schema for `encryption` - -Required: - -- `key_id` (String) STACKIT KMS - Key ID of the encryption key to use. -- `key_version` (String) STACKIT KMS - Key version to use in the encryption key. -- `keyring_id` (String) STACKIT KMS - KeyRing ID of the encryption key to use. -- `service_account` (String) - - ### Nested Schema for `network` @@ -89,6 +78,17 @@ Read-Only: - `router_address` (String) The returned router IP address of the SQLServer Flex instance. + +### Nested Schema for `encryption` + +Required: + +- `key_id` (String) STACKIT KMS - Key ID of the encryption key to use. +- `key_version` (String) STACKIT KMS - Key version to use in the encryption key. +- `keyring_id` (String) STACKIT KMS - KeyRing ID of the encryption key to use. +- `service_account` (String) + + ### Nested Schema for `storage` diff --git a/pkg/postgresflexalpha/model_instance_connection_info.go b/pkg/postgresflexalpha/model_instance_connection_info.go new file mode 100644 index 00000000..ab5b0ed3 --- /dev/null +++ b/pkg/postgresflexalpha/model_instance_connection_info.go @@ -0,0 +1,171 @@ +/* +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 InstanceConnectionInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceConnectionInfo{} + +/* + types and functions for host +*/ + +// isNotNullableString +type InstanceConnectionInfoGetHostAttributeType = *string + +func getInstanceConnectionInfoGetHostAttributeTypeOk(arg InstanceConnectionInfoGetHostAttributeType) (ret InstanceConnectionInfoGetHostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceConnectionInfoGetHostAttributeType(arg *InstanceConnectionInfoGetHostAttributeType, val InstanceConnectionInfoGetHostRetType) { + *arg = &val +} + +type InstanceConnectionInfoGetHostArgType = string +type InstanceConnectionInfoGetHostRetType = string + +/* + types and functions for port +*/ + +// isInteger +type InstanceConnectionInfoGetPortAttributeType = *int64 +type InstanceConnectionInfoGetPortArgType = int64 +type InstanceConnectionInfoGetPortRetType = int64 + +func getInstanceConnectionInfoGetPortAttributeTypeOk(arg InstanceConnectionInfoGetPortAttributeType) (ret InstanceConnectionInfoGetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceConnectionInfoGetPortAttributeType(arg *InstanceConnectionInfoGetPortAttributeType, val InstanceConnectionInfoGetPortRetType) { + *arg = &val +} + +// InstanceConnectionInfo The DNS name and port in the instance overview +type InstanceConnectionInfo struct { + // The host of the instance. + // REQUIRED + Host InstanceConnectionInfoGetHostAttributeType `json:"host" required:"true"` + // The port of the instance. + // REQUIRED + Port InstanceConnectionInfoGetPortAttributeType `json:"port" required:"true"` +} + +type _InstanceConnectionInfo InstanceConnectionInfo + +// NewInstanceConnectionInfo instantiates a new InstanceConnectionInfo 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 NewInstanceConnectionInfo(host InstanceConnectionInfoGetHostArgType, port InstanceConnectionInfoGetPortArgType) *InstanceConnectionInfo { + this := InstanceConnectionInfo{} + setInstanceConnectionInfoGetHostAttributeType(&this.Host, host) + setInstanceConnectionInfoGetPortAttributeType(&this.Port, port) + return &this +} + +// NewInstanceConnectionInfoWithDefaults instantiates a new InstanceConnectionInfo 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 NewInstanceConnectionInfoWithDefaults() *InstanceConnectionInfo { + this := InstanceConnectionInfo{} + return &this +} + +// GetHost returns the Host field value +func (o *InstanceConnectionInfo) GetHost() (ret InstanceConnectionInfoGetHostRetType) { + ret, _ = o.GetHostOk() + return ret +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *InstanceConnectionInfo) GetHostOk() (ret InstanceConnectionInfoGetHostRetType, ok bool) { + return getInstanceConnectionInfoGetHostAttributeTypeOk(o.Host) +} + +// SetHost sets field value +func (o *InstanceConnectionInfo) SetHost(v InstanceConnectionInfoGetHostRetType) { + setInstanceConnectionInfoGetHostAttributeType(&o.Host, v) +} + +// GetPort returns the Port field value +func (o *InstanceConnectionInfo) GetPort() (ret InstanceConnectionInfoGetPortRetType) { + ret, _ = o.GetPortOk() + return ret +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *InstanceConnectionInfo) GetPortOk() (ret InstanceConnectionInfoGetPortRetType, ok bool) { + return getInstanceConnectionInfoGetPortAttributeTypeOk(o.Port) +} + +// SetPort sets field value +func (o *InstanceConnectionInfo) SetPort(v InstanceConnectionInfoGetPortRetType) { + setInstanceConnectionInfoGetPortAttributeType(&o.Port, v) +} + +func (o InstanceConnectionInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInstanceConnectionInfoGetHostAttributeTypeOk(o.Host); ok { + toSerialize["Host"] = val + } + if val, ok := getInstanceConnectionInfoGetPortAttributeTypeOk(o.Port); ok { + toSerialize["Port"] = val + } + return toSerialize, nil +} + +type NullableInstanceConnectionInfo struct { + value *InstanceConnectionInfo + isSet bool +} + +func (v NullableInstanceConnectionInfo) Get() *InstanceConnectionInfo { + return v.value +} + +func (v *NullableInstanceConnectionInfo) Set(val *InstanceConnectionInfo) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceConnectionInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceConnectionInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceConnectionInfo(val *InstanceConnectionInfo) *NullableInstanceConnectionInfo { + return &NullableInstanceConnectionInfo{value: val, isSet: true} +} + +func (v NullableInstanceConnectionInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceConnectionInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/postgresflexalpha/model_instance_connection_info_test.go b/pkg/postgresflexalpha/model_instance_connection_info_test.go new file mode 100644 index 00000000..e1ff850e --- /dev/null +++ b/pkg/postgresflexalpha/model_instance_connection_info_test.go @@ -0,0 +1,11 @@ +/* +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