## 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>
320 lines
10 KiB
Go
320 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 TargetPool type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TargetPool{}
|
|
|
|
/*
|
|
types and functions for activeHealthCheck
|
|
*/
|
|
|
|
// isModel
|
|
type TargetPoolGetActiveHealthCheckAttributeType = *ActiveHealthCheck
|
|
type TargetPoolGetActiveHealthCheckArgType = ActiveHealthCheck
|
|
type TargetPoolGetActiveHealthCheckRetType = ActiveHealthCheck
|
|
|
|
func getTargetPoolGetActiveHealthCheckAttributeTypeOk(arg TargetPoolGetActiveHealthCheckAttributeType) (ret TargetPoolGetActiveHealthCheckRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTargetPoolGetActiveHealthCheckAttributeType(arg *TargetPoolGetActiveHealthCheckAttributeType, val TargetPoolGetActiveHealthCheckRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type TargetPoolGetNameAttributeType = *string
|
|
|
|
func getTargetPoolGetNameAttributeTypeOk(arg TargetPoolGetNameAttributeType) (ret TargetPoolGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTargetPoolGetNameAttributeType(arg *TargetPoolGetNameAttributeType, val TargetPoolGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type TargetPoolGetNameArgType = string
|
|
type TargetPoolGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for targetPort
|
|
*/
|
|
|
|
// isInteger
|
|
type TargetPoolGetTargetPortAttributeType = *int64
|
|
type TargetPoolGetTargetPortArgType = int64
|
|
type TargetPoolGetTargetPortRetType = int64
|
|
|
|
func getTargetPoolGetTargetPortAttributeTypeOk(arg TargetPoolGetTargetPortAttributeType) (ret TargetPoolGetTargetPortRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTargetPoolGetTargetPortAttributeType(arg *TargetPoolGetTargetPortAttributeType, val TargetPoolGetTargetPortRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for targets
|
|
*/
|
|
|
|
// isArray
|
|
type TargetPoolGetTargetsAttributeType = *[]Target
|
|
type TargetPoolGetTargetsArgType = []Target
|
|
type TargetPoolGetTargetsRetType = []Target
|
|
|
|
func getTargetPoolGetTargetsAttributeTypeOk(arg TargetPoolGetTargetsAttributeType) (ret TargetPoolGetTargetsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTargetPoolGetTargetsAttributeType(arg *TargetPoolGetTargetsAttributeType, val TargetPoolGetTargetsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for tlsConfig
|
|
*/
|
|
|
|
// isModel
|
|
type TargetPoolGetTlsConfigAttributeType = *TargetPoolTlsConfig
|
|
type TargetPoolGetTlsConfigArgType = TargetPoolTlsConfig
|
|
type TargetPoolGetTlsConfigRetType = TargetPoolTlsConfig
|
|
|
|
func getTargetPoolGetTlsConfigAttributeTypeOk(arg TargetPoolGetTlsConfigAttributeType) (ret TargetPoolGetTlsConfigRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTargetPoolGetTlsConfigAttributeType(arg *TargetPoolGetTlsConfigAttributeType, val TargetPoolGetTlsConfigRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// TargetPool struct for TargetPool
|
|
type TargetPool struct {
|
|
ActiveHealthCheck TargetPoolGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"`
|
|
// Target pool name
|
|
Name TargetPoolGetNameAttributeType `json:"name,omitempty"`
|
|
// The number identifying the port where each target listens for traffic.
|
|
// Can be cast to int32 without loss of precision.
|
|
TargetPort TargetPoolGetTargetPortAttributeType `json:"targetPort,omitempty"`
|
|
// List of all targets which will be used in the pool. Limited to 250.
|
|
Targets TargetPoolGetTargetsAttributeType `json:"targets,omitempty"`
|
|
TlsConfig TargetPoolGetTlsConfigAttributeType `json:"tlsConfig,omitempty"`
|
|
}
|
|
|
|
// NewTargetPool instantiates a new TargetPool 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 NewTargetPool() *TargetPool {
|
|
this := TargetPool{}
|
|
return &this
|
|
}
|
|
|
|
// NewTargetPoolWithDefaults instantiates a new TargetPool 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 NewTargetPoolWithDefaults() *TargetPool {
|
|
this := TargetPool{}
|
|
return &this
|
|
}
|
|
|
|
// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise.
|
|
func (o *TargetPool) GetActiveHealthCheck() (res TargetPoolGetActiveHealthCheckRetType) {
|
|
res, _ = o.GetActiveHealthCheckOk()
|
|
return
|
|
}
|
|
|
|
// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TargetPool) GetActiveHealthCheckOk() (ret TargetPoolGetActiveHealthCheckRetType, ok bool) {
|
|
return getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck)
|
|
}
|
|
|
|
// HasActiveHealthCheck returns a boolean if a field has been set.
|
|
func (o *TargetPool) HasActiveHealthCheck() bool {
|
|
_, ok := o.GetActiveHealthCheckOk()
|
|
return ok
|
|
}
|
|
|
|
// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field.
|
|
func (o *TargetPool) SetActiveHealthCheck(v TargetPoolGetActiveHealthCheckRetType) {
|
|
setTargetPoolGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *TargetPool) GetName() (res TargetPoolGetNameRetType) {
|
|
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 *TargetPool) GetNameOk() (ret TargetPoolGetNameRetType, ok bool) {
|
|
return getTargetPoolGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *TargetPool) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *TargetPool) SetName(v TargetPoolGetNameRetType) {
|
|
setTargetPoolGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetTargetPort returns the TargetPort field value if set, zero value otherwise.
|
|
func (o *TargetPool) GetTargetPort() (res TargetPoolGetTargetPortRetType) {
|
|
res, _ = o.GetTargetPortOk()
|
|
return
|
|
}
|
|
|
|
// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TargetPool) GetTargetPortOk() (ret TargetPoolGetTargetPortRetType, ok bool) {
|
|
return getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort)
|
|
}
|
|
|
|
// HasTargetPort returns a boolean if a field has been set.
|
|
func (o *TargetPool) HasTargetPort() bool {
|
|
_, ok := o.GetTargetPortOk()
|
|
return ok
|
|
}
|
|
|
|
// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field.
|
|
func (o *TargetPool) SetTargetPort(v TargetPoolGetTargetPortRetType) {
|
|
setTargetPoolGetTargetPortAttributeType(&o.TargetPort, v)
|
|
}
|
|
|
|
// GetTargets returns the Targets field value if set, zero value otherwise.
|
|
func (o *TargetPool) GetTargets() (res TargetPoolGetTargetsRetType) {
|
|
res, _ = o.GetTargetsOk()
|
|
return
|
|
}
|
|
|
|
// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TargetPool) GetTargetsOk() (ret TargetPoolGetTargetsRetType, ok bool) {
|
|
return getTargetPoolGetTargetsAttributeTypeOk(o.Targets)
|
|
}
|
|
|
|
// HasTargets returns a boolean if a field has been set.
|
|
func (o *TargetPool) HasTargets() bool {
|
|
_, ok := o.GetTargetsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetTargets gets a reference to the given []Target and assigns it to the Targets field.
|
|
func (o *TargetPool) SetTargets(v TargetPoolGetTargetsRetType) {
|
|
setTargetPoolGetTargetsAttributeType(&o.Targets, v)
|
|
}
|
|
|
|
// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise.
|
|
func (o *TargetPool) GetTlsConfig() (res TargetPoolGetTlsConfigRetType) {
|
|
res, _ = o.GetTlsConfigOk()
|
|
return
|
|
}
|
|
|
|
// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TargetPool) GetTlsConfigOk() (ret TargetPoolGetTlsConfigRetType, ok bool) {
|
|
return getTargetPoolGetTlsConfigAttributeTypeOk(o.TlsConfig)
|
|
}
|
|
|
|
// HasTlsConfig returns a boolean if a field has been set.
|
|
func (o *TargetPool) HasTlsConfig() bool {
|
|
_, ok := o.GetTlsConfigOk()
|
|
return ok
|
|
}
|
|
|
|
// SetTlsConfig gets a reference to the given TargetPoolTlsConfig and assigns it to the TlsConfig field.
|
|
func (o *TargetPool) SetTlsConfig(v TargetPoolGetTlsConfigRetType) {
|
|
setTargetPoolGetTlsConfigAttributeType(&o.TlsConfig, v)
|
|
}
|
|
|
|
func (o TargetPool) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok {
|
|
toSerialize["ActiveHealthCheck"] = val
|
|
}
|
|
if val, ok := getTargetPoolGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort); ok {
|
|
toSerialize["TargetPort"] = val
|
|
}
|
|
if val, ok := getTargetPoolGetTargetsAttributeTypeOk(o.Targets); ok {
|
|
toSerialize["Targets"] = val
|
|
}
|
|
if val, ok := getTargetPoolGetTlsConfigAttributeTypeOk(o.TlsConfig); ok {
|
|
toSerialize["TlsConfig"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableTargetPool struct {
|
|
value *TargetPool
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTargetPool) Get() *TargetPool {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTargetPool) Set(val *TargetPool) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTargetPool) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTargetPool) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTargetPool(val *TargetPool) *NullableTargetPool {
|
|
return &NullableTargetPool{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTargetPool) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTargetPool) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|