terraform-provider-stackitp.../pkg/postgresflexalpha/model_instance_network.go
Marcel S. Henselin 9e04ab2630
Fix: pgsql fix (#10)
* fix: remove license header from files

* fix: updated docs and sample
---------

Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2025-12-22 09:23:53 +01:00

271 lines
8.9 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 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.
// REQUIRED
Acl InstanceNetworkGetAclAttributeType `json:"acl" required:"true"`
InstanceAddress InstanceNetworkGetInstanceAddressAttributeType `json:"instanceAddress,omitempty"`
RouterAddress InstanceNetworkGetRouterAddressAttributeType `json:"routerAddress,omitempty"`
}
type _InstanceNetwork InstanceNetwork
// 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(acl InstanceNetworkGetAclArgType) *InstanceNetwork {
this := InstanceNetwork{}
setInstanceNetworkGetAclAttributeType(&this.Acl, acl)
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
func (o *InstanceNetwork) GetAcl() (ret InstanceNetworkGetAclRetType) {
ret, _ = o.GetAclOk()
return ret
}
// GetAclOk returns a tuple with the Acl field value
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetAclOk() (ret InstanceNetworkGetAclRetType, ok bool) {
return getInstanceNetworkGetAclAttributeTypeOk(o.Acl)
}
// SetAcl sets field value
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)
}