## 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>
276 lines
7.3 KiB
Go
276 lines
7.3 KiB
Go
/*
|
|
STACKIT Edge Cloud API
|
|
|
|
This API provides endpoints for managing STACKIT Edge Cloud instances.
|
|
|
|
API version: 1beta1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package edgebeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the Plan type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Plan{}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanGetDescriptionAttributeType = *string
|
|
|
|
func getPlanGetDescriptionAttributeTypeOk(arg PlanGetDescriptionAttributeType) (ret PlanGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanGetDescriptionAttributeType(arg *PlanGetDescriptionAttributeType, val PlanGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanGetDescriptionArgType = string
|
|
type PlanGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanGetIdAttributeType = *string
|
|
|
|
func getPlanGetIdAttributeTypeOk(arg PlanGetIdAttributeType) (ret PlanGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanGetIdAttributeType(arg *PlanGetIdAttributeType, val PlanGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanGetIdArgType = string
|
|
type PlanGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for maxEdgeHosts
|
|
*/
|
|
|
|
// isInteger
|
|
type PlanGetMaxEdgeHostsAttributeType = *int64
|
|
type PlanGetMaxEdgeHostsArgType = int64
|
|
type PlanGetMaxEdgeHostsRetType = int64
|
|
|
|
func getPlanGetMaxEdgeHostsAttributeTypeOk(arg PlanGetMaxEdgeHostsAttributeType) (ret PlanGetMaxEdgeHostsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanGetMaxEdgeHostsAttributeType(arg *PlanGetMaxEdgeHostsAttributeType, val PlanGetMaxEdgeHostsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanGetNameAttributeType = *string
|
|
|
|
func getPlanGetNameAttributeTypeOk(arg PlanGetNameAttributeType) (ret PlanGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanGetNameAttributeType(arg *PlanGetNameAttributeType, val PlanGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanGetNameArgType = string
|
|
type PlanGetNameRetType = string
|
|
|
|
// Plan struct for Plan
|
|
type Plan struct {
|
|
// Description
|
|
Description PlanGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// Service Plan Identifier
|
|
Id PlanGetIdAttributeType `json:"id,omitempty"`
|
|
// Maximum number of EdgeHosts
|
|
// Can be cast to int32 without loss of precision.
|
|
MaxEdgeHosts PlanGetMaxEdgeHostsAttributeType `json:"maxEdgeHosts,omitempty"`
|
|
// Service Plan Name
|
|
Name PlanGetNameAttributeType `json:"name,omitempty"`
|
|
}
|
|
|
|
// NewPlan instantiates a new Plan 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 NewPlan() *Plan {
|
|
this := Plan{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlanWithDefaults instantiates a new Plan 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 NewPlanWithDefaults() *Plan {
|
|
this := Plan{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *Plan) GetDescription() (res PlanGetDescriptionRetType) {
|
|
res, _ = o.GetDescriptionOk()
|
|
return
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Plan) GetDescriptionOk() (ret PlanGetDescriptionRetType, ok bool) {
|
|
return getPlanGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *Plan) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *Plan) SetDescription(v PlanGetDescriptionRetType) {
|
|
setPlanGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *Plan) GetId() (res PlanGetIdRetType) {
|
|
res, _ = o.GetIdOk()
|
|
return
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Plan) GetIdOk() (ret PlanGetIdRetType, ok bool) {
|
|
return getPlanGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *Plan) HasId() bool {
|
|
_, ok := o.GetIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *Plan) SetId(v PlanGetIdRetType) {
|
|
setPlanGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetMaxEdgeHosts returns the MaxEdgeHosts field value if set, zero value otherwise.
|
|
func (o *Plan) GetMaxEdgeHosts() (res PlanGetMaxEdgeHostsRetType) {
|
|
res, _ = o.GetMaxEdgeHostsOk()
|
|
return
|
|
}
|
|
|
|
// GetMaxEdgeHostsOk returns a tuple with the MaxEdgeHosts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Plan) GetMaxEdgeHostsOk() (ret PlanGetMaxEdgeHostsRetType, ok bool) {
|
|
return getPlanGetMaxEdgeHostsAttributeTypeOk(o.MaxEdgeHosts)
|
|
}
|
|
|
|
// HasMaxEdgeHosts returns a boolean if a field has been set.
|
|
func (o *Plan) HasMaxEdgeHosts() bool {
|
|
_, ok := o.GetMaxEdgeHostsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetMaxEdgeHosts gets a reference to the given int64 and assigns it to the MaxEdgeHosts field.
|
|
func (o *Plan) SetMaxEdgeHosts(v PlanGetMaxEdgeHostsRetType) {
|
|
setPlanGetMaxEdgeHostsAttributeType(&o.MaxEdgeHosts, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *Plan) GetName() (res PlanGetNameRetType) {
|
|
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 *Plan) GetNameOk() (ret PlanGetNameRetType, ok bool) {
|
|
return getPlanGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *Plan) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *Plan) SetName(v PlanGetNameRetType) {
|
|
setPlanGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
func (o Plan) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPlanGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getPlanGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getPlanGetMaxEdgeHostsAttributeTypeOk(o.MaxEdgeHosts); ok {
|
|
toSerialize["MaxEdgeHosts"] = val
|
|
}
|
|
if val, ok := getPlanGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePlan struct {
|
|
value *Plan
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlan) Get() *Plan {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlan) Set(val *Plan) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlan) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlan) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlan(val *Plan) *NullablePlan {
|
|
return &NullablePlan{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlan) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlan) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|