/* 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 GatewayRequest type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GatewayRequest{} /* types and functions for availabilityZones */ // isModel type GatewayRequestGetAvailabilityZonesAttributeType = *CreateVPNGatewayPayloadAvailabilityZones type GatewayRequestGetAvailabilityZonesArgType = CreateVPNGatewayPayloadAvailabilityZones type GatewayRequestGetAvailabilityZonesRetType = CreateVPNGatewayPayloadAvailabilityZones func getGatewayRequestGetAvailabilityZonesAttributeTypeOk(arg GatewayRequestGetAvailabilityZonesAttributeType) (ret GatewayRequestGetAvailabilityZonesRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGatewayRequestGetAvailabilityZonesAttributeType(arg *GatewayRequestGetAvailabilityZonesAttributeType, val GatewayRequestGetAvailabilityZonesRetType) { *arg = &val } /* types and functions for bgpEnabled */ // isBoolean type GatewayRequestgetBgpEnabledAttributeType = *bool type GatewayRequestgetBgpEnabledArgType = bool type GatewayRequestgetBgpEnabledRetType = bool func getGatewayRequestgetBgpEnabledAttributeTypeOk(arg GatewayRequestgetBgpEnabledAttributeType) (ret GatewayRequestgetBgpEnabledRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGatewayRequestgetBgpEnabledAttributeType(arg *GatewayRequestgetBgpEnabledAttributeType, val GatewayRequestgetBgpEnabledRetType) { *arg = &val } /* types and functions for bgpGatewayConfig */ // isModel type GatewayRequestGetBgpGatewayConfigAttributeType = *BGPGatewayConfig type GatewayRequestGetBgpGatewayConfigArgType = BGPGatewayConfig type GatewayRequestGetBgpGatewayConfigRetType = BGPGatewayConfig func getGatewayRequestGetBgpGatewayConfigAttributeTypeOk(arg GatewayRequestGetBgpGatewayConfigAttributeType) (ret GatewayRequestGetBgpGatewayConfigRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGatewayRequestGetBgpGatewayConfigAttributeType(arg *GatewayRequestGetBgpGatewayConfigAttributeType, val GatewayRequestGetBgpGatewayConfigRetType) { *arg = &val } /* types and functions for labels */ // isContainer type GatewayRequestGetLabelsAttributeType = *map[string]string type GatewayRequestGetLabelsArgType = map[string]string type GatewayRequestGetLabelsRetType = map[string]string func getGatewayRequestGetLabelsAttributeTypeOk(arg GatewayRequestGetLabelsAttributeType) (ret GatewayRequestGetLabelsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGatewayRequestGetLabelsAttributeType(arg *GatewayRequestGetLabelsAttributeType, val GatewayRequestGetLabelsRetType) { *arg = &val } /* types and functions for name */ // isNotNullableString type GatewayRequestGetNameAttributeType = *string func getGatewayRequestGetNameAttributeTypeOk(arg GatewayRequestGetNameAttributeType) (ret GatewayRequestGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGatewayRequestGetNameAttributeType(arg *GatewayRequestGetNameAttributeType, val GatewayRequestGetNameRetType) { *arg = &val } type GatewayRequestGetNameArgType = string type GatewayRequestGetNameRetType = string /* types and functions for planId */ // isNotNullableString type GatewayRequestGetPlanIdAttributeType = *string func getGatewayRequestGetPlanIdAttributeTypeOk(arg GatewayRequestGetPlanIdAttributeType) (ret GatewayRequestGetPlanIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGatewayRequestGetPlanIdAttributeType(arg *GatewayRequestGetPlanIdAttributeType, val GatewayRequestGetPlanIdRetType) { *arg = &val } type GatewayRequestGetPlanIdArgType = string type GatewayRequestGetPlanIdRetType = string // GatewayRequest struct for GatewayRequest type GatewayRequest struct { // REQUIRED AvailabilityZones GatewayRequestGetAvailabilityZonesAttributeType `json:"availabilityZones" required:"true"` // Enable BGP routing. (This will require a BGPGatewayConfig and also a BGPTunnelConfig for each Tunnel in each Connection) BgpEnabled GatewayRequestgetBgpEnabledAttributeType `json:"bgpEnabled,omitempty"` BgpGatewayConfig GatewayRequestGetBgpGatewayConfigAttributeType `json:"bgpGatewayConfig,omitempty"` // Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric. Labels GatewayRequestGetLabelsAttributeType `json:"labels,omitempty"` // The name of the VPN gateway. Maximum 20 characters (only alphanumeric and hyphens allowed). Not changeable after creation. // REQUIRED Name GatewayRequestGetNameAttributeType `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 GatewayRequestGetPlanIdAttributeType `json:"planId" required:"true"` } type _GatewayRequest GatewayRequest // NewGatewayRequest instantiates a new GatewayRequest 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 NewGatewayRequest(availabilityZones GatewayRequestGetAvailabilityZonesArgType, name GatewayRequestGetNameArgType, planId GatewayRequestGetPlanIdArgType) *GatewayRequest { this := GatewayRequest{} setGatewayRequestGetAvailabilityZonesAttributeType(&this.AvailabilityZones, availabilityZones) setGatewayRequestGetNameAttributeType(&this.Name, name) setGatewayRequestGetPlanIdAttributeType(&this.PlanId, planId) return &this } // NewGatewayRequestWithDefaults instantiates a new GatewayRequest 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 NewGatewayRequestWithDefaults() *GatewayRequest { this := GatewayRequest{} return &this } // GetAvailabilityZones returns the AvailabilityZones field value func (o *GatewayRequest) GetAvailabilityZones() (ret GatewayRequestGetAvailabilityZonesRetType) { 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 *GatewayRequest) GetAvailabilityZonesOk() (ret GatewayRequestGetAvailabilityZonesRetType, ok bool) { return getGatewayRequestGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones) } // SetAvailabilityZones sets field value func (o *GatewayRequest) SetAvailabilityZones(v GatewayRequestGetAvailabilityZonesRetType) { setGatewayRequestGetAvailabilityZonesAttributeType(&o.AvailabilityZones, v) } // GetBgpEnabled returns the BgpEnabled field value if set, zero value otherwise. func (o *GatewayRequest) GetBgpEnabled() (res GatewayRequestgetBgpEnabledRetType) { 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 *GatewayRequest) GetBgpEnabledOk() (ret GatewayRequestgetBgpEnabledRetType, ok bool) { return getGatewayRequestgetBgpEnabledAttributeTypeOk(o.BgpEnabled) } // HasBgpEnabled returns a boolean if a field has been set. func (o *GatewayRequest) HasBgpEnabled() bool { _, ok := o.GetBgpEnabledOk() return ok } // SetBgpEnabled gets a reference to the given bool and assigns it to the BgpEnabled field. func (o *GatewayRequest) SetBgpEnabled(v GatewayRequestgetBgpEnabledRetType) { setGatewayRequestgetBgpEnabledAttributeType(&o.BgpEnabled, v) } // GetBgpGatewayConfig returns the BgpGatewayConfig field value if set, zero value otherwise. func (o *GatewayRequest) GetBgpGatewayConfig() (res GatewayRequestGetBgpGatewayConfigRetType) { 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 *GatewayRequest) GetBgpGatewayConfigOk() (ret GatewayRequestGetBgpGatewayConfigRetType, ok bool) { return getGatewayRequestGetBgpGatewayConfigAttributeTypeOk(o.BgpGatewayConfig) } // HasBgpGatewayConfig returns a boolean if a field has been set. func (o *GatewayRequest) HasBgpGatewayConfig() bool { _, ok := o.GetBgpGatewayConfigOk() return ok } // SetBgpGatewayConfig gets a reference to the given BGPGatewayConfig and assigns it to the BgpGatewayConfig field. func (o *GatewayRequest) SetBgpGatewayConfig(v GatewayRequestGetBgpGatewayConfigRetType) { setGatewayRequestGetBgpGatewayConfigAttributeType(&o.BgpGatewayConfig, v) } // GetLabels returns the Labels field value if set, zero value otherwise. func (o *GatewayRequest) GetLabels() (res GatewayRequestGetLabelsRetType) { 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 *GatewayRequest) GetLabelsOk() (ret GatewayRequestGetLabelsRetType, ok bool) { return getGatewayRequestGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. func (o *GatewayRequest) 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 *GatewayRequest) SetLabels(v GatewayRequestGetLabelsRetType) { setGatewayRequestGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value func (o *GatewayRequest) GetName() (ret GatewayRequestGetNameRetType) { 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 *GatewayRequest) GetNameOk() (ret GatewayRequestGetNameRetType, ok bool) { return getGatewayRequestGetNameAttributeTypeOk(o.Name) } // SetName sets field value func (o *GatewayRequest) SetName(v GatewayRequestGetNameRetType) { setGatewayRequestGetNameAttributeType(&o.Name, v) } // GetPlanId returns the PlanId field value func (o *GatewayRequest) GetPlanId() (ret GatewayRequestGetPlanIdRetType) { 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 *GatewayRequest) GetPlanIdOk() (ret GatewayRequestGetPlanIdRetType, ok bool) { return getGatewayRequestGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value func (o *GatewayRequest) SetPlanId(v GatewayRequestGetPlanIdRetType) { setGatewayRequestGetPlanIdAttributeType(&o.PlanId, v) } func (o GatewayRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGatewayRequestGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones); ok { toSerialize["AvailabilityZones"] = val } if val, ok := getGatewayRequestgetBgpEnabledAttributeTypeOk(o.BgpEnabled); ok { toSerialize["BgpEnabled"] = val } if val, ok := getGatewayRequestGetBgpGatewayConfigAttributeTypeOk(o.BgpGatewayConfig); ok { toSerialize["BgpGatewayConfig"] = val } if val, ok := getGatewayRequestGetLabelsAttributeTypeOk(o.Labels); ok { toSerialize["Labels"] = val } if val, ok := getGatewayRequestGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getGatewayRequestGetPlanIdAttributeTypeOk(o.PlanId); ok { toSerialize["PlanId"] = val } return toSerialize, nil } type NullableGatewayRequest struct { value *GatewayRequest isSet bool } func (v NullableGatewayRequest) Get() *GatewayRequest { return v.value } func (v *NullableGatewayRequest) Set(val *GatewayRequest) { v.value = val v.isSet = true } func (v NullableGatewayRequest) IsSet() bool { return v.isSet } func (v *NullableGatewayRequest) Unset() { v.value = nil v.isSet = false } func NewNullableGatewayRequest(val *GatewayRequest) *NullableGatewayRequest { return &NullableGatewayRequest{value: val, isSet: true} } func (v NullableGatewayRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGatewayRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }