terraform-provider-stackitp.../pkg/vpnalpha/model_bgp_tunnel_config.go
2026-01-21 09:07:29 +01:00

225 lines
7.6 KiB
Go

/*
STACKIT VPN API
The STACKIT VPN API provides endpoints to provision and manage VPN instances in your STACKIT project.
API version: 1alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package vpnalpha
import (
"encoding/json"
)
// checks if the BGPTunnelConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BGPTunnelConfig{}
/*
types and functions for localBgpAddress
*/
// isNotNullableString
type BGPTunnelConfigGetLocalBgpAddressAttributeType = *string
func getBGPTunnelConfigGetLocalBgpAddressAttributeTypeOk(arg BGPTunnelConfigGetLocalBgpAddressAttributeType) (ret BGPTunnelConfigGetLocalBgpAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPTunnelConfigGetLocalBgpAddressAttributeType(arg *BGPTunnelConfigGetLocalBgpAddressAttributeType, val BGPTunnelConfigGetLocalBgpAddressRetType) {
*arg = &val
}
type BGPTunnelConfigGetLocalBgpAddressArgType = string
type BGPTunnelConfigGetLocalBgpAddressRetType = string
/*
types and functions for remoteAsn
*/
// isInteger
type BGPTunnelConfigGetRemoteAsnAttributeType = *int64
type BGPTunnelConfigGetRemoteAsnArgType = int64
type BGPTunnelConfigGetRemoteAsnRetType = int64
func getBGPTunnelConfigGetRemoteAsnAttributeTypeOk(arg BGPTunnelConfigGetRemoteAsnAttributeType) (ret BGPTunnelConfigGetRemoteAsnRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPTunnelConfigGetRemoteAsnAttributeType(arg *BGPTunnelConfigGetRemoteAsnAttributeType, val BGPTunnelConfigGetRemoteAsnRetType) {
*arg = &val
}
/*
types and functions for remoteBgpAddress
*/
// isNotNullableString
type BGPTunnelConfigGetRemoteBgpAddressAttributeType = *string
func getBGPTunnelConfigGetRemoteBgpAddressAttributeTypeOk(arg BGPTunnelConfigGetRemoteBgpAddressAttributeType) (ret BGPTunnelConfigGetRemoteBgpAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPTunnelConfigGetRemoteBgpAddressAttributeType(arg *BGPTunnelConfigGetRemoteBgpAddressAttributeType, val BGPTunnelConfigGetRemoteBgpAddressRetType) {
*arg = &val
}
type BGPTunnelConfigGetRemoteBgpAddressArgType = string
type BGPTunnelConfigGetRemoteBgpAddressRetType = string
// BGPTunnelConfig struct for BGPTunnelConfig
type BGPTunnelConfig struct {
LocalBgpAddress BGPTunnelConfigGetLocalBgpAddressAttributeType `json:"localBgpAddress,omitempty"`
// Remote ASN for Private Use (reserved by IANA) (required if enableBgp=true)
// Can be cast to int32 without loss of precision.
RemoteAsn BGPTunnelConfigGetRemoteAsnAttributeType `json:"remoteAsn,omitempty"`
RemoteBgpAddress BGPTunnelConfigGetRemoteBgpAddressAttributeType `json:"remoteBgpAddress,omitempty"`
}
// NewBGPTunnelConfig instantiates a new BGPTunnelConfig 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 NewBGPTunnelConfig() *BGPTunnelConfig {
this := BGPTunnelConfig{}
return &this
}
// NewBGPTunnelConfigWithDefaults instantiates a new BGPTunnelConfig 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 NewBGPTunnelConfigWithDefaults() *BGPTunnelConfig {
this := BGPTunnelConfig{}
return &this
}
// GetLocalBgpAddress returns the LocalBgpAddress field value if set, zero value otherwise.
func (o *BGPTunnelConfig) GetLocalBgpAddress() (res BGPTunnelConfigGetLocalBgpAddressRetType) {
res, _ = o.GetLocalBgpAddressOk()
return
}
// GetLocalBgpAddressOk returns a tuple with the LocalBgpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BGPTunnelConfig) GetLocalBgpAddressOk() (ret BGPTunnelConfigGetLocalBgpAddressRetType, ok bool) {
return getBGPTunnelConfigGetLocalBgpAddressAttributeTypeOk(o.LocalBgpAddress)
}
// HasLocalBgpAddress returns a boolean if a field has been set.
func (o *BGPTunnelConfig) HasLocalBgpAddress() bool {
_, ok := o.GetLocalBgpAddressOk()
return ok
}
// SetLocalBgpAddress gets a reference to the given string and assigns it to the LocalBgpAddress field.
func (o *BGPTunnelConfig) SetLocalBgpAddress(v BGPTunnelConfigGetLocalBgpAddressRetType) {
setBGPTunnelConfigGetLocalBgpAddressAttributeType(&o.LocalBgpAddress, v)
}
// GetRemoteAsn returns the RemoteAsn field value if set, zero value otherwise.
func (o *BGPTunnelConfig) GetRemoteAsn() (res BGPTunnelConfigGetRemoteAsnRetType) {
res, _ = o.GetRemoteAsnOk()
return
}
// GetRemoteAsnOk returns a tuple with the RemoteAsn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BGPTunnelConfig) GetRemoteAsnOk() (ret BGPTunnelConfigGetRemoteAsnRetType, ok bool) {
return getBGPTunnelConfigGetRemoteAsnAttributeTypeOk(o.RemoteAsn)
}
// HasRemoteAsn returns a boolean if a field has been set.
func (o *BGPTunnelConfig) HasRemoteAsn() bool {
_, ok := o.GetRemoteAsnOk()
return ok
}
// SetRemoteAsn gets a reference to the given int64 and assigns it to the RemoteAsn field.
func (o *BGPTunnelConfig) SetRemoteAsn(v BGPTunnelConfigGetRemoteAsnRetType) {
setBGPTunnelConfigGetRemoteAsnAttributeType(&o.RemoteAsn, v)
}
// GetRemoteBgpAddress returns the RemoteBgpAddress field value if set, zero value otherwise.
func (o *BGPTunnelConfig) GetRemoteBgpAddress() (res BGPTunnelConfigGetRemoteBgpAddressRetType) {
res, _ = o.GetRemoteBgpAddressOk()
return
}
// GetRemoteBgpAddressOk returns a tuple with the RemoteBgpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BGPTunnelConfig) GetRemoteBgpAddressOk() (ret BGPTunnelConfigGetRemoteBgpAddressRetType, ok bool) {
return getBGPTunnelConfigGetRemoteBgpAddressAttributeTypeOk(o.RemoteBgpAddress)
}
// HasRemoteBgpAddress returns a boolean if a field has been set.
func (o *BGPTunnelConfig) HasRemoteBgpAddress() bool {
_, ok := o.GetRemoteBgpAddressOk()
return ok
}
// SetRemoteBgpAddress gets a reference to the given string and assigns it to the RemoteBgpAddress field.
func (o *BGPTunnelConfig) SetRemoteBgpAddress(v BGPTunnelConfigGetRemoteBgpAddressRetType) {
setBGPTunnelConfigGetRemoteBgpAddressAttributeType(&o.RemoteBgpAddress, v)
}
func (o BGPTunnelConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getBGPTunnelConfigGetLocalBgpAddressAttributeTypeOk(o.LocalBgpAddress); ok {
toSerialize["LocalBgpAddress"] = val
}
if val, ok := getBGPTunnelConfigGetRemoteAsnAttributeTypeOk(o.RemoteAsn); ok {
toSerialize["RemoteAsn"] = val
}
if val, ok := getBGPTunnelConfigGetRemoteBgpAddressAttributeTypeOk(o.RemoteBgpAddress); ok {
toSerialize["RemoteBgpAddress"] = val
}
return toSerialize, nil
}
type NullableBGPTunnelConfig struct {
value *BGPTunnelConfig
isSet bool
}
func (v NullableBGPTunnelConfig) Get() *BGPTunnelConfig {
return v.value
}
func (v *NullableBGPTunnelConfig) Set(val *BGPTunnelConfig) {
v.value = val
v.isSet = true
}
func (v NullableBGPTunnelConfig) IsSet() bool {
return v.isSet
}
func (v *NullableBGPTunnelConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBGPTunnelConfig(val *BGPTunnelConfig) *NullableBGPTunnelConfig {
return &NullableBGPTunnelConfig{value: val, isSet: true}
}
func (v NullableBGPTunnelConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBGPTunnelConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}