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

386 lines
12 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 BGPStatusPeers type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BGPStatusPeers{}
/*
types and functions for localAs
*/
// isNumber
type BGPStatusPeersGetLocalAsAttributeType = *float64
type BGPStatusPeersGetLocalAsArgType = float64
type BGPStatusPeersGetLocalAsRetType = float64
func getBGPStatusPeersGetLocalAsAttributeTypeOk(arg BGPStatusPeersGetLocalAsAttributeType) (ret BGPStatusPeersGetLocalAsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetLocalAsAttributeType(arg *BGPStatusPeersGetLocalAsAttributeType, val BGPStatusPeersGetLocalAsRetType) {
*arg = &val
}
/*
types and functions for peerUptime
*/
// isNotNullableString
type BGPStatusPeersGetPeerUptimeAttributeType = *string
func getBGPStatusPeersGetPeerUptimeAttributeTypeOk(arg BGPStatusPeersGetPeerUptimeAttributeType) (ret BGPStatusPeersGetPeerUptimeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetPeerUptimeAttributeType(arg *BGPStatusPeersGetPeerUptimeAttributeType, val BGPStatusPeersGetPeerUptimeRetType) {
*arg = &val
}
type BGPStatusPeersGetPeerUptimeArgType = string
type BGPStatusPeersGetPeerUptimeRetType = string
/*
types and functions for pfxRcd
*/
// isNumber
type BGPStatusPeersGetPfxRcdAttributeType = *float64
type BGPStatusPeersGetPfxRcdArgType = float64
type BGPStatusPeersGetPfxRcdRetType = float64
func getBGPStatusPeersGetPfxRcdAttributeTypeOk(arg BGPStatusPeersGetPfxRcdAttributeType) (ret BGPStatusPeersGetPfxRcdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetPfxRcdAttributeType(arg *BGPStatusPeersGetPfxRcdAttributeType, val BGPStatusPeersGetPfxRcdRetType) {
*arg = &val
}
/*
types and functions for pfxSnt
*/
// isNumber
type BGPStatusPeersGetPfxSntAttributeType = *float64
type BGPStatusPeersGetPfxSntArgType = float64
type BGPStatusPeersGetPfxSntRetType = float64
func getBGPStatusPeersGetPfxSntAttributeTypeOk(arg BGPStatusPeersGetPfxSntAttributeType) (ret BGPStatusPeersGetPfxSntRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetPfxSntAttributeType(arg *BGPStatusPeersGetPfxSntAttributeType, val BGPStatusPeersGetPfxSntRetType) {
*arg = &val
}
/*
types and functions for remoteAs
*/
// isNumber
type BGPStatusPeersGetRemoteAsAttributeType = *float64
type BGPStatusPeersGetRemoteAsArgType = float64
type BGPStatusPeersGetRemoteAsRetType = float64
func getBGPStatusPeersGetRemoteAsAttributeTypeOk(arg BGPStatusPeersGetRemoteAsAttributeType) (ret BGPStatusPeersGetRemoteAsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetRemoteAsAttributeType(arg *BGPStatusPeersGetRemoteAsAttributeType, val BGPStatusPeersGetRemoteAsRetType) {
*arg = &val
}
/*
types and functions for remoteIP
*/
// isNotNullableString
type BGPStatusPeersGetRemoteIPAttributeType = *string
func getBGPStatusPeersGetRemoteIPAttributeTypeOk(arg BGPStatusPeersGetRemoteIPAttributeType) (ret BGPStatusPeersGetRemoteIPRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetRemoteIPAttributeType(arg *BGPStatusPeersGetRemoteIPAttributeType, val BGPStatusPeersGetRemoteIPRetType) {
*arg = &val
}
type BGPStatusPeersGetRemoteIPArgType = string
type BGPStatusPeersGetRemoteIPRetType = string
/*
types and functions for state
*/
// isNotNullableString
type BGPStatusPeersGetStateAttributeType = *string
func getBGPStatusPeersGetStateAttributeTypeOk(arg BGPStatusPeersGetStateAttributeType) (ret BGPStatusPeersGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPStatusPeersGetStateAttributeType(arg *BGPStatusPeersGetStateAttributeType, val BGPStatusPeersGetStateRetType) {
*arg = &val
}
type BGPStatusPeersGetStateArgType = string
type BGPStatusPeersGetStateRetType = string
// BGPStatusPeers struct for BGPStatusPeers
type BGPStatusPeers struct {
// REQUIRED
LocalAs BGPStatusPeersGetLocalAsAttributeType `json:"localAs" required:"true"`
// REQUIRED
PeerUptime BGPStatusPeersGetPeerUptimeAttributeType `json:"peerUptime" required:"true"`
// REQUIRED
PfxRcd BGPStatusPeersGetPfxRcdAttributeType `json:"pfxRcd" required:"true"`
// REQUIRED
PfxSnt BGPStatusPeersGetPfxSntAttributeType `json:"pfxSnt" required:"true"`
// REQUIRED
RemoteAs BGPStatusPeersGetRemoteAsAttributeType `json:"remoteAs" required:"true"`
// REQUIRED
RemoteIP BGPStatusPeersGetRemoteIPAttributeType `json:"remoteIP" required:"true"`
// REQUIRED
State BGPStatusPeersGetStateAttributeType `json:"state" required:"true"`
}
type _BGPStatusPeers BGPStatusPeers
// NewBGPStatusPeers instantiates a new BGPStatusPeers 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 NewBGPStatusPeers(localAs BGPStatusPeersGetLocalAsArgType, peerUptime BGPStatusPeersGetPeerUptimeArgType, pfxRcd BGPStatusPeersGetPfxRcdArgType, pfxSnt BGPStatusPeersGetPfxSntArgType, remoteAs BGPStatusPeersGetRemoteAsArgType, remoteIP BGPStatusPeersGetRemoteIPArgType, state BGPStatusPeersGetStateArgType) *BGPStatusPeers {
this := BGPStatusPeers{}
setBGPStatusPeersGetLocalAsAttributeType(&this.LocalAs, localAs)
setBGPStatusPeersGetPeerUptimeAttributeType(&this.PeerUptime, peerUptime)
setBGPStatusPeersGetPfxRcdAttributeType(&this.PfxRcd, pfxRcd)
setBGPStatusPeersGetPfxSntAttributeType(&this.PfxSnt, pfxSnt)
setBGPStatusPeersGetRemoteAsAttributeType(&this.RemoteAs, remoteAs)
setBGPStatusPeersGetRemoteIPAttributeType(&this.RemoteIP, remoteIP)
setBGPStatusPeersGetStateAttributeType(&this.State, state)
return &this
}
// NewBGPStatusPeersWithDefaults instantiates a new BGPStatusPeers 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 NewBGPStatusPeersWithDefaults() *BGPStatusPeers {
this := BGPStatusPeers{}
return &this
}
// GetLocalAs returns the LocalAs field value
func (o *BGPStatusPeers) GetLocalAs() (ret BGPStatusPeersGetLocalAsRetType) {
ret, _ = o.GetLocalAsOk()
return ret
}
// GetLocalAsOk returns a tuple with the LocalAs field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetLocalAsOk() (ret BGPStatusPeersGetLocalAsRetType, ok bool) {
return getBGPStatusPeersGetLocalAsAttributeTypeOk(o.LocalAs)
}
// SetLocalAs sets field value
func (o *BGPStatusPeers) SetLocalAs(v BGPStatusPeersGetLocalAsRetType) {
setBGPStatusPeersGetLocalAsAttributeType(&o.LocalAs, v)
}
// GetPeerUptime returns the PeerUptime field value
func (o *BGPStatusPeers) GetPeerUptime() (ret BGPStatusPeersGetPeerUptimeRetType) {
ret, _ = o.GetPeerUptimeOk()
return ret
}
// GetPeerUptimeOk returns a tuple with the PeerUptime field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetPeerUptimeOk() (ret BGPStatusPeersGetPeerUptimeRetType, ok bool) {
return getBGPStatusPeersGetPeerUptimeAttributeTypeOk(o.PeerUptime)
}
// SetPeerUptime sets field value
func (o *BGPStatusPeers) SetPeerUptime(v BGPStatusPeersGetPeerUptimeRetType) {
setBGPStatusPeersGetPeerUptimeAttributeType(&o.PeerUptime, v)
}
// GetPfxRcd returns the PfxRcd field value
func (o *BGPStatusPeers) GetPfxRcd() (ret BGPStatusPeersGetPfxRcdRetType) {
ret, _ = o.GetPfxRcdOk()
return ret
}
// GetPfxRcdOk returns a tuple with the PfxRcd field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetPfxRcdOk() (ret BGPStatusPeersGetPfxRcdRetType, ok bool) {
return getBGPStatusPeersGetPfxRcdAttributeTypeOk(o.PfxRcd)
}
// SetPfxRcd sets field value
func (o *BGPStatusPeers) SetPfxRcd(v BGPStatusPeersGetPfxRcdRetType) {
setBGPStatusPeersGetPfxRcdAttributeType(&o.PfxRcd, v)
}
// GetPfxSnt returns the PfxSnt field value
func (o *BGPStatusPeers) GetPfxSnt() (ret BGPStatusPeersGetPfxSntRetType) {
ret, _ = o.GetPfxSntOk()
return ret
}
// GetPfxSntOk returns a tuple with the PfxSnt field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetPfxSntOk() (ret BGPStatusPeersGetPfxSntRetType, ok bool) {
return getBGPStatusPeersGetPfxSntAttributeTypeOk(o.PfxSnt)
}
// SetPfxSnt sets field value
func (o *BGPStatusPeers) SetPfxSnt(v BGPStatusPeersGetPfxSntRetType) {
setBGPStatusPeersGetPfxSntAttributeType(&o.PfxSnt, v)
}
// GetRemoteAs returns the RemoteAs field value
func (o *BGPStatusPeers) GetRemoteAs() (ret BGPStatusPeersGetRemoteAsRetType) {
ret, _ = o.GetRemoteAsOk()
return ret
}
// GetRemoteAsOk returns a tuple with the RemoteAs field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetRemoteAsOk() (ret BGPStatusPeersGetRemoteAsRetType, ok bool) {
return getBGPStatusPeersGetRemoteAsAttributeTypeOk(o.RemoteAs)
}
// SetRemoteAs sets field value
func (o *BGPStatusPeers) SetRemoteAs(v BGPStatusPeersGetRemoteAsRetType) {
setBGPStatusPeersGetRemoteAsAttributeType(&o.RemoteAs, v)
}
// GetRemoteIP returns the RemoteIP field value
func (o *BGPStatusPeers) GetRemoteIP() (ret BGPStatusPeersGetRemoteIPRetType) {
ret, _ = o.GetRemoteIPOk()
return ret
}
// GetRemoteIPOk returns a tuple with the RemoteIP field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetRemoteIPOk() (ret BGPStatusPeersGetRemoteIPRetType, ok bool) {
return getBGPStatusPeersGetRemoteIPAttributeTypeOk(o.RemoteIP)
}
// SetRemoteIP sets field value
func (o *BGPStatusPeers) SetRemoteIP(v BGPStatusPeersGetRemoteIPRetType) {
setBGPStatusPeersGetRemoteIPAttributeType(&o.RemoteIP, v)
}
// GetState returns the State field value
func (o *BGPStatusPeers) GetState() (ret BGPStatusPeersGetStateRetType) {
ret, _ = o.GetStateOk()
return ret
}
// GetStateOk returns a tuple with the State field value
// and a boolean to check if the value has been set.
func (o *BGPStatusPeers) GetStateOk() (ret BGPStatusPeersGetStateRetType, ok bool) {
return getBGPStatusPeersGetStateAttributeTypeOk(o.State)
}
// SetState sets field value
func (o *BGPStatusPeers) SetState(v BGPStatusPeersGetStateRetType) {
setBGPStatusPeersGetStateAttributeType(&o.State, v)
}
func (o BGPStatusPeers) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getBGPStatusPeersGetLocalAsAttributeTypeOk(o.LocalAs); ok {
toSerialize["LocalAs"] = val
}
if val, ok := getBGPStatusPeersGetPeerUptimeAttributeTypeOk(o.PeerUptime); ok {
toSerialize["PeerUptime"] = val
}
if val, ok := getBGPStatusPeersGetPfxRcdAttributeTypeOk(o.PfxRcd); ok {
toSerialize["PfxRcd"] = val
}
if val, ok := getBGPStatusPeersGetPfxSntAttributeTypeOk(o.PfxSnt); ok {
toSerialize["PfxSnt"] = val
}
if val, ok := getBGPStatusPeersGetRemoteAsAttributeTypeOk(o.RemoteAs); ok {
toSerialize["RemoteAs"] = val
}
if val, ok := getBGPStatusPeersGetRemoteIPAttributeTypeOk(o.RemoteIP); ok {
toSerialize["RemoteIP"] = val
}
if val, ok := getBGPStatusPeersGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableBGPStatusPeers struct {
value *BGPStatusPeers
isSet bool
}
func (v NullableBGPStatusPeers) Get() *BGPStatusPeers {
return v.value
}
func (v *NullableBGPStatusPeers) Set(val *BGPStatusPeers) {
v.value = val
v.isSet = true
}
func (v NullableBGPStatusPeers) IsSet() bool {
return v.isSet
}
func (v *NullableBGPStatusPeers) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBGPStatusPeers(val *BGPStatusPeers) *NullableBGPStatusPeers {
return &NullableBGPStatusPeers{value: val, isSet: true}
}
func (v NullableBGPStatusPeers) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBGPStatusPeers) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}