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

407 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 GatewayWithStatus type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GatewayWithStatus{}
/*
types and functions for region
*/
// isEnumRef
type GatewayWithStatusGetRegionAttributeType = *Region
type GatewayWithStatusGetRegionArgType = Region
type GatewayWithStatusGetRegionRetType = Region
func getGatewayWithStatusGetRegionAttributeTypeOk(arg GatewayWithStatusGetRegionAttributeType) (ret GatewayWithStatusGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusGetRegionAttributeType(arg *GatewayWithStatusGetRegionAttributeType, val GatewayWithStatusGetRegionRetType) {
*arg = &val
}
/*
types and functions for availabilityZones
*/
// isModel
type GatewayWithStatusGetAvailabilityZonesAttributeType = *CreateVPNGatewayPayloadAvailabilityZones
type GatewayWithStatusGetAvailabilityZonesArgType = CreateVPNGatewayPayloadAvailabilityZones
type GatewayWithStatusGetAvailabilityZonesRetType = CreateVPNGatewayPayloadAvailabilityZones
func getGatewayWithStatusGetAvailabilityZonesAttributeTypeOk(arg GatewayWithStatusGetAvailabilityZonesAttributeType) (ret GatewayWithStatusGetAvailabilityZonesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusGetAvailabilityZonesAttributeType(arg *GatewayWithStatusGetAvailabilityZonesAttributeType, val GatewayWithStatusGetAvailabilityZonesRetType) {
*arg = &val
}
/*
types and functions for bgpEnabled
*/
// isBoolean
type GatewayWithStatusgetBgpEnabledAttributeType = *bool
type GatewayWithStatusgetBgpEnabledArgType = bool
type GatewayWithStatusgetBgpEnabledRetType = bool
func getGatewayWithStatusgetBgpEnabledAttributeTypeOk(arg GatewayWithStatusgetBgpEnabledAttributeType) (ret GatewayWithStatusgetBgpEnabledRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusgetBgpEnabledAttributeType(arg *GatewayWithStatusgetBgpEnabledAttributeType, val GatewayWithStatusgetBgpEnabledRetType) {
*arg = &val
}
/*
types and functions for bgpGatewayConfig
*/
// isModel
type GatewayWithStatusGetBgpGatewayConfigAttributeType = *BGPGatewayConfig
type GatewayWithStatusGetBgpGatewayConfigArgType = BGPGatewayConfig
type GatewayWithStatusGetBgpGatewayConfigRetType = BGPGatewayConfig
func getGatewayWithStatusGetBgpGatewayConfigAttributeTypeOk(arg GatewayWithStatusGetBgpGatewayConfigAttributeType) (ret GatewayWithStatusGetBgpGatewayConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusGetBgpGatewayConfigAttributeType(arg *GatewayWithStatusGetBgpGatewayConfigAttributeType, val GatewayWithStatusGetBgpGatewayConfigRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type GatewayWithStatusGetLabelsAttributeType = *map[string]string
type GatewayWithStatusGetLabelsArgType = map[string]string
type GatewayWithStatusGetLabelsRetType = map[string]string
func getGatewayWithStatusGetLabelsAttributeTypeOk(arg GatewayWithStatusGetLabelsAttributeType) (ret GatewayWithStatusGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusGetLabelsAttributeType(arg *GatewayWithStatusGetLabelsAttributeType, val GatewayWithStatusGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type GatewayWithStatusGetNameAttributeType = *string
func getGatewayWithStatusGetNameAttributeTypeOk(arg GatewayWithStatusGetNameAttributeType) (ret GatewayWithStatusGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusGetNameAttributeType(arg *GatewayWithStatusGetNameAttributeType, val GatewayWithStatusGetNameRetType) {
*arg = &val
}
type GatewayWithStatusGetNameArgType = string
type GatewayWithStatusGetNameRetType = string
/*
types and functions for planId
*/
// isNotNullableString
type GatewayWithStatusGetPlanIdAttributeType = *string
func getGatewayWithStatusGetPlanIdAttributeTypeOk(arg GatewayWithStatusGetPlanIdAttributeType) (ret GatewayWithStatusGetPlanIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGatewayWithStatusGetPlanIdAttributeType(arg *GatewayWithStatusGetPlanIdAttributeType, val GatewayWithStatusGetPlanIdRetType) {
*arg = &val
}
type GatewayWithStatusGetPlanIdArgType = string
type GatewayWithStatusGetPlanIdRetType = string
// GatewayWithStatus struct for GatewayWithStatus
type GatewayWithStatus struct {
Region GatewayWithStatusGetRegionAttributeType `json:"region,omitempty"`
// REQUIRED
AvailabilityZones GatewayWithStatusGetAvailabilityZonesAttributeType `json:"availabilityZones" required:"true"`
// Enable BGP routing. (This will require a BGPGatewayConfig and also a BGPTunnelConfig for each Tunnel in each Connection)
BgpEnabled GatewayWithStatusgetBgpEnabledAttributeType `json:"bgpEnabled,omitempty"`
BgpGatewayConfig GatewayWithStatusGetBgpGatewayConfigAttributeType `json:"bgpGatewayConfig,omitempty"`
// Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric.
Labels GatewayWithStatusGetLabelsAttributeType `json:"labels,omitempty"`
// The name of the VPN gateway. Maximum 20 characters (only alphanumeric and hyphens allowed). Not changeable after creation.
// REQUIRED
Name GatewayWithStatusGetNameAttributeType `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 GatewayWithStatusGetPlanIdAttributeType `json:"planId" required:"true"`
}
type _GatewayWithStatus GatewayWithStatus
// NewGatewayWithStatus instantiates a new GatewayWithStatus 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 NewGatewayWithStatus(availabilityZones GatewayWithStatusGetAvailabilityZonesArgType, name GatewayWithStatusGetNameArgType, planId GatewayWithStatusGetPlanIdArgType) *GatewayWithStatus {
this := GatewayWithStatus{}
setGatewayWithStatusGetAvailabilityZonesAttributeType(&this.AvailabilityZones, availabilityZones)
setGatewayWithStatusGetNameAttributeType(&this.Name, name)
setGatewayWithStatusGetPlanIdAttributeType(&this.PlanId, planId)
return &this
}
// NewGatewayWithStatusWithDefaults instantiates a new GatewayWithStatus 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 NewGatewayWithStatusWithDefaults() *GatewayWithStatus {
this := GatewayWithStatus{}
var region Region = REGION_EU01
this.Region = &region
return &this
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *GatewayWithStatus) GetRegion() (res GatewayWithStatusGetRegionRetType) {
res, _ = o.GetRegionOk()
return
}
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GatewayWithStatus) GetRegionOk() (ret GatewayWithStatusGetRegionRetType, ok bool) {
return getGatewayWithStatusGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *GatewayWithStatus) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given Region and assigns it to the Region field.
func (o *GatewayWithStatus) SetRegion(v GatewayWithStatusGetRegionRetType) {
setGatewayWithStatusGetRegionAttributeType(&o.Region, v)
}
// GetAvailabilityZones returns the AvailabilityZones field value
func (o *GatewayWithStatus) GetAvailabilityZones() (ret GatewayWithStatusGetAvailabilityZonesRetType) {
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 *GatewayWithStatus) GetAvailabilityZonesOk() (ret GatewayWithStatusGetAvailabilityZonesRetType, ok bool) {
return getGatewayWithStatusGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones)
}
// SetAvailabilityZones sets field value
func (o *GatewayWithStatus) SetAvailabilityZones(v GatewayWithStatusGetAvailabilityZonesRetType) {
setGatewayWithStatusGetAvailabilityZonesAttributeType(&o.AvailabilityZones, v)
}
// GetBgpEnabled returns the BgpEnabled field value if set, zero value otherwise.
func (o *GatewayWithStatus) GetBgpEnabled() (res GatewayWithStatusgetBgpEnabledRetType) {
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 *GatewayWithStatus) GetBgpEnabledOk() (ret GatewayWithStatusgetBgpEnabledRetType, ok bool) {
return getGatewayWithStatusgetBgpEnabledAttributeTypeOk(o.BgpEnabled)
}
// HasBgpEnabled returns a boolean if a field has been set.
func (o *GatewayWithStatus) HasBgpEnabled() bool {
_, ok := o.GetBgpEnabledOk()
return ok
}
// SetBgpEnabled gets a reference to the given bool and assigns it to the BgpEnabled field.
func (o *GatewayWithStatus) SetBgpEnabled(v GatewayWithStatusgetBgpEnabledRetType) {
setGatewayWithStatusgetBgpEnabledAttributeType(&o.BgpEnabled, v)
}
// GetBgpGatewayConfig returns the BgpGatewayConfig field value if set, zero value otherwise.
func (o *GatewayWithStatus) GetBgpGatewayConfig() (res GatewayWithStatusGetBgpGatewayConfigRetType) {
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 *GatewayWithStatus) GetBgpGatewayConfigOk() (ret GatewayWithStatusGetBgpGatewayConfigRetType, ok bool) {
return getGatewayWithStatusGetBgpGatewayConfigAttributeTypeOk(o.BgpGatewayConfig)
}
// HasBgpGatewayConfig returns a boolean if a field has been set.
func (o *GatewayWithStatus) HasBgpGatewayConfig() bool {
_, ok := o.GetBgpGatewayConfigOk()
return ok
}
// SetBgpGatewayConfig gets a reference to the given BGPGatewayConfig and assigns it to the BgpGatewayConfig field.
func (o *GatewayWithStatus) SetBgpGatewayConfig(v GatewayWithStatusGetBgpGatewayConfigRetType) {
setGatewayWithStatusGetBgpGatewayConfigAttributeType(&o.BgpGatewayConfig, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *GatewayWithStatus) GetLabels() (res GatewayWithStatusGetLabelsRetType) {
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 *GatewayWithStatus) GetLabelsOk() (ret GatewayWithStatusGetLabelsRetType, ok bool) {
return getGatewayWithStatusGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *GatewayWithStatus) 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 *GatewayWithStatus) SetLabels(v GatewayWithStatusGetLabelsRetType) {
setGatewayWithStatusGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value
func (o *GatewayWithStatus) GetName() (ret GatewayWithStatusGetNameRetType) {
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 *GatewayWithStatus) GetNameOk() (ret GatewayWithStatusGetNameRetType, ok bool) {
return getGatewayWithStatusGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *GatewayWithStatus) SetName(v GatewayWithStatusGetNameRetType) {
setGatewayWithStatusGetNameAttributeType(&o.Name, v)
}
// GetPlanId returns the PlanId field value
func (o *GatewayWithStatus) GetPlanId() (ret GatewayWithStatusGetPlanIdRetType) {
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 *GatewayWithStatus) GetPlanIdOk() (ret GatewayWithStatusGetPlanIdRetType, ok bool) {
return getGatewayWithStatusGetPlanIdAttributeTypeOk(o.PlanId)
}
// SetPlanId sets field value
func (o *GatewayWithStatus) SetPlanId(v GatewayWithStatusGetPlanIdRetType) {
setGatewayWithStatusGetPlanIdAttributeType(&o.PlanId, v)
}
func (o GatewayWithStatus) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGatewayWithStatusGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
if val, ok := getGatewayWithStatusGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones); ok {
toSerialize["AvailabilityZones"] = val
}
if val, ok := getGatewayWithStatusgetBgpEnabledAttributeTypeOk(o.BgpEnabled); ok {
toSerialize["BgpEnabled"] = val
}
if val, ok := getGatewayWithStatusGetBgpGatewayConfigAttributeTypeOk(o.BgpGatewayConfig); ok {
toSerialize["BgpGatewayConfig"] = val
}
if val, ok := getGatewayWithStatusGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getGatewayWithStatusGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getGatewayWithStatusGetPlanIdAttributeTypeOk(o.PlanId); ok {
toSerialize["PlanId"] = val
}
return toSerialize, nil
}
type NullableGatewayWithStatus struct {
value *GatewayWithStatus
isSet bool
}
func (v NullableGatewayWithStatus) Get() *GatewayWithStatus {
return v.value
}
func (v *NullableGatewayWithStatus) Set(val *GatewayWithStatus) {
v.value = val
v.isSet = true
}
func (v NullableGatewayWithStatus) IsSet() bool {
return v.isSet
}
func (v *NullableGatewayWithStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGatewayWithStatus(val *GatewayWithStatus) *NullableGatewayWithStatus {
return &NullableGatewayWithStatus{value: val, isSet: true}
}
func (v NullableGatewayWithStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGatewayWithStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}