400 lines
14 KiB
Go
400 lines
14 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 GatewaysResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GatewaysResponse{}
|
|
|
|
/*
|
|
types and functions for state
|
|
*/
|
|
|
|
// isEnumRef
|
|
type GatewaysResponseGetStateAttributeType = *GatewayStatus
|
|
type GatewaysResponseGetStateArgType = GatewayStatus
|
|
type GatewaysResponseGetStateRetType = GatewayStatus
|
|
|
|
func getGatewaysResponseGetStateAttributeTypeOk(arg GatewaysResponseGetStateAttributeType) (ret GatewaysResponseGetStateRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponseGetStateAttributeType(arg *GatewaysResponseGetStateAttributeType, val GatewaysResponseGetStateRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for availabilityZones
|
|
*/
|
|
|
|
// isModel
|
|
type GatewaysResponseGetAvailabilityZonesAttributeType = *CreateVPNGatewayPayloadAvailabilityZones
|
|
type GatewaysResponseGetAvailabilityZonesArgType = CreateVPNGatewayPayloadAvailabilityZones
|
|
type GatewaysResponseGetAvailabilityZonesRetType = CreateVPNGatewayPayloadAvailabilityZones
|
|
|
|
func getGatewaysResponseGetAvailabilityZonesAttributeTypeOk(arg GatewaysResponseGetAvailabilityZonesAttributeType) (ret GatewaysResponseGetAvailabilityZonesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponseGetAvailabilityZonesAttributeType(arg *GatewaysResponseGetAvailabilityZonesAttributeType, val GatewaysResponseGetAvailabilityZonesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for bgpEnabled
|
|
*/
|
|
|
|
// isBoolean
|
|
type GatewaysResponsegetBgpEnabledAttributeType = *bool
|
|
type GatewaysResponsegetBgpEnabledArgType = bool
|
|
type GatewaysResponsegetBgpEnabledRetType = bool
|
|
|
|
func getGatewaysResponsegetBgpEnabledAttributeTypeOk(arg GatewaysResponsegetBgpEnabledAttributeType) (ret GatewaysResponsegetBgpEnabledRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponsegetBgpEnabledAttributeType(arg *GatewaysResponsegetBgpEnabledAttributeType, val GatewaysResponsegetBgpEnabledRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for bgpGatewayConfig
|
|
*/
|
|
|
|
// isModel
|
|
type GatewaysResponseGetBgpGatewayConfigAttributeType = *BGPGatewayConfig
|
|
type GatewaysResponseGetBgpGatewayConfigArgType = BGPGatewayConfig
|
|
type GatewaysResponseGetBgpGatewayConfigRetType = BGPGatewayConfig
|
|
|
|
func getGatewaysResponseGetBgpGatewayConfigAttributeTypeOk(arg GatewaysResponseGetBgpGatewayConfigAttributeType) (ret GatewaysResponseGetBgpGatewayConfigRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponseGetBgpGatewayConfigAttributeType(arg *GatewaysResponseGetBgpGatewayConfigAttributeType, val GatewaysResponseGetBgpGatewayConfigRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isContainer
|
|
type GatewaysResponseGetLabelsAttributeType = *map[string]string
|
|
type GatewaysResponseGetLabelsArgType = map[string]string
|
|
type GatewaysResponseGetLabelsRetType = map[string]string
|
|
|
|
func getGatewaysResponseGetLabelsAttributeTypeOk(arg GatewaysResponseGetLabelsAttributeType) (ret GatewaysResponseGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponseGetLabelsAttributeType(arg *GatewaysResponseGetLabelsAttributeType, val GatewaysResponseGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GatewaysResponseGetNameAttributeType = *string
|
|
|
|
func getGatewaysResponseGetNameAttributeTypeOk(arg GatewaysResponseGetNameAttributeType) (ret GatewaysResponseGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponseGetNameAttributeType(arg *GatewaysResponseGetNameAttributeType, val GatewaysResponseGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GatewaysResponseGetNameArgType = string
|
|
type GatewaysResponseGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for planId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GatewaysResponseGetPlanIdAttributeType = *string
|
|
|
|
func getGatewaysResponseGetPlanIdAttributeTypeOk(arg GatewaysResponseGetPlanIdAttributeType) (ret GatewaysResponseGetPlanIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGatewaysResponseGetPlanIdAttributeType(arg *GatewaysResponseGetPlanIdAttributeType, val GatewaysResponseGetPlanIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GatewaysResponseGetPlanIdArgType = string
|
|
type GatewaysResponseGetPlanIdRetType = string
|
|
|
|
// GatewaysResponse struct for GatewaysResponse
|
|
type GatewaysResponse struct {
|
|
// REQUIRED
|
|
State GatewaysResponseGetStateAttributeType `json:"state" required:"true"`
|
|
// REQUIRED
|
|
AvailabilityZones GatewaysResponseGetAvailabilityZonesAttributeType `json:"availabilityZones" required:"true"`
|
|
// Enable BGP routing. (This will require a BGPGatewayConfig and also a BGPTunnelConfig for each Tunnel in each Connection)
|
|
BgpEnabled GatewaysResponsegetBgpEnabledAttributeType `json:"bgpEnabled,omitempty"`
|
|
BgpGatewayConfig GatewaysResponseGetBgpGatewayConfigAttributeType `json:"bgpGatewayConfig,omitempty"`
|
|
// Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric.
|
|
Labels GatewaysResponseGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// The name of the VPN gateway. Maximum 20 characters (only alphanumeric and hyphens allowed). Not changeable after creation.
|
|
// REQUIRED
|
|
Name GatewaysResponseGetNameAttributeType `json:"name" required:"true"`
|
|
// Service Plan to configure the limits of the VPN. Currently supported plans are p50, p100, p200. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum.
|
|
// REQUIRED
|
|
PlanId GatewaysResponseGetPlanIdAttributeType `json:"planId" required:"true"`
|
|
}
|
|
|
|
type _GatewaysResponse GatewaysResponse
|
|
|
|
// NewGatewaysResponse instantiates a new GatewaysResponse 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 NewGatewaysResponse(state GatewaysResponseGetStateArgType, availabilityZones GatewaysResponseGetAvailabilityZonesArgType, name GatewaysResponseGetNameArgType, planId GatewaysResponseGetPlanIdArgType) *GatewaysResponse {
|
|
this := GatewaysResponse{}
|
|
setGatewaysResponseGetAvailabilityZonesAttributeType(&this.AvailabilityZones, availabilityZones)
|
|
setGatewaysResponseGetNameAttributeType(&this.Name, name)
|
|
setGatewaysResponseGetPlanIdAttributeType(&this.PlanId, planId)
|
|
return &this
|
|
}
|
|
|
|
// NewGatewaysResponseWithDefaults instantiates a new GatewaysResponse 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 NewGatewaysResponseWithDefaults() *GatewaysResponse {
|
|
this := GatewaysResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetState returns the State field value
|
|
func (o *GatewaysResponse) GetState() (ret GatewaysResponseGetStateRetType) {
|
|
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 *GatewaysResponse) GetStateOk() (ret GatewaysResponseGetStateRetType, ok bool) {
|
|
return getGatewaysResponseGetStateAttributeTypeOk(o.State)
|
|
}
|
|
|
|
// SetState sets field value
|
|
func (o *GatewaysResponse) SetState(v GatewaysResponseGetStateRetType) {
|
|
setGatewaysResponseGetStateAttributeType(&o.State, v)
|
|
}
|
|
|
|
// GetAvailabilityZones returns the AvailabilityZones field value
|
|
func (o *GatewaysResponse) GetAvailabilityZones() (ret GatewaysResponseGetAvailabilityZonesRetType) {
|
|
ret, _ = o.GetAvailabilityZonesOk()
|
|
return ret
|
|
}
|
|
|
|
// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewaysResponse) GetAvailabilityZonesOk() (ret GatewaysResponseGetAvailabilityZonesRetType, ok bool) {
|
|
return getGatewaysResponseGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones)
|
|
}
|
|
|
|
// SetAvailabilityZones sets field value
|
|
func (o *GatewaysResponse) SetAvailabilityZones(v GatewaysResponseGetAvailabilityZonesRetType) {
|
|
setGatewaysResponseGetAvailabilityZonesAttributeType(&o.AvailabilityZones, v)
|
|
}
|
|
|
|
// GetBgpEnabled returns the BgpEnabled field value if set, zero value otherwise.
|
|
func (o *GatewaysResponse) GetBgpEnabled() (res GatewaysResponsegetBgpEnabledRetType) {
|
|
res, _ = o.GetBgpEnabledOk()
|
|
return
|
|
}
|
|
|
|
// GetBgpEnabledOk returns a tuple with the BgpEnabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewaysResponse) GetBgpEnabledOk() (ret GatewaysResponsegetBgpEnabledRetType, ok bool) {
|
|
return getGatewaysResponsegetBgpEnabledAttributeTypeOk(o.BgpEnabled)
|
|
}
|
|
|
|
// HasBgpEnabled returns a boolean if a field has been set.
|
|
func (o *GatewaysResponse) HasBgpEnabled() bool {
|
|
_, ok := o.GetBgpEnabledOk()
|
|
return ok
|
|
}
|
|
|
|
// SetBgpEnabled gets a reference to the given bool and assigns it to the BgpEnabled field.
|
|
func (o *GatewaysResponse) SetBgpEnabled(v GatewaysResponsegetBgpEnabledRetType) {
|
|
setGatewaysResponsegetBgpEnabledAttributeType(&o.BgpEnabled, v)
|
|
}
|
|
|
|
// GetBgpGatewayConfig returns the BgpGatewayConfig field value if set, zero value otherwise.
|
|
func (o *GatewaysResponse) GetBgpGatewayConfig() (res GatewaysResponseGetBgpGatewayConfigRetType) {
|
|
res, _ = o.GetBgpGatewayConfigOk()
|
|
return
|
|
}
|
|
|
|
// GetBgpGatewayConfigOk returns a tuple with the BgpGatewayConfig field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewaysResponse) GetBgpGatewayConfigOk() (ret GatewaysResponseGetBgpGatewayConfigRetType, ok bool) {
|
|
return getGatewaysResponseGetBgpGatewayConfigAttributeTypeOk(o.BgpGatewayConfig)
|
|
}
|
|
|
|
// HasBgpGatewayConfig returns a boolean if a field has been set.
|
|
func (o *GatewaysResponse) HasBgpGatewayConfig() bool {
|
|
_, ok := o.GetBgpGatewayConfigOk()
|
|
return ok
|
|
}
|
|
|
|
// SetBgpGatewayConfig gets a reference to the given BGPGatewayConfig and assigns it to the BgpGatewayConfig field.
|
|
func (o *GatewaysResponse) SetBgpGatewayConfig(v GatewaysResponseGetBgpGatewayConfigRetType) {
|
|
setGatewaysResponseGetBgpGatewayConfigAttributeType(&o.BgpGatewayConfig, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *GatewaysResponse) GetLabels() (res GatewaysResponseGetLabelsRetType) {
|
|
res, _ = o.GetLabelsOk()
|
|
return
|
|
}
|
|
|
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewaysResponse) GetLabelsOk() (ret GatewaysResponseGetLabelsRetType, ok bool) {
|
|
return getGatewaysResponseGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *GatewaysResponse) HasLabels() bool {
|
|
_, ok := o.GetLabelsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
|
|
func (o *GatewaysResponse) SetLabels(v GatewaysResponseGetLabelsRetType) {
|
|
setGatewaysResponseGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *GatewaysResponse) GetName() (ret GatewaysResponseGetNameRetType) {
|
|
ret, _ = o.GetNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewaysResponse) GetNameOk() (ret GatewaysResponseGetNameRetType, ok bool) {
|
|
return getGatewaysResponseGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *GatewaysResponse) SetName(v GatewaysResponseGetNameRetType) {
|
|
setGatewaysResponseGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetPlanId returns the PlanId field value
|
|
func (o *GatewaysResponse) GetPlanId() (ret GatewaysResponseGetPlanIdRetType) {
|
|
ret, _ = o.GetPlanIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetPlanIdOk returns a tuple with the PlanId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewaysResponse) GetPlanIdOk() (ret GatewaysResponseGetPlanIdRetType, ok bool) {
|
|
return getGatewaysResponseGetPlanIdAttributeTypeOk(o.PlanId)
|
|
}
|
|
|
|
// SetPlanId sets field value
|
|
func (o *GatewaysResponse) SetPlanId(v GatewaysResponseGetPlanIdRetType) {
|
|
setGatewaysResponseGetPlanIdAttributeType(&o.PlanId, v)
|
|
}
|
|
|
|
func (o GatewaysResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getGatewaysResponseGetStateAttributeTypeOk(o.State); ok {
|
|
toSerialize["State"] = val
|
|
}
|
|
if val, ok := getGatewaysResponseGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones); ok {
|
|
toSerialize["AvailabilityZones"] = val
|
|
}
|
|
if val, ok := getGatewaysResponsegetBgpEnabledAttributeTypeOk(o.BgpEnabled); ok {
|
|
toSerialize["BgpEnabled"] = val
|
|
}
|
|
if val, ok := getGatewaysResponseGetBgpGatewayConfigAttributeTypeOk(o.BgpGatewayConfig); ok {
|
|
toSerialize["BgpGatewayConfig"] = val
|
|
}
|
|
if val, ok := getGatewaysResponseGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getGatewaysResponseGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getGatewaysResponseGetPlanIdAttributeTypeOk(o.PlanId); ok {
|
|
toSerialize["PlanId"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableGatewaysResponse struct {
|
|
value *GatewaysResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGatewaysResponse) Get() *GatewaysResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGatewaysResponse) Set(val *GatewaysResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGatewaysResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGatewaysResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGatewaysResponse(val *GatewaysResponse) *NullableGatewaysResponse {
|
|
return &NullableGatewaysResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGatewaysResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGatewaysResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|