feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
223
pkg/vpnalpha/model_plan_list.go
Normal file
223
pkg/vpnalpha/model_plan_list.go
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
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 PlanList type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &PlanList{}
|
||||
|
||||
/*
|
||||
types and functions for defaultPlanId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type PlanListGetDefaultPlanIdAttributeType = *string
|
||||
|
||||
func getPlanListGetDefaultPlanIdAttributeTypeOk(arg PlanListGetDefaultPlanIdAttributeType) (ret PlanListGetDefaultPlanIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPlanListGetDefaultPlanIdAttributeType(arg *PlanListGetDefaultPlanIdAttributeType, val PlanListGetDefaultPlanIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type PlanListGetDefaultPlanIdArgType = string
|
||||
type PlanListGetDefaultPlanIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for plans
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type PlanListGetPlansAttributeType = *[]Plan
|
||||
type PlanListGetPlansArgType = []Plan
|
||||
type PlanListGetPlansRetType = []Plan
|
||||
|
||||
func getPlanListGetPlansAttributeTypeOk(arg PlanListGetPlansAttributeType) (ret PlanListGetPlansRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPlanListGetPlansAttributeType(arg *PlanListGetPlansAttributeType, val PlanListGetPlansRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for tunnel
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type PlanListGetTunnelAttributeType = *VPNTunnelPlan
|
||||
type PlanListGetTunnelArgType = VPNTunnelPlan
|
||||
type PlanListGetTunnelRetType = VPNTunnelPlan
|
||||
|
||||
func getPlanListGetTunnelAttributeTypeOk(arg PlanListGetTunnelAttributeType) (ret PlanListGetTunnelRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPlanListGetTunnelAttributeType(arg *PlanListGetTunnelAttributeType, val PlanListGetTunnelRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// PlanList struct for PlanList
|
||||
type PlanList struct {
|
||||
// Default Plan ID for the current region
|
||||
DefaultPlanId PlanListGetDefaultPlanIdAttributeType `json:"defaultPlanId,omitempty"`
|
||||
Plans PlanListGetPlansAttributeType `json:"plans,omitempty"`
|
||||
Tunnel PlanListGetTunnelAttributeType `json:"tunnel,omitempty"`
|
||||
}
|
||||
|
||||
// NewPlanList instantiates a new PlanList 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 NewPlanList() *PlanList {
|
||||
this := PlanList{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewPlanListWithDefaults instantiates a new PlanList 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 NewPlanListWithDefaults() *PlanList {
|
||||
this := PlanList{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDefaultPlanId returns the DefaultPlanId field value if set, zero value otherwise.
|
||||
func (o *PlanList) GetDefaultPlanId() (res PlanListGetDefaultPlanIdRetType) {
|
||||
res, _ = o.GetDefaultPlanIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDefaultPlanIdOk returns a tuple with the DefaultPlanId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PlanList) GetDefaultPlanIdOk() (ret PlanListGetDefaultPlanIdRetType, ok bool) {
|
||||
return getPlanListGetDefaultPlanIdAttributeTypeOk(o.DefaultPlanId)
|
||||
}
|
||||
|
||||
// HasDefaultPlanId returns a boolean if a field has been set.
|
||||
func (o *PlanList) HasDefaultPlanId() bool {
|
||||
_, ok := o.GetDefaultPlanIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDefaultPlanId gets a reference to the given string and assigns it to the DefaultPlanId field.
|
||||
func (o *PlanList) SetDefaultPlanId(v PlanListGetDefaultPlanIdRetType) {
|
||||
setPlanListGetDefaultPlanIdAttributeType(&o.DefaultPlanId, v)
|
||||
}
|
||||
|
||||
// GetPlans returns the Plans field value if set, zero value otherwise.
|
||||
func (o *PlanList) GetPlans() (res PlanListGetPlansRetType) {
|
||||
res, _ = o.GetPlansOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetPlansOk returns a tuple with the Plans field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PlanList) GetPlansOk() (ret PlanListGetPlansRetType, ok bool) {
|
||||
return getPlanListGetPlansAttributeTypeOk(o.Plans)
|
||||
}
|
||||
|
||||
// HasPlans returns a boolean if a field has been set.
|
||||
func (o *PlanList) HasPlans() bool {
|
||||
_, ok := o.GetPlansOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPlans gets a reference to the given []Plan and assigns it to the Plans field.
|
||||
func (o *PlanList) SetPlans(v PlanListGetPlansRetType) {
|
||||
setPlanListGetPlansAttributeType(&o.Plans, v)
|
||||
}
|
||||
|
||||
// GetTunnel returns the Tunnel field value if set, zero value otherwise.
|
||||
func (o *PlanList) GetTunnel() (res PlanListGetTunnelRetType) {
|
||||
res, _ = o.GetTunnelOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetTunnelOk returns a tuple with the Tunnel field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PlanList) GetTunnelOk() (ret PlanListGetTunnelRetType, ok bool) {
|
||||
return getPlanListGetTunnelAttributeTypeOk(o.Tunnel)
|
||||
}
|
||||
|
||||
// HasTunnel returns a boolean if a field has been set.
|
||||
func (o *PlanList) HasTunnel() bool {
|
||||
_, ok := o.GetTunnelOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetTunnel gets a reference to the given VPNTunnelPlan and assigns it to the Tunnel field.
|
||||
func (o *PlanList) SetTunnel(v PlanListGetTunnelRetType) {
|
||||
setPlanListGetTunnelAttributeType(&o.Tunnel, v)
|
||||
}
|
||||
|
||||
func (o PlanList) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getPlanListGetDefaultPlanIdAttributeTypeOk(o.DefaultPlanId); ok {
|
||||
toSerialize["DefaultPlanId"] = val
|
||||
}
|
||||
if val, ok := getPlanListGetPlansAttributeTypeOk(o.Plans); ok {
|
||||
toSerialize["Plans"] = val
|
||||
}
|
||||
if val, ok := getPlanListGetTunnelAttributeTypeOk(o.Tunnel); ok {
|
||||
toSerialize["Tunnel"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullablePlanList struct {
|
||||
value *PlanList
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullablePlanList) Get() *PlanList {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullablePlanList) Set(val *PlanList) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullablePlanList) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullablePlanList) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullablePlanList(val *PlanList) *NullablePlanList {
|
||||
return &NullablePlanList{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullablePlanList) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullablePlanList) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue