## 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>
374 lines
12 KiB
Go
374 lines
12 KiB
Go
/*
|
|
STACKIT Application Load Balancer API
|
|
|
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
|
|
|
API version: 2beta2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package albbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the PlanDetails type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlanDetails{}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanDetailsGetDescriptionAttributeType = *string
|
|
|
|
func getPlanDetailsGetDescriptionAttributeTypeOk(arg PlanDetailsGetDescriptionAttributeType) (ret PlanDetailsGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanDetailsGetDescriptionAttributeType(arg *PlanDetailsGetDescriptionAttributeType, val PlanDetailsGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanDetailsGetDescriptionArgType = string
|
|
type PlanDetailsGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for flavorName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanDetailsGetFlavorNameAttributeType = *string
|
|
|
|
func getPlanDetailsGetFlavorNameAttributeTypeOk(arg PlanDetailsGetFlavorNameAttributeType) (ret PlanDetailsGetFlavorNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanDetailsGetFlavorNameAttributeType(arg *PlanDetailsGetFlavorNameAttributeType, val PlanDetailsGetFlavorNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanDetailsGetFlavorNameArgType = string
|
|
type PlanDetailsGetFlavorNameRetType = string
|
|
|
|
/*
|
|
types and functions for maxConnections
|
|
*/
|
|
|
|
// isInteger
|
|
type PlanDetailsGetMaxConnectionsAttributeType = *int64
|
|
type PlanDetailsGetMaxConnectionsArgType = int64
|
|
type PlanDetailsGetMaxConnectionsRetType = int64
|
|
|
|
func getPlanDetailsGetMaxConnectionsAttributeTypeOk(arg PlanDetailsGetMaxConnectionsAttributeType) (ret PlanDetailsGetMaxConnectionsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanDetailsGetMaxConnectionsAttributeType(arg *PlanDetailsGetMaxConnectionsAttributeType, val PlanDetailsGetMaxConnectionsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanDetailsGetNameAttributeType = *string
|
|
|
|
func getPlanDetailsGetNameAttributeTypeOk(arg PlanDetailsGetNameAttributeType) (ret PlanDetailsGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanDetailsGetNameAttributeType(arg *PlanDetailsGetNameAttributeType, val PlanDetailsGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanDetailsGetNameArgType = string
|
|
type PlanDetailsGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for planId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanDetailsGetPlanIdAttributeType = *string
|
|
|
|
func getPlanDetailsGetPlanIdAttributeTypeOk(arg PlanDetailsGetPlanIdAttributeType) (ret PlanDetailsGetPlanIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanDetailsGetPlanIdAttributeType(arg *PlanDetailsGetPlanIdAttributeType, val PlanDetailsGetPlanIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanDetailsGetPlanIdArgType = string
|
|
type PlanDetailsGetPlanIdRetType = string
|
|
|
|
/*
|
|
types and functions for region
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PlanDetailsGetRegionAttributeType = *string
|
|
|
|
func getPlanDetailsGetRegionAttributeTypeOk(arg PlanDetailsGetRegionAttributeType) (ret PlanDetailsGetRegionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPlanDetailsGetRegionAttributeType(arg *PlanDetailsGetRegionAttributeType, val PlanDetailsGetRegionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PlanDetailsGetRegionArgType = string
|
|
type PlanDetailsGetRegionRetType = string
|
|
|
|
// PlanDetails struct for PlanDetails
|
|
type PlanDetails struct {
|
|
// Description
|
|
Description PlanDetailsGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// Flavor Name
|
|
FlavorName PlanDetailsGetFlavorNameAttributeType `json:"flavorName,omitempty"`
|
|
// Maximum number of concurrent connections per application load balancer VM instance.
|
|
// Can be cast to int32 without loss of precision.
|
|
MaxConnections PlanDetailsGetMaxConnectionsAttributeType `json:"maxConnections,omitempty"`
|
|
// Service Plan Name
|
|
Name PlanDetailsGetNameAttributeType `json:"name,omitempty"`
|
|
// Service Plan Identifier
|
|
PlanId PlanDetailsGetPlanIdAttributeType `json:"planId,omitempty"`
|
|
// Region this Plan is available in
|
|
Region PlanDetailsGetRegionAttributeType `json:"region,omitempty"`
|
|
}
|
|
|
|
// NewPlanDetails instantiates a new PlanDetails 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 NewPlanDetails() *PlanDetails {
|
|
this := PlanDetails{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlanDetailsWithDefaults instantiates a new PlanDetails 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 NewPlanDetailsWithDefaults() *PlanDetails {
|
|
this := PlanDetails{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *PlanDetails) GetDescription() (res PlanDetailsGetDescriptionRetType) {
|
|
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 *PlanDetails) GetDescriptionOk() (ret PlanDetailsGetDescriptionRetType, ok bool) {
|
|
return getPlanDetailsGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *PlanDetails) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *PlanDetails) SetDescription(v PlanDetailsGetDescriptionRetType) {
|
|
setPlanDetailsGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetFlavorName returns the FlavorName field value if set, zero value otherwise.
|
|
func (o *PlanDetails) GetFlavorName() (res PlanDetailsGetFlavorNameRetType) {
|
|
res, _ = o.GetFlavorNameOk()
|
|
return
|
|
}
|
|
|
|
// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanDetails) GetFlavorNameOk() (ret PlanDetailsGetFlavorNameRetType, ok bool) {
|
|
return getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName)
|
|
}
|
|
|
|
// HasFlavorName returns a boolean if a field has been set.
|
|
func (o *PlanDetails) HasFlavorName() bool {
|
|
_, ok := o.GetFlavorNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field.
|
|
func (o *PlanDetails) SetFlavorName(v PlanDetailsGetFlavorNameRetType) {
|
|
setPlanDetailsGetFlavorNameAttributeType(&o.FlavorName, v)
|
|
}
|
|
|
|
// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise.
|
|
func (o *PlanDetails) GetMaxConnections() (res PlanDetailsGetMaxConnectionsRetType) {
|
|
res, _ = o.GetMaxConnectionsOk()
|
|
return
|
|
}
|
|
|
|
// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanDetails) GetMaxConnectionsOk() (ret PlanDetailsGetMaxConnectionsRetType, ok bool) {
|
|
return getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections)
|
|
}
|
|
|
|
// HasMaxConnections returns a boolean if a field has been set.
|
|
func (o *PlanDetails) HasMaxConnections() bool {
|
|
_, ok := o.GetMaxConnectionsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field.
|
|
func (o *PlanDetails) SetMaxConnections(v PlanDetailsGetMaxConnectionsRetType) {
|
|
setPlanDetailsGetMaxConnectionsAttributeType(&o.MaxConnections, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PlanDetails) GetName() (res PlanDetailsGetNameRetType) {
|
|
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 *PlanDetails) GetNameOk() (ret PlanDetailsGetNameRetType, ok bool) {
|
|
return getPlanDetailsGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *PlanDetails) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *PlanDetails) SetName(v PlanDetailsGetNameRetType) {
|
|
setPlanDetailsGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetPlanId returns the PlanId field value if set, zero value otherwise.
|
|
func (o *PlanDetails) GetPlanId() (res PlanDetailsGetPlanIdRetType) {
|
|
res, _ = o.GetPlanIdOk()
|
|
return
|
|
}
|
|
|
|
// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanDetails) GetPlanIdOk() (ret PlanDetailsGetPlanIdRetType, ok bool) {
|
|
return getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId)
|
|
}
|
|
|
|
// HasPlanId returns a boolean if a field has been set.
|
|
func (o *PlanDetails) HasPlanId() bool {
|
|
_, ok := o.GetPlanIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
|
|
func (o *PlanDetails) SetPlanId(v PlanDetailsGetPlanIdRetType) {
|
|
setPlanDetailsGetPlanIdAttributeType(&o.PlanId, v)
|
|
}
|
|
|
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
|
func (o *PlanDetails) GetRegion() (res PlanDetailsGetRegionRetType) {
|
|
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 *PlanDetails) GetRegionOk() (ret PlanDetailsGetRegionRetType, ok bool) {
|
|
return getPlanDetailsGetRegionAttributeTypeOk(o.Region)
|
|
}
|
|
|
|
// HasRegion returns a boolean if a field has been set.
|
|
func (o *PlanDetails) HasRegion() bool {
|
|
_, ok := o.GetRegionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
|
func (o *PlanDetails) SetRegion(v PlanDetailsGetRegionRetType) {
|
|
setPlanDetailsGetRegionAttributeType(&o.Region, v)
|
|
}
|
|
|
|
func (o PlanDetails) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPlanDetailsGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName); ok {
|
|
toSerialize["FlavorName"] = val
|
|
}
|
|
if val, ok := getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections); ok {
|
|
toSerialize["MaxConnections"] = val
|
|
}
|
|
if val, ok := getPlanDetailsGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId); ok {
|
|
toSerialize["PlanId"] = val
|
|
}
|
|
if val, ok := getPlanDetailsGetRegionAttributeTypeOk(o.Region); ok {
|
|
toSerialize["Region"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePlanDetails struct {
|
|
value *PlanDetails
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlanDetails) Get() *PlanDetails {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlanDetails) Set(val *PlanDetails) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlanDetails) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlanDetails) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails {
|
|
return &NullablePlanDetails{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlanDetails) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlanDetails) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|