feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
174
pkg/vpnalpha/model_bgp_status.go
Normal file
174
pkg/vpnalpha/model_bgp_status.go
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/*
|
||||
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 BGPStatus type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BGPStatus{}
|
||||
|
||||
/*
|
||||
types and functions for peers
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type BGPStatusGetPeersAttributeType = *[]BGPStatusPeers
|
||||
type BGPStatusGetPeersArgType = []BGPStatusPeers
|
||||
type BGPStatusGetPeersRetType = []BGPStatusPeers
|
||||
|
||||
func getBGPStatusGetPeersAttributeTypeOk(arg BGPStatusGetPeersAttributeType) (ret BGPStatusGetPeersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBGPStatusGetPeersAttributeType(arg *BGPStatusGetPeersAttributeType, val BGPStatusGetPeersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for routes
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type BGPStatusGetRoutesAttributeType = *[]BGPStatusRoutes
|
||||
type BGPStatusGetRoutesArgType = []BGPStatusRoutes
|
||||
type BGPStatusGetRoutesRetType = []BGPStatusRoutes
|
||||
|
||||
func getBGPStatusGetRoutesAttributeTypeOk(arg BGPStatusGetRoutesAttributeType) (ret BGPStatusGetRoutesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBGPStatusGetRoutesAttributeType(arg *BGPStatusGetRoutesAttributeType, val BGPStatusGetRoutesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// BGPStatus struct for BGPStatus
|
||||
type BGPStatus struct {
|
||||
Peers BGPStatusGetPeersAttributeType `json:"peers,omitempty"`
|
||||
Routes BGPStatusGetRoutesAttributeType `json:"routes,omitempty"`
|
||||
}
|
||||
|
||||
// NewBGPStatus instantiates a new BGPStatus 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 NewBGPStatus() *BGPStatus {
|
||||
this := BGPStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBGPStatusWithDefaults instantiates a new BGPStatus 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 NewBGPStatusWithDefaults() *BGPStatus {
|
||||
this := BGPStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPeers returns the Peers field value if set, zero value otherwise.
|
||||
func (o *BGPStatus) GetPeers() (res BGPStatusGetPeersRetType) {
|
||||
res, _ = o.GetPeersOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetPeersOk returns a tuple with the Peers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BGPStatus) GetPeersOk() (ret BGPStatusGetPeersRetType, ok bool) {
|
||||
return getBGPStatusGetPeersAttributeTypeOk(o.Peers)
|
||||
}
|
||||
|
||||
// HasPeers returns a boolean if a field has been set.
|
||||
func (o *BGPStatus) HasPeers() bool {
|
||||
_, ok := o.GetPeersOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPeers gets a reference to the given []BGPStatusPeers and assigns it to the Peers field.
|
||||
func (o *BGPStatus) SetPeers(v BGPStatusGetPeersRetType) {
|
||||
setBGPStatusGetPeersAttributeType(&o.Peers, v)
|
||||
}
|
||||
|
||||
// GetRoutes returns the Routes field value if set, zero value otherwise.
|
||||
func (o *BGPStatus) GetRoutes() (res BGPStatusGetRoutesRetType) {
|
||||
res, _ = o.GetRoutesOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BGPStatus) GetRoutesOk() (ret BGPStatusGetRoutesRetType, ok bool) {
|
||||
return getBGPStatusGetRoutesAttributeTypeOk(o.Routes)
|
||||
}
|
||||
|
||||
// HasRoutes returns a boolean if a field has been set.
|
||||
func (o *BGPStatus) HasRoutes() bool {
|
||||
_, ok := o.GetRoutesOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRoutes gets a reference to the given []BGPStatusRoutes and assigns it to the Routes field.
|
||||
func (o *BGPStatus) SetRoutes(v BGPStatusGetRoutesRetType) {
|
||||
setBGPStatusGetRoutesAttributeType(&o.Routes, v)
|
||||
}
|
||||
|
||||
func (o BGPStatus) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBGPStatusGetPeersAttributeTypeOk(o.Peers); ok {
|
||||
toSerialize["Peers"] = val
|
||||
}
|
||||
if val, ok := getBGPStatusGetRoutesAttributeTypeOk(o.Routes); ok {
|
||||
toSerialize["Routes"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBGPStatus struct {
|
||||
value *BGPStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBGPStatus) Get() *BGPStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBGPStatus) Set(val *BGPStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBGPStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBGPStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBGPStatus(val *BGPStatus) *NullableBGPStatus {
|
||||
return &NullableBGPStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBGPStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBGPStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue