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

227 lines
6.4 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 VPNTunnelPlan type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &VPNTunnelPlan{}
/*
types and functions for name
*/
// isNotNullableString
type VPNTunnelPlanGetNameAttributeType = *string
func getVPNTunnelPlanGetNameAttributeTypeOk(arg VPNTunnelPlanGetNameAttributeType) (ret VPNTunnelPlanGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVPNTunnelPlanGetNameAttributeType(arg *VPNTunnelPlanGetNameAttributeType, val VPNTunnelPlanGetNameRetType) {
*arg = &val
}
type VPNTunnelPlanGetNameArgType = string
type VPNTunnelPlanGetNameRetType = string
/*
types and functions for region
*/
// isNotNullableString
type VPNTunnelPlanGetRegionAttributeType = *string
func getVPNTunnelPlanGetRegionAttributeTypeOk(arg VPNTunnelPlanGetRegionAttributeType) (ret VPNTunnelPlanGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVPNTunnelPlanGetRegionAttributeType(arg *VPNTunnelPlanGetRegionAttributeType, val VPNTunnelPlanGetRegionRetType) {
*arg = &val
}
type VPNTunnelPlanGetRegionArgType = string
type VPNTunnelPlanGetRegionRetType = string
/*
types and functions for sku
*/
// isNotNullableString
type VPNTunnelPlanGetSkuAttributeType = *string
func getVPNTunnelPlanGetSkuAttributeTypeOk(arg VPNTunnelPlanGetSkuAttributeType) (ret VPNTunnelPlanGetSkuRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVPNTunnelPlanGetSkuAttributeType(arg *VPNTunnelPlanGetSkuAttributeType, val VPNTunnelPlanGetSkuRetType) {
*arg = &val
}
type VPNTunnelPlanGetSkuArgType = string
type VPNTunnelPlanGetSkuRetType = string
// VPNTunnelPlan struct for VPNTunnelPlan
type VPNTunnelPlan struct {
// Tunnel model name
Name VPNTunnelPlanGetNameAttributeType `json:"name,omitempty"`
// Tunnel model region
Region VPNTunnelPlanGetRegionAttributeType `json:"region,omitempty"`
// Tunnel model SKU
Sku VPNTunnelPlanGetSkuAttributeType `json:"sku,omitempty"`
}
// NewVPNTunnelPlan instantiates a new VPNTunnelPlan 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 NewVPNTunnelPlan() *VPNTunnelPlan {
this := VPNTunnelPlan{}
return &this
}
// NewVPNTunnelPlanWithDefaults instantiates a new VPNTunnelPlan 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 NewVPNTunnelPlanWithDefaults() *VPNTunnelPlan {
this := VPNTunnelPlan{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *VPNTunnelPlan) GetName() (res VPNTunnelPlanGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VPNTunnelPlan) GetNameOk() (ret VPNTunnelPlanGetNameRetType, ok bool) {
return getVPNTunnelPlanGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *VPNTunnelPlan) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *VPNTunnelPlan) SetName(v VPNTunnelPlanGetNameRetType) {
setVPNTunnelPlanGetNameAttributeType(&o.Name, v)
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *VPNTunnelPlan) GetRegion() (res VPNTunnelPlanGetRegionRetType) {
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 *VPNTunnelPlan) GetRegionOk() (ret VPNTunnelPlanGetRegionRetType, ok bool) {
return getVPNTunnelPlanGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *VPNTunnelPlan) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *VPNTunnelPlan) SetRegion(v VPNTunnelPlanGetRegionRetType) {
setVPNTunnelPlanGetRegionAttributeType(&o.Region, v)
}
// GetSku returns the Sku field value if set, zero value otherwise.
func (o *VPNTunnelPlan) GetSku() (res VPNTunnelPlanGetSkuRetType) {
res, _ = o.GetSkuOk()
return
}
// GetSkuOk returns a tuple with the Sku field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VPNTunnelPlan) GetSkuOk() (ret VPNTunnelPlanGetSkuRetType, ok bool) {
return getVPNTunnelPlanGetSkuAttributeTypeOk(o.Sku)
}
// HasSku returns a boolean if a field has been set.
func (o *VPNTunnelPlan) HasSku() bool {
_, ok := o.GetSkuOk()
return ok
}
// SetSku gets a reference to the given string and assigns it to the Sku field.
func (o *VPNTunnelPlan) SetSku(v VPNTunnelPlanGetSkuRetType) {
setVPNTunnelPlanGetSkuAttributeType(&o.Sku, v)
}
func (o VPNTunnelPlan) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getVPNTunnelPlanGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getVPNTunnelPlanGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
if val, ok := getVPNTunnelPlanGetSkuAttributeTypeOk(o.Sku); ok {
toSerialize["Sku"] = val
}
return toSerialize, nil
}
type NullableVPNTunnelPlan struct {
value *VPNTunnelPlan
isSet bool
}
func (v NullableVPNTunnelPlan) Get() *VPNTunnelPlan {
return v.value
}
func (v *NullableVPNTunnelPlan) Set(val *VPNTunnelPlan) {
v.value = val
v.isSet = true
}
func (v NullableVPNTunnelPlan) IsSet() bool {
return v.isSet
}
func (v *NullableVPNTunnelPlan) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVPNTunnelPlan(val *VPNTunnelPlan) *NullableVPNTunnelPlan {
return &NullableVPNTunnelPlan{value: val, isSet: true}
}
func (v NullableVPNTunnelPlan) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVPNTunnelPlan) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}