terraform-provider-stackitp.../pkg/vpnalpha/model_plan_list.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

223 lines
6.3 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 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)
}