terraform-provider-stackitp.../pkg/albbeta/model_load_balancer.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

961 lines
35 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"
"fmt"
)
// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LoadBalancer{}
/*
types and functions for disableTargetSecurityGroupAssignment
*/
// isBoolean
type LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType = *bool
type LoadBalancergetDisableTargetSecurityGroupAssignmentArgType = bool
type LoadBalancergetDisableTargetSecurityGroupAssignmentRetType = bool
func getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType) (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(arg *LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType, val LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) {
*arg = &val
}
/*
types and functions for errors
*/
// isArray
type LoadBalancerGetErrorsAttributeType = *[]LoadBalancerError
type LoadBalancerGetErrorsArgType = []LoadBalancerError
type LoadBalancerGetErrorsRetType = []LoadBalancerError
func getLoadBalancerGetErrorsAttributeTypeOk(arg LoadBalancerGetErrorsAttributeType) (ret LoadBalancerGetErrorsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetErrorsAttributeType(arg *LoadBalancerGetErrorsAttributeType, val LoadBalancerGetErrorsRetType) {
*arg = &val
}
/*
types and functions for externalAddress
*/
// isNotNullableString
type LoadBalancerGetExternalAddressAttributeType = *string
func getLoadBalancerGetExternalAddressAttributeTypeOk(arg LoadBalancerGetExternalAddressAttributeType) (ret LoadBalancerGetExternalAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetExternalAddressAttributeType(arg *LoadBalancerGetExternalAddressAttributeType, val LoadBalancerGetExternalAddressRetType) {
*arg = &val
}
type LoadBalancerGetExternalAddressArgType = string
type LoadBalancerGetExternalAddressRetType = string
/*
types and functions for labels
*/
// isContainer
type LoadBalancerGetLabelsAttributeType = *map[string]string
type LoadBalancerGetLabelsArgType = map[string]string
type LoadBalancerGetLabelsRetType = map[string]string
func getLoadBalancerGetLabelsAttributeTypeOk(arg LoadBalancerGetLabelsAttributeType) (ret LoadBalancerGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetLabelsAttributeType(arg *LoadBalancerGetLabelsAttributeType, val LoadBalancerGetLabelsRetType) {
*arg = &val
}
/*
types and functions for listeners
*/
// isArray
type LoadBalancerGetListenersAttributeType = *[]Listener
type LoadBalancerGetListenersArgType = []Listener
type LoadBalancerGetListenersRetType = []Listener
func getLoadBalancerGetListenersAttributeTypeOk(arg LoadBalancerGetListenersAttributeType) (ret LoadBalancerGetListenersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetListenersAttributeType(arg *LoadBalancerGetListenersAttributeType, val LoadBalancerGetListenersRetType) {
*arg = &val
}
/*
types and functions for loadBalancerSecurityGroup
*/
// isModel
type LoadBalancerGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup
type LoadBalancerGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
type LoadBalancerGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
func getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(arg LoadBalancerGetLoadBalancerSecurityGroupAttributeType) (ret LoadBalancerGetLoadBalancerSecurityGroupRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(arg *LoadBalancerGetLoadBalancerSecurityGroupAttributeType, val LoadBalancerGetLoadBalancerSecurityGroupRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type LoadBalancerGetNameAttributeType = *string
func getLoadBalancerGetNameAttributeTypeOk(arg LoadBalancerGetNameAttributeType) (ret LoadBalancerGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetNameAttributeType(arg *LoadBalancerGetNameAttributeType, val LoadBalancerGetNameRetType) {
*arg = &val
}
type LoadBalancerGetNameArgType = string
type LoadBalancerGetNameRetType = string
/*
types and functions for networks
*/
// isArray
type LoadBalancerGetNetworksAttributeType = *[]Network
type LoadBalancerGetNetworksArgType = []Network
type LoadBalancerGetNetworksRetType = []Network
func getLoadBalancerGetNetworksAttributeTypeOk(arg LoadBalancerGetNetworksAttributeType) (ret LoadBalancerGetNetworksRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetNetworksAttributeType(arg *LoadBalancerGetNetworksAttributeType, val LoadBalancerGetNetworksRetType) {
*arg = &val
}
/*
types and functions for options
*/
// isModel
type LoadBalancerGetOptionsAttributeType = *LoadBalancerOptions
type LoadBalancerGetOptionsArgType = LoadBalancerOptions
type LoadBalancerGetOptionsRetType = LoadBalancerOptions
func getLoadBalancerGetOptionsAttributeTypeOk(arg LoadBalancerGetOptionsAttributeType) (ret LoadBalancerGetOptionsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetOptionsAttributeType(arg *LoadBalancerGetOptionsAttributeType, val LoadBalancerGetOptionsRetType) {
*arg = &val
}
/*
types and functions for planId
*/
// isNotNullableString
type LoadBalancerGetPlanIdAttributeType = *string
func getLoadBalancerGetPlanIdAttributeTypeOk(arg LoadBalancerGetPlanIdAttributeType) (ret LoadBalancerGetPlanIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetPlanIdAttributeType(arg *LoadBalancerGetPlanIdAttributeType, val LoadBalancerGetPlanIdRetType) {
*arg = &val
}
type LoadBalancerGetPlanIdArgType = string
type LoadBalancerGetPlanIdRetType = string
/*
types and functions for privateAddress
*/
// isNotNullableString
type LoadBalancerGetPrivateAddressAttributeType = *string
func getLoadBalancerGetPrivateAddressAttributeTypeOk(arg LoadBalancerGetPrivateAddressAttributeType) (ret LoadBalancerGetPrivateAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetPrivateAddressAttributeType(arg *LoadBalancerGetPrivateAddressAttributeType, val LoadBalancerGetPrivateAddressRetType) {
*arg = &val
}
type LoadBalancerGetPrivateAddressArgType = string
type LoadBalancerGetPrivateAddressRetType = string
/*
types and functions for region
*/
// isNotNullableString
type LoadBalancerGetRegionAttributeType = *string
func getLoadBalancerGetRegionAttributeTypeOk(arg LoadBalancerGetRegionAttributeType) (ret LoadBalancerGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetRegionAttributeType(arg *LoadBalancerGetRegionAttributeType, val LoadBalancerGetRegionRetType) {
*arg = &val
}
type LoadBalancerGetRegionArgType = string
type LoadBalancerGetRegionRetType = string
/*
types and functions for status
*/
// isEnum
// LoadBalancerStatus the model 'LoadBalancer'
// value type for enums
type LoadBalancerStatus string
// List of Status
const (
LOADBALANCERSTATUS_UNSPECIFIED LoadBalancerStatus = "STATUS_UNSPECIFIED"
LOADBALANCERSTATUS_PENDING LoadBalancerStatus = "STATUS_PENDING"
LOADBALANCERSTATUS_READY LoadBalancerStatus = "STATUS_READY"
LOADBALANCERSTATUS_ERROR LoadBalancerStatus = "STATUS_ERROR"
LOADBALANCERSTATUS_TERMINATING LoadBalancerStatus = "STATUS_TERMINATING"
)
// All allowed values of LoadBalancer enum
var AllowedLoadBalancerStatusEnumValues = []LoadBalancerStatus{
"STATUS_UNSPECIFIED",
"STATUS_PENDING",
"STATUS_READY",
"STATUS_ERROR",
"STATUS_TERMINATING",
}
func (v *LoadBalancerStatus) UnmarshalJSON(src []byte) error {
// use a type alias to prevent infinite recursion during unmarshal,
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
type TmpJson LoadBalancerStatus
var value TmpJson
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
// Allow unmarshalling zero value for testing purposes
var zeroValue TmpJson
if value == zeroValue {
return nil
}
enumTypeValue := LoadBalancerStatus(value)
for _, existing := range AllowedLoadBalancerStatusEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid LoadBalancer", value)
}
// NewLoadBalancerStatusFromValue returns a pointer to a valid LoadBalancerStatus
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewLoadBalancerStatusFromValue(v LoadBalancerStatus) (*LoadBalancerStatus, error) {
ev := LoadBalancerStatus(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for LoadBalancerStatus: valid values are %v", v, AllowedLoadBalancerStatusEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v LoadBalancerStatus) IsValid() bool {
for _, existing := range AllowedLoadBalancerStatusEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to StatusStatus value
func (v LoadBalancerStatus) Ptr() *LoadBalancerStatus {
return &v
}
type NullableLoadBalancerStatus struct {
value *LoadBalancerStatus
isSet bool
}
func (v NullableLoadBalancerStatus) Get() *LoadBalancerStatus {
return v.value
}
func (v *NullableLoadBalancerStatus) Set(val *LoadBalancerStatus) {
v.value = val
v.isSet = true
}
func (v NullableLoadBalancerStatus) IsSet() bool {
return v.isSet
}
func (v *NullableLoadBalancerStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadBalancerStatus(val *LoadBalancerStatus) *NullableLoadBalancerStatus {
return &NullableLoadBalancerStatus{value: val, isSet: true}
}
func (v NullableLoadBalancerStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadBalancerStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type LoadBalancerGetStatusAttributeType = *LoadBalancerStatus
type LoadBalancerGetStatusArgType = LoadBalancerStatus
type LoadBalancerGetStatusRetType = LoadBalancerStatus
func getLoadBalancerGetStatusAttributeTypeOk(arg LoadBalancerGetStatusAttributeType) (ret LoadBalancerGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetStatusAttributeType(arg *LoadBalancerGetStatusAttributeType, val LoadBalancerGetStatusRetType) {
*arg = &val
}
/*
types and functions for targetPools
*/
// isArray
type LoadBalancerGetTargetPoolsAttributeType = *[]TargetPool
type LoadBalancerGetTargetPoolsArgType = []TargetPool
type LoadBalancerGetTargetPoolsRetType = []TargetPool
func getLoadBalancerGetTargetPoolsAttributeTypeOk(arg LoadBalancerGetTargetPoolsAttributeType) (ret LoadBalancerGetTargetPoolsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetTargetPoolsAttributeType(arg *LoadBalancerGetTargetPoolsAttributeType, val LoadBalancerGetTargetPoolsRetType) {
*arg = &val
}
/*
types and functions for targetSecurityGroup
*/
// isModel
type LoadBalancerGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup
type LoadBalancerGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup
type LoadBalancerGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup
func getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(arg LoadBalancerGetTargetSecurityGroupAttributeType) (ret LoadBalancerGetTargetSecurityGroupRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetTargetSecurityGroupAttributeType(arg *LoadBalancerGetTargetSecurityGroupAttributeType, val LoadBalancerGetTargetSecurityGroupRetType) {
*arg = &val
}
/*
types and functions for version
*/
// isNotNullableString
type LoadBalancerGetVersionAttributeType = *string
func getLoadBalancerGetVersionAttributeTypeOk(arg LoadBalancerGetVersionAttributeType) (ret LoadBalancerGetVersionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerGetVersionAttributeType(arg *LoadBalancerGetVersionAttributeType, val LoadBalancerGetVersionRetType) {
*arg = &val
}
type LoadBalancerGetVersionArgType = string
type LoadBalancerGetVersionRetType = string
// LoadBalancer struct for LoadBalancer
type LoadBalancer struct {
// Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.
DisableTargetSecurityGroupAssignment LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"`
// Reports all errors a application load balancer has.
Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"`
// External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.
ExternalAddress LoadBalancerGetExternalAddressAttributeType `json:"externalAddress,omitempty"`
// Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between.
Labels LoadBalancerGetLabelsAttributeType `json:"labels,omitempty"`
// There is a maximum listener count of 20.
Listeners LoadBalancerGetListenersAttributeType `json:"listeners,omitempty"`
LoadBalancerSecurityGroup LoadBalancerGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"`
// Application Load Balancer name. Not changeable after creation.
Name LoadBalancerGetNameAttributeType `json:"name,omitempty"`
// List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation.
Networks LoadBalancerGetNetworksAttributeType `json:"networks,omitempty"`
Options LoadBalancerGetOptionsAttributeType `json:"options,omitempty"`
// Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum.
PlanId LoadBalancerGetPlanIdAttributeType `json:"planId,omitempty"`
// Transient private application load balancer IP address that can change any time.
PrivateAddress LoadBalancerGetPrivateAddressAttributeType `json:"privateAddress,omitempty"`
// Region of the LoadBalancer.
Region LoadBalancerGetRegionAttributeType `json:"region,omitempty"`
Status LoadBalancerGetStatusAttributeType `json:"status,omitempty"`
// List of all target pools which will be used in the application load balancer. Limited to 20.
TargetPools LoadBalancerGetTargetPoolsAttributeType `json:"targetPools,omitempty"`
TargetSecurityGroup LoadBalancerGetTargetSecurityGroupAttributeType `json:"targetSecurityGroup,omitempty"`
// Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.
Version LoadBalancerGetVersionAttributeType `json:"version,omitempty"`
}
// NewLoadBalancer instantiates a new LoadBalancer 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 NewLoadBalancer() *LoadBalancer {
this := LoadBalancer{}
return &this
}
// NewLoadBalancerWithDefaults instantiates a new LoadBalancer 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 NewLoadBalancerWithDefaults() *LoadBalancer {
this := LoadBalancer{}
return &this
}
// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise.
func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() (res LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) {
res, _ = o.GetDisableTargetSecurityGroupAssignmentOk()
return
}
// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignmentOk() (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
return getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment)
}
// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set.
func (o *LoadBalancer) HasDisableTargetSecurityGroupAssignment() bool {
_, ok := o.GetDisableTargetSecurityGroupAssignmentOk()
return ok
}
// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field.
func (o *LoadBalancer) SetDisableTargetSecurityGroupAssignment(v LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) {
setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v)
}
// GetErrors returns the Errors field value if set, zero value otherwise.
func (o *LoadBalancer) GetErrors() (res LoadBalancerGetErrorsRetType) {
res, _ = o.GetErrorsOk()
return
}
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetErrorsOk() (ret LoadBalancerGetErrorsRetType, ok bool) {
return getLoadBalancerGetErrorsAttributeTypeOk(o.Errors)
}
// HasErrors returns a boolean if a field has been set.
func (o *LoadBalancer) HasErrors() bool {
_, ok := o.GetErrorsOk()
return ok
}
// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field.
func (o *LoadBalancer) SetErrors(v LoadBalancerGetErrorsRetType) {
setLoadBalancerGetErrorsAttributeType(&o.Errors, v)
}
// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise.
func (o *LoadBalancer) GetExternalAddress() (res LoadBalancerGetExternalAddressRetType) {
res, _ = o.GetExternalAddressOk()
return
}
// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetExternalAddressOk() (ret LoadBalancerGetExternalAddressRetType, ok bool) {
return getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress)
}
// HasExternalAddress returns a boolean if a field has been set.
func (o *LoadBalancer) HasExternalAddress() bool {
_, ok := o.GetExternalAddressOk()
return ok
}
// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field.
func (o *LoadBalancer) SetExternalAddress(v LoadBalancerGetExternalAddressRetType) {
setLoadBalancerGetExternalAddressAttributeType(&o.ExternalAddress, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *LoadBalancer) GetLabels() (res LoadBalancerGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetLabelsOk() (ret LoadBalancerGetLabelsRetType, ok bool) {
return getLoadBalancerGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *LoadBalancer) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *LoadBalancer) SetLabels(v LoadBalancerGetLabelsRetType) {
setLoadBalancerGetLabelsAttributeType(&o.Labels, v)
}
// GetListeners returns the Listeners field value if set, zero value otherwise.
func (o *LoadBalancer) GetListeners() (res LoadBalancerGetListenersRetType) {
res, _ = o.GetListenersOk()
return
}
// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetListenersOk() (ret LoadBalancerGetListenersRetType, ok bool) {
return getLoadBalancerGetListenersAttributeTypeOk(o.Listeners)
}
// HasListeners returns a boolean if a field has been set.
func (o *LoadBalancer) HasListeners() bool {
_, ok := o.GetListenersOk()
return ok
}
// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field.
func (o *LoadBalancer) SetListeners(v LoadBalancerGetListenersRetType) {
setLoadBalancerGetListenersAttributeType(&o.Listeners, v)
}
// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise.
func (o *LoadBalancer) GetLoadBalancerSecurityGroup() (res LoadBalancerGetLoadBalancerSecurityGroupRetType) {
res, _ = o.GetLoadBalancerSecurityGroupOk()
return
}
// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetLoadBalancerSecurityGroupOk() (ret LoadBalancerGetLoadBalancerSecurityGroupRetType, ok bool) {
return getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup)
}
// HasLoadBalancerSecurityGroup returns a boolean if a field has been set.
func (o *LoadBalancer) HasLoadBalancerSecurityGroup() bool {
_, ok := o.GetLoadBalancerSecurityGroupOk()
return ok
}
// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field.
func (o *LoadBalancer) SetLoadBalancerSecurityGroup(v LoadBalancerGetLoadBalancerSecurityGroupRetType) {
setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *LoadBalancer) GetName() (res LoadBalancerGetNameRetType) {
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 *LoadBalancer) GetNameOk() (ret LoadBalancerGetNameRetType, ok bool) {
return getLoadBalancerGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *LoadBalancer) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *LoadBalancer) SetName(v LoadBalancerGetNameRetType) {
setLoadBalancerGetNameAttributeType(&o.Name, v)
}
// GetNetworks returns the Networks field value if set, zero value otherwise.
func (o *LoadBalancer) GetNetworks() (res LoadBalancerGetNetworksRetType) {
res, _ = o.GetNetworksOk()
return
}
// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetNetworksOk() (ret LoadBalancerGetNetworksRetType, ok bool) {
return getLoadBalancerGetNetworksAttributeTypeOk(o.Networks)
}
// HasNetworks returns a boolean if a field has been set.
func (o *LoadBalancer) HasNetworks() bool {
_, ok := o.GetNetworksOk()
return ok
}
// SetNetworks gets a reference to the given []Network and assigns it to the Networks field.
func (o *LoadBalancer) SetNetworks(v LoadBalancerGetNetworksRetType) {
setLoadBalancerGetNetworksAttributeType(&o.Networks, v)
}
// GetOptions returns the Options field value if set, zero value otherwise.
func (o *LoadBalancer) GetOptions() (res LoadBalancerGetOptionsRetType) {
res, _ = o.GetOptionsOk()
return
}
// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetOptionsOk() (ret LoadBalancerGetOptionsRetType, ok bool) {
return getLoadBalancerGetOptionsAttributeTypeOk(o.Options)
}
// HasOptions returns a boolean if a field has been set.
func (o *LoadBalancer) HasOptions() bool {
_, ok := o.GetOptionsOk()
return ok
}
// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field.
func (o *LoadBalancer) SetOptions(v LoadBalancerGetOptionsRetType) {
setLoadBalancerGetOptionsAttributeType(&o.Options, v)
}
// GetPlanId returns the PlanId field value if set, zero value otherwise.
func (o *LoadBalancer) GetPlanId() (res LoadBalancerGetPlanIdRetType) {
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 *LoadBalancer) GetPlanIdOk() (ret LoadBalancerGetPlanIdRetType, ok bool) {
return getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId)
}
// HasPlanId returns a boolean if a field has been set.
func (o *LoadBalancer) HasPlanId() bool {
_, ok := o.GetPlanIdOk()
return ok
}
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
func (o *LoadBalancer) SetPlanId(v LoadBalancerGetPlanIdRetType) {
setLoadBalancerGetPlanIdAttributeType(&o.PlanId, v)
}
// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise.
func (o *LoadBalancer) GetPrivateAddress() (res LoadBalancerGetPrivateAddressRetType) {
res, _ = o.GetPrivateAddressOk()
return
}
// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetPrivateAddressOk() (ret LoadBalancerGetPrivateAddressRetType, ok bool) {
return getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress)
}
// HasPrivateAddress returns a boolean if a field has been set.
func (o *LoadBalancer) HasPrivateAddress() bool {
_, ok := o.GetPrivateAddressOk()
return ok
}
// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field.
func (o *LoadBalancer) SetPrivateAddress(v LoadBalancerGetPrivateAddressRetType) {
setLoadBalancerGetPrivateAddressAttributeType(&o.PrivateAddress, v)
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *LoadBalancer) GetRegion() (res LoadBalancerGetRegionRetType) {
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 *LoadBalancer) GetRegionOk() (ret LoadBalancerGetRegionRetType, ok bool) {
return getLoadBalancerGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *LoadBalancer) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *LoadBalancer) SetRegion(v LoadBalancerGetRegionRetType) {
setLoadBalancerGetRegionAttributeType(&o.Region, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *LoadBalancer) GetStatus() (res LoadBalancerGetStatusRetType) {
res, _ = o.GetStatusOk()
return
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetStatusOk() (ret LoadBalancerGetStatusRetType, ok bool) {
return getLoadBalancerGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *LoadBalancer) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *LoadBalancer) SetStatus(v LoadBalancerGetStatusRetType) {
setLoadBalancerGetStatusAttributeType(&o.Status, v)
}
// GetTargetPools returns the TargetPools field value if set, zero value otherwise.
func (o *LoadBalancer) GetTargetPools() (res LoadBalancerGetTargetPoolsRetType) {
res, _ = o.GetTargetPoolsOk()
return
}
// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetTargetPoolsOk() (ret LoadBalancerGetTargetPoolsRetType, ok bool) {
return getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools)
}
// HasTargetPools returns a boolean if a field has been set.
func (o *LoadBalancer) HasTargetPools() bool {
_, ok := o.GetTargetPoolsOk()
return ok
}
// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field.
func (o *LoadBalancer) SetTargetPools(v LoadBalancerGetTargetPoolsRetType) {
setLoadBalancerGetTargetPoolsAttributeType(&o.TargetPools, v)
}
// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise.
func (o *LoadBalancer) GetTargetSecurityGroup() (res LoadBalancerGetTargetSecurityGroupRetType) {
res, _ = o.GetTargetSecurityGroupOk()
return
}
// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetTargetSecurityGroupOk() (ret LoadBalancerGetTargetSecurityGroupRetType, ok bool) {
return getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup)
}
// HasTargetSecurityGroup returns a boolean if a field has been set.
func (o *LoadBalancer) HasTargetSecurityGroup() bool {
_, ok := o.GetTargetSecurityGroupOk()
return ok
}
// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field.
func (o *LoadBalancer) SetTargetSecurityGroup(v LoadBalancerGetTargetSecurityGroupRetType) {
setLoadBalancerGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v)
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *LoadBalancer) GetVersion() (res LoadBalancerGetVersionRetType) {
res, _ = o.GetVersionOk()
return
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancer) GetVersionOk() (ret LoadBalancerGetVersionRetType, ok bool) {
return getLoadBalancerGetVersionAttributeTypeOk(o.Version)
}
// HasVersion returns a boolean if a field has been set.
func (o *LoadBalancer) HasVersion() bool {
_, ok := o.GetVersionOk()
return ok
}
// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *LoadBalancer) SetVersion(v LoadBalancerGetVersionRetType) {
setLoadBalancerGetVersionAttributeType(&o.Version, v)
}
func (o LoadBalancer) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok {
toSerialize["DisableTargetSecurityGroupAssignment"] = val
}
if val, ok := getLoadBalancerGetErrorsAttributeTypeOk(o.Errors); ok {
toSerialize["Errors"] = val
}
if val, ok := getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok {
toSerialize["ExternalAddress"] = val
}
if val, ok := getLoadBalancerGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getLoadBalancerGetListenersAttributeTypeOk(o.Listeners); ok {
toSerialize["Listeners"] = val
}
if val, ok := getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok {
toSerialize["LoadBalancerSecurityGroup"] = val
}
if val, ok := getLoadBalancerGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getLoadBalancerGetNetworksAttributeTypeOk(o.Networks); ok {
toSerialize["Networks"] = val
}
if val, ok := getLoadBalancerGetOptionsAttributeTypeOk(o.Options); ok {
toSerialize["Options"] = val
}
if val, ok := getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId); ok {
toSerialize["PlanId"] = val
}
if val, ok := getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok {
toSerialize["PrivateAddress"] = val
}
if val, ok := getLoadBalancerGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
if val, ok := getLoadBalancerGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools); ok {
toSerialize["TargetPools"] = val
}
if val, ok := getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok {
toSerialize["TargetSecurityGroup"] = val
}
if val, ok := getLoadBalancerGetVersionAttributeTypeOk(o.Version); ok {
toSerialize["Version"] = val
}
return toSerialize, nil
}
type NullableLoadBalancer struct {
value *LoadBalancer
isSet bool
}
func (v NullableLoadBalancer) Get() *LoadBalancer {
return v.value
}
func (v *NullableLoadBalancer) Set(val *LoadBalancer) {
v.value = val
v.isSet = true
}
func (v NullableLoadBalancer) IsSet() bool {
return v.isSet
}
func (v *NullableLoadBalancer) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer {
return &NullableLoadBalancer{value: val, isSet: true}
}
func (v NullableLoadBalancer) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadBalancer) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}