## 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>
269 lines
10 KiB
Go
269 lines
10 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 LoadBalancerOptions type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &LoadBalancerOptions{}
|
|
|
|
/*
|
|
types and functions for accessControl
|
|
*/
|
|
|
|
// isModel
|
|
type LoadBalancerOptionsGetAccessControlAttributeType = *LoadbalancerOptionAccessControl
|
|
type LoadBalancerOptionsGetAccessControlArgType = LoadbalancerOptionAccessControl
|
|
type LoadBalancerOptionsGetAccessControlRetType = LoadbalancerOptionAccessControl
|
|
|
|
func getLoadBalancerOptionsGetAccessControlAttributeTypeOk(arg LoadBalancerOptionsGetAccessControlAttributeType) (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLoadBalancerOptionsGetAccessControlAttributeType(arg *LoadBalancerOptionsGetAccessControlAttributeType, val LoadBalancerOptionsGetAccessControlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for ephemeralAddress
|
|
*/
|
|
|
|
// isBoolean
|
|
type LoadBalancerOptionsgetEphemeralAddressAttributeType = *bool
|
|
type LoadBalancerOptionsgetEphemeralAddressArgType = bool
|
|
type LoadBalancerOptionsgetEphemeralAddressRetType = bool
|
|
|
|
func getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(arg LoadBalancerOptionsgetEphemeralAddressAttributeType) (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLoadBalancerOptionsgetEphemeralAddressAttributeType(arg *LoadBalancerOptionsgetEphemeralAddressAttributeType, val LoadBalancerOptionsgetEphemeralAddressRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for observability
|
|
*/
|
|
|
|
// isModel
|
|
type LoadBalancerOptionsGetObservabilityAttributeType = *LoadbalancerOptionObservability
|
|
type LoadBalancerOptionsGetObservabilityArgType = LoadbalancerOptionObservability
|
|
type LoadBalancerOptionsGetObservabilityRetType = LoadbalancerOptionObservability
|
|
|
|
func getLoadBalancerOptionsGetObservabilityAttributeTypeOk(arg LoadBalancerOptionsGetObservabilityAttributeType) (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLoadBalancerOptionsGetObservabilityAttributeType(arg *LoadBalancerOptionsGetObservabilityAttributeType, val LoadBalancerOptionsGetObservabilityRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for privateNetworkOnly
|
|
*/
|
|
|
|
// isBoolean
|
|
type LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType = *bool
|
|
type LoadBalancerOptionsgetPrivateNetworkOnlyArgType = bool
|
|
type LoadBalancerOptionsgetPrivateNetworkOnlyRetType = bool
|
|
|
|
func getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(arg LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType) (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(arg *LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType, val LoadBalancerOptionsgetPrivateNetworkOnlyRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// LoadBalancerOptions Defines any optional functionality you want to have enabled on your application load balancer.
|
|
type LoadBalancerOptions struct {
|
|
AccessControl LoadBalancerOptionsGetAccessControlAttributeType `json:"accessControl,omitempty"`
|
|
EphemeralAddress LoadBalancerOptionsgetEphemeralAddressAttributeType `json:"ephemeralAddress,omitempty"`
|
|
Observability LoadBalancerOptionsGetObservabilityAttributeType `json:"observability,omitempty"`
|
|
// Application Load Balancer is accessible only via a private network ip address. Not changeable after creation.
|
|
PrivateNetworkOnly LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType `json:"privateNetworkOnly,omitempty"`
|
|
}
|
|
|
|
// NewLoadBalancerOptions instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptions() *LoadBalancerOptions {
|
|
this := LoadBalancerOptions{}
|
|
return &this
|
|
}
|
|
|
|
// NewLoadBalancerOptionsWithDefaults instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions {
|
|
this := LoadBalancerOptions{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccessControl returns the AccessControl field value if set, zero value otherwise.
|
|
func (o *LoadBalancerOptions) GetAccessControl() (res LoadBalancerOptionsGetAccessControlRetType) {
|
|
res, _ = o.GetAccessControlOk()
|
|
return
|
|
}
|
|
|
|
// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LoadBalancerOptions) GetAccessControlOk() (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) {
|
|
return getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl)
|
|
}
|
|
|
|
// HasAccessControl returns a boolean if a field has been set.
|
|
func (o *LoadBalancerOptions) HasAccessControl() bool {
|
|
_, ok := o.GetAccessControlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field.
|
|
func (o *LoadBalancerOptions) SetAccessControl(v LoadBalancerOptionsGetAccessControlRetType) {
|
|
setLoadBalancerOptionsGetAccessControlAttributeType(&o.AccessControl, v)
|
|
}
|
|
|
|
// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise.
|
|
func (o *LoadBalancerOptions) GetEphemeralAddress() (res LoadBalancerOptionsgetEphemeralAddressRetType) {
|
|
res, _ = o.GetEphemeralAddressOk()
|
|
return
|
|
}
|
|
|
|
// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LoadBalancerOptions) GetEphemeralAddressOk() (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) {
|
|
return getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress)
|
|
}
|
|
|
|
// HasEphemeralAddress returns a boolean if a field has been set.
|
|
func (o *LoadBalancerOptions) HasEphemeralAddress() bool {
|
|
_, ok := o.GetEphemeralAddressOk()
|
|
return ok
|
|
}
|
|
|
|
// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field.
|
|
func (o *LoadBalancerOptions) SetEphemeralAddress(v LoadBalancerOptionsgetEphemeralAddressRetType) {
|
|
setLoadBalancerOptionsgetEphemeralAddressAttributeType(&o.EphemeralAddress, v)
|
|
}
|
|
|
|
// GetObservability returns the Observability field value if set, zero value otherwise.
|
|
func (o *LoadBalancerOptions) GetObservability() (res LoadBalancerOptionsGetObservabilityRetType) {
|
|
res, _ = o.GetObservabilityOk()
|
|
return
|
|
}
|
|
|
|
// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LoadBalancerOptions) GetObservabilityOk() (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) {
|
|
return getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability)
|
|
}
|
|
|
|
// HasObservability returns a boolean if a field has been set.
|
|
func (o *LoadBalancerOptions) HasObservability() bool {
|
|
_, ok := o.GetObservabilityOk()
|
|
return ok
|
|
}
|
|
|
|
// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field.
|
|
func (o *LoadBalancerOptions) SetObservability(v LoadBalancerOptionsGetObservabilityRetType) {
|
|
setLoadBalancerOptionsGetObservabilityAttributeType(&o.Observability, v)
|
|
}
|
|
|
|
// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise.
|
|
func (o *LoadBalancerOptions) GetPrivateNetworkOnly() (res LoadBalancerOptionsgetPrivateNetworkOnlyRetType) {
|
|
res, _ = o.GetPrivateNetworkOnlyOk()
|
|
return
|
|
}
|
|
|
|
// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) {
|
|
return getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly)
|
|
}
|
|
|
|
// HasPrivateNetworkOnly returns a boolean if a field has been set.
|
|
func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool {
|
|
_, ok := o.GetPrivateNetworkOnlyOk()
|
|
return ok
|
|
}
|
|
|
|
// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field.
|
|
func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v LoadBalancerOptionsgetPrivateNetworkOnlyRetType) {
|
|
setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(&o.PrivateNetworkOnly, v)
|
|
}
|
|
|
|
func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl); ok {
|
|
toSerialize["AccessControl"] = val
|
|
}
|
|
if val, ok := getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress); ok {
|
|
toSerialize["EphemeralAddress"] = val
|
|
}
|
|
if val, ok := getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability); ok {
|
|
toSerialize["Observability"] = val
|
|
}
|
|
if val, ok := getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly); ok {
|
|
toSerialize["PrivateNetworkOnly"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableLoadBalancerOptions struct {
|
|
value *LoadBalancerOptions
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLoadBalancerOptions) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLoadBalancerOptions) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions {
|
|
return &NullableLoadBalancerOptions{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLoadBalancerOptions) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|