301 lines
9.1 KiB
Go
301 lines
9.1 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 BGPStatusRoutes type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BGPStatusRoutes{}
|
|
|
|
/*
|
|
types and functions for network
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BGPStatusRoutesGetNetworkAttributeType = *string
|
|
|
|
func getBGPStatusRoutesGetNetworkAttributeTypeOk(arg BGPStatusRoutesGetNetworkAttributeType) (ret BGPStatusRoutesGetNetworkRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBGPStatusRoutesGetNetworkAttributeType(arg *BGPStatusRoutesGetNetworkAttributeType, val BGPStatusRoutesGetNetworkRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BGPStatusRoutesGetNetworkArgType = string
|
|
type BGPStatusRoutesGetNetworkRetType = string
|
|
|
|
/*
|
|
types and functions for origin
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BGPStatusRoutesGetOriginAttributeType = *string
|
|
|
|
func getBGPStatusRoutesGetOriginAttributeTypeOk(arg BGPStatusRoutesGetOriginAttributeType) (ret BGPStatusRoutesGetOriginRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBGPStatusRoutesGetOriginAttributeType(arg *BGPStatusRoutesGetOriginAttributeType, val BGPStatusRoutesGetOriginRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BGPStatusRoutesGetOriginArgType = string
|
|
type BGPStatusRoutesGetOriginRetType = string
|
|
|
|
/*
|
|
types and functions for path
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BGPStatusRoutesGetPathAttributeType = *string
|
|
|
|
func getBGPStatusRoutesGetPathAttributeTypeOk(arg BGPStatusRoutesGetPathAttributeType) (ret BGPStatusRoutesGetPathRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBGPStatusRoutesGetPathAttributeType(arg *BGPStatusRoutesGetPathAttributeType, val BGPStatusRoutesGetPathRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BGPStatusRoutesGetPathArgType = string
|
|
type BGPStatusRoutesGetPathRetType = string
|
|
|
|
/*
|
|
types and functions for peerId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BGPStatusRoutesGetPeerIdAttributeType = *string
|
|
|
|
func getBGPStatusRoutesGetPeerIdAttributeTypeOk(arg BGPStatusRoutesGetPeerIdAttributeType) (ret BGPStatusRoutesGetPeerIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBGPStatusRoutesGetPeerIdAttributeType(arg *BGPStatusRoutesGetPeerIdAttributeType, val BGPStatusRoutesGetPeerIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BGPStatusRoutesGetPeerIdArgType = string
|
|
type BGPStatusRoutesGetPeerIdRetType = string
|
|
|
|
/*
|
|
types and functions for weight
|
|
*/
|
|
|
|
// isNumber
|
|
type BGPStatusRoutesGetWeightAttributeType = *float64
|
|
type BGPStatusRoutesGetWeightArgType = float64
|
|
type BGPStatusRoutesGetWeightRetType = float64
|
|
|
|
func getBGPStatusRoutesGetWeightAttributeTypeOk(arg BGPStatusRoutesGetWeightAttributeType) (ret BGPStatusRoutesGetWeightRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBGPStatusRoutesGetWeightAttributeType(arg *BGPStatusRoutesGetWeightAttributeType, val BGPStatusRoutesGetWeightRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// BGPStatusRoutes struct for BGPStatusRoutes
|
|
type BGPStatusRoutes struct {
|
|
// REQUIRED
|
|
Network BGPStatusRoutesGetNetworkAttributeType `json:"network" required:"true"`
|
|
// REQUIRED
|
|
Origin BGPStatusRoutesGetOriginAttributeType `json:"origin" required:"true"`
|
|
// REQUIRED
|
|
Path BGPStatusRoutesGetPathAttributeType `json:"path" required:"true"`
|
|
// REQUIRED
|
|
PeerId BGPStatusRoutesGetPeerIdAttributeType `json:"peerId" required:"true"`
|
|
// REQUIRED
|
|
Weight BGPStatusRoutesGetWeightAttributeType `json:"weight" required:"true"`
|
|
}
|
|
|
|
type _BGPStatusRoutes BGPStatusRoutes
|
|
|
|
// NewBGPStatusRoutes instantiates a new BGPStatusRoutes 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 NewBGPStatusRoutes(network BGPStatusRoutesGetNetworkArgType, origin BGPStatusRoutesGetOriginArgType, path BGPStatusRoutesGetPathArgType, peerId BGPStatusRoutesGetPeerIdArgType, weight BGPStatusRoutesGetWeightArgType) *BGPStatusRoutes {
|
|
this := BGPStatusRoutes{}
|
|
setBGPStatusRoutesGetNetworkAttributeType(&this.Network, network)
|
|
setBGPStatusRoutesGetOriginAttributeType(&this.Origin, origin)
|
|
setBGPStatusRoutesGetPathAttributeType(&this.Path, path)
|
|
setBGPStatusRoutesGetPeerIdAttributeType(&this.PeerId, peerId)
|
|
setBGPStatusRoutesGetWeightAttributeType(&this.Weight, weight)
|
|
return &this
|
|
}
|
|
|
|
// NewBGPStatusRoutesWithDefaults instantiates a new BGPStatusRoutes 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 NewBGPStatusRoutesWithDefaults() *BGPStatusRoutes {
|
|
this := BGPStatusRoutes{}
|
|
return &this
|
|
}
|
|
|
|
// GetNetwork returns the Network field value
|
|
func (o *BGPStatusRoutes) GetNetwork() (ret BGPStatusRoutesGetNetworkRetType) {
|
|
ret, _ = o.GetNetworkOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNetworkOk returns a tuple with the Network field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BGPStatusRoutes) GetNetworkOk() (ret BGPStatusRoutesGetNetworkRetType, ok bool) {
|
|
return getBGPStatusRoutesGetNetworkAttributeTypeOk(o.Network)
|
|
}
|
|
|
|
// SetNetwork sets field value
|
|
func (o *BGPStatusRoutes) SetNetwork(v BGPStatusRoutesGetNetworkRetType) {
|
|
setBGPStatusRoutesGetNetworkAttributeType(&o.Network, v)
|
|
}
|
|
|
|
// GetOrigin returns the Origin field value
|
|
func (o *BGPStatusRoutes) GetOrigin() (ret BGPStatusRoutesGetOriginRetType) {
|
|
ret, _ = o.GetOriginOk()
|
|
return ret
|
|
}
|
|
|
|
// GetOriginOk returns a tuple with the Origin field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BGPStatusRoutes) GetOriginOk() (ret BGPStatusRoutesGetOriginRetType, ok bool) {
|
|
return getBGPStatusRoutesGetOriginAttributeTypeOk(o.Origin)
|
|
}
|
|
|
|
// SetOrigin sets field value
|
|
func (o *BGPStatusRoutes) SetOrigin(v BGPStatusRoutesGetOriginRetType) {
|
|
setBGPStatusRoutesGetOriginAttributeType(&o.Origin, v)
|
|
}
|
|
|
|
// GetPath returns the Path field value
|
|
func (o *BGPStatusRoutes) GetPath() (ret BGPStatusRoutesGetPathRetType) {
|
|
ret, _ = o.GetPathOk()
|
|
return ret
|
|
}
|
|
|
|
// GetPathOk returns a tuple with the Path field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BGPStatusRoutes) GetPathOk() (ret BGPStatusRoutesGetPathRetType, ok bool) {
|
|
return getBGPStatusRoutesGetPathAttributeTypeOk(o.Path)
|
|
}
|
|
|
|
// SetPath sets field value
|
|
func (o *BGPStatusRoutes) SetPath(v BGPStatusRoutesGetPathRetType) {
|
|
setBGPStatusRoutesGetPathAttributeType(&o.Path, v)
|
|
}
|
|
|
|
// GetPeerId returns the PeerId field value
|
|
func (o *BGPStatusRoutes) GetPeerId() (ret BGPStatusRoutesGetPeerIdRetType) {
|
|
ret, _ = o.GetPeerIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetPeerIdOk returns a tuple with the PeerId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BGPStatusRoutes) GetPeerIdOk() (ret BGPStatusRoutesGetPeerIdRetType, ok bool) {
|
|
return getBGPStatusRoutesGetPeerIdAttributeTypeOk(o.PeerId)
|
|
}
|
|
|
|
// SetPeerId sets field value
|
|
func (o *BGPStatusRoutes) SetPeerId(v BGPStatusRoutesGetPeerIdRetType) {
|
|
setBGPStatusRoutesGetPeerIdAttributeType(&o.PeerId, v)
|
|
}
|
|
|
|
// GetWeight returns the Weight field value
|
|
func (o *BGPStatusRoutes) GetWeight() (ret BGPStatusRoutesGetWeightRetType) {
|
|
ret, _ = o.GetWeightOk()
|
|
return ret
|
|
}
|
|
|
|
// GetWeightOk returns a tuple with the Weight field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BGPStatusRoutes) GetWeightOk() (ret BGPStatusRoutesGetWeightRetType, ok bool) {
|
|
return getBGPStatusRoutesGetWeightAttributeTypeOk(o.Weight)
|
|
}
|
|
|
|
// SetWeight sets field value
|
|
func (o *BGPStatusRoutes) SetWeight(v BGPStatusRoutesGetWeightRetType) {
|
|
setBGPStatusRoutesGetWeightAttributeType(&o.Weight, v)
|
|
}
|
|
|
|
func (o BGPStatusRoutes) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getBGPStatusRoutesGetNetworkAttributeTypeOk(o.Network); ok {
|
|
toSerialize["Network"] = val
|
|
}
|
|
if val, ok := getBGPStatusRoutesGetOriginAttributeTypeOk(o.Origin); ok {
|
|
toSerialize["Origin"] = val
|
|
}
|
|
if val, ok := getBGPStatusRoutesGetPathAttributeTypeOk(o.Path); ok {
|
|
toSerialize["Path"] = val
|
|
}
|
|
if val, ok := getBGPStatusRoutesGetPeerIdAttributeTypeOk(o.PeerId); ok {
|
|
toSerialize["PeerId"] = val
|
|
}
|
|
if val, ok := getBGPStatusRoutesGetWeightAttributeTypeOk(o.Weight); ok {
|
|
toSerialize["Weight"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableBGPStatusRoutes struct {
|
|
value *BGPStatusRoutes
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBGPStatusRoutes) Get() *BGPStatusRoutes {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBGPStatusRoutes) Set(val *BGPStatusRoutes) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBGPStatusRoutes) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBGPStatusRoutes) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBGPStatusRoutes(val *BGPStatusRoutes) *NullableBGPStatusRoutes {
|
|
return &NullableBGPStatusRoutes{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBGPStatusRoutes) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBGPStatusRoutes) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|