terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_instance_network.go
Marcel S. Henselin 2733834fc9
Some checks failed
CI Workflow / CI (push) Has been cancelled
CI Workflow / Check GoReleaser config (push) Has been cancelled
CI Workflow / Code coverage report (push) Has been cancelled
Alpha (#4)
* 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>
2025-12-19 11:37:53 +01:00

273 lines
9 KiB
Go

/*
STACKIT MSSQL Service API
This is the documentation for the STACKIT MSSQL service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sqlserverflexalpha
import (
"encoding/json"
)
// checks if the InstanceNetwork type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &InstanceNetwork{}
/*
types and functions for accessScope
*/
// isEnumRef
type InstanceNetworkGetAccessScopeAttributeType = *InstanceNetworkAccessScope
type InstanceNetworkGetAccessScopeArgType = InstanceNetworkAccessScope
type InstanceNetworkGetAccessScopeRetType = InstanceNetworkAccessScope
func getInstanceNetworkGetAccessScopeAttributeTypeOk(arg InstanceNetworkGetAccessScopeAttributeType) (ret InstanceNetworkGetAccessScopeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetAccessScopeAttributeType(arg *InstanceNetworkGetAccessScopeAttributeType, val InstanceNetworkGetAccessScopeRetType) {
*arg = &val
}
/*
types and functions for acl
*/
// isArray
type InstanceNetworkGetAclAttributeType = *[]string
type InstanceNetworkGetAclArgType = []string
type InstanceNetworkGetAclRetType = []string
func getInstanceNetworkGetAclAttributeTypeOk(arg InstanceNetworkGetAclAttributeType) (ret InstanceNetworkGetAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetAclAttributeType(arg *InstanceNetworkGetAclAttributeType, val InstanceNetworkGetAclRetType) {
*arg = &val
}
/*
types and functions for instanceAddress
*/
// isNotNullableString
type InstanceNetworkGetInstanceAddressAttributeType = *string
func getInstanceNetworkGetInstanceAddressAttributeTypeOk(arg InstanceNetworkGetInstanceAddressAttributeType) (ret InstanceNetworkGetInstanceAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetInstanceAddressAttributeType(arg *InstanceNetworkGetInstanceAddressAttributeType, val InstanceNetworkGetInstanceAddressRetType) {
*arg = &val
}
type InstanceNetworkGetInstanceAddressArgType = string
type InstanceNetworkGetInstanceAddressRetType = string
/*
types and functions for routerAddress
*/
// isNotNullableString
type InstanceNetworkGetRouterAddressAttributeType = *string
func getInstanceNetworkGetRouterAddressAttributeTypeOk(arg InstanceNetworkGetRouterAddressAttributeType) (ret InstanceNetworkGetRouterAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetRouterAddressAttributeType(arg *InstanceNetworkGetRouterAddressAttributeType, val InstanceNetworkGetRouterAddressRetType) {
*arg = &val
}
type InstanceNetworkGetRouterAddressArgType = string
type InstanceNetworkGetRouterAddressRetType = string
// InstanceNetwork The access configuration of the instance
type InstanceNetwork struct {
AccessScope InstanceNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"`
// List of IPV4 cidr.
Acl InstanceNetworkGetAclAttributeType `json:"acl,omitempty"`
InstanceAddress InstanceNetworkGetInstanceAddressAttributeType `json:"instanceAddress,omitempty"`
RouterAddress InstanceNetworkGetRouterAddressAttributeType `json:"routerAddress,omitempty"`
}
// NewInstanceNetwork instantiates a new InstanceNetwork 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 NewInstanceNetwork() *InstanceNetwork {
this := InstanceNetwork{}
return &this
}
// NewInstanceNetworkWithDefaults instantiates a new InstanceNetwork 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 NewInstanceNetworkWithDefaults() *InstanceNetwork {
this := InstanceNetwork{}
var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC
this.AccessScope = &accessScope
return &this
}
// GetAccessScope returns the AccessScope field value if set, zero value otherwise.
func (o *InstanceNetwork) GetAccessScope() (res InstanceNetworkGetAccessScopeRetType) {
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 *InstanceNetwork) GetAccessScopeOk() (ret InstanceNetworkGetAccessScopeRetType, ok bool) {
return getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope)
}
// HasAccessScope returns a boolean if a field has been set.
func (o *InstanceNetwork) HasAccessScope() bool {
_, ok := o.GetAccessScopeOk()
return ok
}
// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field.
func (o *InstanceNetwork) SetAccessScope(v InstanceNetworkGetAccessScopeRetType) {
setInstanceNetworkGetAccessScopeAttributeType(&o.AccessScope, v)
}
// GetAcl returns the Acl field value if set, zero value otherwise.
func (o *InstanceNetwork) GetAcl() (res InstanceNetworkGetAclRetType) {
res, _ = o.GetAclOk()
return
}
// GetAclOk returns a tuple with the Acl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetAclOk() (ret InstanceNetworkGetAclRetType, ok bool) {
return getInstanceNetworkGetAclAttributeTypeOk(o.Acl)
}
// HasAcl returns a boolean if a field has been set.
func (o *InstanceNetwork) HasAcl() bool {
_, ok := o.GetAclOk()
return ok
}
// SetAcl gets a reference to the given []string and assigns it to the Acl field.
func (o *InstanceNetwork) SetAcl(v InstanceNetworkGetAclRetType) {
setInstanceNetworkGetAclAttributeType(&o.Acl, v)
}
// GetInstanceAddress returns the InstanceAddress field value if set, zero value otherwise.
func (o *InstanceNetwork) GetInstanceAddress() (res InstanceNetworkGetInstanceAddressRetType) {
res, _ = o.GetInstanceAddressOk()
return
}
// GetInstanceAddressOk returns a tuple with the InstanceAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetInstanceAddressOk() (ret InstanceNetworkGetInstanceAddressRetType, ok bool) {
return getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress)
}
// HasInstanceAddress returns a boolean if a field has been set.
func (o *InstanceNetwork) HasInstanceAddress() bool {
_, ok := o.GetInstanceAddressOk()
return ok
}
// SetInstanceAddress gets a reference to the given string and assigns it to the InstanceAddress field.
func (o *InstanceNetwork) SetInstanceAddress(v InstanceNetworkGetInstanceAddressRetType) {
setInstanceNetworkGetInstanceAddressAttributeType(&o.InstanceAddress, v)
}
// GetRouterAddress returns the RouterAddress field value if set, zero value otherwise.
func (o *InstanceNetwork) GetRouterAddress() (res InstanceNetworkGetRouterAddressRetType) {
res, _ = o.GetRouterAddressOk()
return
}
// GetRouterAddressOk returns a tuple with the RouterAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetRouterAddressOk() (ret InstanceNetworkGetRouterAddressRetType, ok bool) {
return getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress)
}
// HasRouterAddress returns a boolean if a field has been set.
func (o *InstanceNetwork) HasRouterAddress() bool {
_, ok := o.GetRouterAddressOk()
return ok
}
// SetRouterAddress gets a reference to the given string and assigns it to the RouterAddress field.
func (o *InstanceNetwork) SetRouterAddress(v InstanceNetworkGetRouterAddressRetType) {
setInstanceNetworkGetRouterAddressAttributeType(&o.RouterAddress, v)
}
func (o InstanceNetwork) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok {
toSerialize["AccessScope"] = val
}
if val, ok := getInstanceNetworkGetAclAttributeTypeOk(o.Acl); ok {
toSerialize["Acl"] = val
}
if val, ok := getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress); ok {
toSerialize["InstanceAddress"] = val
}
if val, ok := getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress); ok {
toSerialize["RouterAddress"] = val
}
return toSerialize, nil
}
type NullableInstanceNetwork struct {
value *InstanceNetwork
isSet bool
}
func (v NullableInstanceNetwork) Get() *InstanceNetwork {
return v.value
}
func (v *NullableInstanceNetwork) Set(val *InstanceNetwork) {
v.value = val
v.isSet = true
}
func (v NullableInstanceNetwork) IsSet() bool {
return v.isSet
}
func (v *NullableInstanceNetwork) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInstanceNetwork(val *InstanceNetwork) *NullableInstanceNetwork {
return &NullableInstanceNetwork{value: val, isSet: true}
}
func (v NullableInstanceNetwork) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInstanceNetwork) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}