terraform-provider-stackitp.../pkg/albbeta/model_update_load_balancer_payload.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
40 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 UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateLoadBalancerPayload{}
/*
types and functions for disableTargetSecurityGroupAssignment
*/
// isBoolean
type UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType = *bool
type UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentArgType = bool
type UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType = bool
func getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType) (ret UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(arg *UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType, val UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) {
*arg = &val
}
/*
types and functions for errors
*/
// isArray
type UpdateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError
type UpdateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError
type UpdateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError
func getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetErrorsAttributeType) (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetErrorsAttributeType(arg *UpdateLoadBalancerPayloadGetErrorsAttributeType, val UpdateLoadBalancerPayloadGetErrorsRetType) {
*arg = &val
}
/*
types and functions for externalAddress
*/
// isNotNullableString
type UpdateLoadBalancerPayloadGetExternalAddressAttributeType = *string
func getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetExternalAddressAttributeType) (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(arg *UpdateLoadBalancerPayloadGetExternalAddressAttributeType, val UpdateLoadBalancerPayloadGetExternalAddressRetType) {
*arg = &val
}
type UpdateLoadBalancerPayloadGetExternalAddressArgType = string
type UpdateLoadBalancerPayloadGetExternalAddressRetType = string
/*
types and functions for labels
*/
// isContainer
type UpdateLoadBalancerPayloadGetLabelsAttributeType = *map[string]string
type UpdateLoadBalancerPayloadGetLabelsArgType = map[string]string
type UpdateLoadBalancerPayloadGetLabelsRetType = map[string]string
func getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetLabelsAttributeType) (ret UpdateLoadBalancerPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetLabelsAttributeType(arg *UpdateLoadBalancerPayloadGetLabelsAttributeType, val UpdateLoadBalancerPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for listeners
*/
// isArray
type UpdateLoadBalancerPayloadGetListenersAttributeType = *[]Listener
type UpdateLoadBalancerPayloadGetListenersArgType = []Listener
type UpdateLoadBalancerPayloadGetListenersRetType = []Listener
func getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(arg UpdateLoadBalancerPayloadGetListenersAttributeType) (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetListenersAttributeType(arg *UpdateLoadBalancerPayloadGetListenersAttributeType, val UpdateLoadBalancerPayloadGetListenersRetType) {
*arg = &val
}
/*
types and functions for loadBalancerSecurityGroup
*/
// isModel
type UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup
type UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
type UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
func getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType) (ret UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg *UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType, val UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type UpdateLoadBalancerPayloadGetNameAttributeType = *string
func getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNameAttributeType) (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetNameAttributeType(arg *UpdateLoadBalancerPayloadGetNameAttributeType, val UpdateLoadBalancerPayloadGetNameRetType) {
*arg = &val
}
type UpdateLoadBalancerPayloadGetNameArgType = string
type UpdateLoadBalancerPayloadGetNameRetType = string
/*
types and functions for networks
*/
// isArray
type UpdateLoadBalancerPayloadGetNetworksAttributeType = *[]Network
type UpdateLoadBalancerPayloadGetNetworksArgType = []Network
type UpdateLoadBalancerPayloadGetNetworksRetType = []Network
func getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNetworksAttributeType) (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetNetworksAttributeType(arg *UpdateLoadBalancerPayloadGetNetworksAttributeType, val UpdateLoadBalancerPayloadGetNetworksRetType) {
*arg = &val
}
/*
types and functions for options
*/
// isModel
type UpdateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions
type UpdateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions
type UpdateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions
func getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetOptionsAttributeType) (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetOptionsAttributeType(arg *UpdateLoadBalancerPayloadGetOptionsAttributeType, val UpdateLoadBalancerPayloadGetOptionsRetType) {
*arg = &val
}
/*
types and functions for planId
*/
// isNotNullableString
type UpdateLoadBalancerPayloadGetPlanIdAttributeType = *string
func getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPlanIdAttributeType) (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetPlanIdAttributeType(arg *UpdateLoadBalancerPayloadGetPlanIdAttributeType, val UpdateLoadBalancerPayloadGetPlanIdRetType) {
*arg = &val
}
type UpdateLoadBalancerPayloadGetPlanIdArgType = string
type UpdateLoadBalancerPayloadGetPlanIdRetType = string
/*
types and functions for privateAddress
*/
// isNotNullableString
type UpdateLoadBalancerPayloadGetPrivateAddressAttributeType = *string
func getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *UpdateLoadBalancerPayloadGetPrivateAddressAttributeType, val UpdateLoadBalancerPayloadGetPrivateAddressRetType) {
*arg = &val
}
type UpdateLoadBalancerPayloadGetPrivateAddressArgType = string
type UpdateLoadBalancerPayloadGetPrivateAddressRetType = string
/*
types and functions for region
*/
// isNotNullableString
type UpdateLoadBalancerPayloadGetRegionAttributeType = *string
func getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(arg UpdateLoadBalancerPayloadGetRegionAttributeType) (ret UpdateLoadBalancerPayloadGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetRegionAttributeType(arg *UpdateLoadBalancerPayloadGetRegionAttributeType, val UpdateLoadBalancerPayloadGetRegionRetType) {
*arg = &val
}
type UpdateLoadBalancerPayloadGetRegionArgType = string
type UpdateLoadBalancerPayloadGetRegionRetType = string
/*
types and functions for status
*/
// isEnum
// UpdateLoadBalancerPayloadStatus the model 'UpdateLoadBalancerPayload'
// value type for enums
type UpdateLoadBalancerPayloadStatus string
// List of Status
const (
UPDATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED UpdateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED"
UPDATELOADBALANCERPAYLOADSTATUS_PENDING UpdateLoadBalancerPayloadStatus = "STATUS_PENDING"
UPDATELOADBALANCERPAYLOADSTATUS_READY UpdateLoadBalancerPayloadStatus = "STATUS_READY"
UPDATELOADBALANCERPAYLOADSTATUS_ERROR UpdateLoadBalancerPayloadStatus = "STATUS_ERROR"
UPDATELOADBALANCERPAYLOADSTATUS_TERMINATING UpdateLoadBalancerPayloadStatus = "STATUS_TERMINATING"
)
// All allowed values of UpdateLoadBalancerPayload enum
var AllowedUpdateLoadBalancerPayloadStatusEnumValues = []UpdateLoadBalancerPayloadStatus{
"STATUS_UNSPECIFIED",
"STATUS_PENDING",
"STATUS_READY",
"STATUS_ERROR",
"STATUS_TERMINATING",
}
func (v *UpdateLoadBalancerPayloadStatus) 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 UpdateLoadBalancerPayloadStatus
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 := UpdateLoadBalancerPayloadStatus(value)
for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid UpdateLoadBalancerPayload", value)
}
// NewUpdateLoadBalancerPayloadStatusFromValue returns a pointer to a valid UpdateLoadBalancerPayloadStatus
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewUpdateLoadBalancerPayloadStatusFromValue(v UpdateLoadBalancerPayloadStatus) (*UpdateLoadBalancerPayloadStatus, error) {
ev := UpdateLoadBalancerPayloadStatus(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for UpdateLoadBalancerPayloadStatus: valid values are %v", v, AllowedUpdateLoadBalancerPayloadStatusEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v UpdateLoadBalancerPayloadStatus) IsValid() bool {
for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to StatusStatus value
func (v UpdateLoadBalancerPayloadStatus) Ptr() *UpdateLoadBalancerPayloadStatus {
return &v
}
type NullableUpdateLoadBalancerPayloadStatus struct {
value *UpdateLoadBalancerPayloadStatus
isSet bool
}
func (v NullableUpdateLoadBalancerPayloadStatus) Get() *UpdateLoadBalancerPayloadStatus {
return v.value
}
func (v *NullableUpdateLoadBalancerPayloadStatus) Set(val *UpdateLoadBalancerPayloadStatus) {
v.value = val
v.isSet = true
}
func (v NullableUpdateLoadBalancerPayloadStatus) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateLoadBalancerPayloadStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateLoadBalancerPayloadStatus(val *UpdateLoadBalancerPayloadStatus) *NullableUpdateLoadBalancerPayloadStatus {
return &NullableUpdateLoadBalancerPayloadStatus{value: val, isSet: true}
}
func (v NullableUpdateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type UpdateLoadBalancerPayloadGetStatusAttributeType = *UpdateLoadBalancerPayloadStatus
type UpdateLoadBalancerPayloadGetStatusArgType = UpdateLoadBalancerPayloadStatus
type UpdateLoadBalancerPayloadGetStatusRetType = UpdateLoadBalancerPayloadStatus
func getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(arg UpdateLoadBalancerPayloadGetStatusAttributeType) (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetStatusAttributeType(arg *UpdateLoadBalancerPayloadGetStatusAttributeType, val UpdateLoadBalancerPayloadGetStatusRetType) {
*arg = &val
}
/*
types and functions for targetPools
*/
// isArray
type UpdateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool
type UpdateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool
type UpdateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool
func getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *UpdateLoadBalancerPayloadGetTargetPoolsAttributeType, val UpdateLoadBalancerPayloadGetTargetPoolsRetType) {
*arg = &val
}
/*
types and functions for targetSecurityGroup
*/
// isModel
type UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup
type UpdateLoadBalancerPayloadGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup
type UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup
func getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType) (ret UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType, val UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType) {
*arg = &val
}
/*
types and functions for version
*/
// isNotNullableString
type UpdateLoadBalancerPayloadGetVersionAttributeType = *string
func getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(arg UpdateLoadBalancerPayloadGetVersionAttributeType) (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateLoadBalancerPayloadGetVersionAttributeType(arg *UpdateLoadBalancerPayloadGetVersionAttributeType, val UpdateLoadBalancerPayloadGetVersionRetType) {
*arg = &val
}
type UpdateLoadBalancerPayloadGetVersionArgType = string
type UpdateLoadBalancerPayloadGetVersionRetType = string
// UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload
type UpdateLoadBalancerPayload 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 UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"`
// Reports all errors a application load balancer has.
Errors UpdateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"`
// External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.
ExternalAddress UpdateLoadBalancerPayloadGetExternalAddressAttributeType `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 UpdateLoadBalancerPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// There is a maximum listener count of 20.
Listeners UpdateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"`
LoadBalancerSecurityGroup UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"`
// Application Load Balancer name. Not changeable after creation.
Name UpdateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"`
// List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation.
Networks UpdateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"`
Options UpdateLoadBalancerPayloadGetOptionsAttributeType `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 UpdateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"`
// Transient private application load balancer IP address that can change any time.
PrivateAddress UpdateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"`
// Region of the LoadBalancer.
Region UpdateLoadBalancerPayloadGetRegionAttributeType `json:"region,omitempty"`
Status UpdateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"`
// List of all target pools which will be used in the application load balancer. Limited to 20.
TargetPools UpdateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"`
TargetSecurityGroup UpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType `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 UpdateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"`
}
// NewUpdateLoadBalancerPayload instantiates a new UpdateLoadBalancerPayload 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 NewUpdateLoadBalancerPayload() *UpdateLoadBalancerPayload {
this := UpdateLoadBalancerPayload{}
return &this
}
// NewUpdateLoadBalancerPayloadWithDefaults instantiates a new UpdateLoadBalancerPayload 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 NewUpdateLoadBalancerPayloadWithDefaults() *UpdateLoadBalancerPayload {
this := UpdateLoadBalancerPayload{}
return &this
}
// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (res UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) {
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 *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (ret UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
return getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment)
}
// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool {
_, ok := o.GetDisableTargetSecurityGroupAssignmentOk()
return ok
}
// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field.
func (o *UpdateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v UpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) {
setUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v)
}
// GetErrors returns the Errors field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetErrors() (res UpdateLoadBalancerPayloadGetErrorsRetType) {
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 *UpdateLoadBalancerPayload) GetErrorsOk() (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors)
}
// HasErrors returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasErrors() bool {
_, ok := o.GetErrorsOk()
return ok
}
// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field.
func (o *UpdateLoadBalancerPayload) SetErrors(v UpdateLoadBalancerPayloadGetErrorsRetType) {
setUpdateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v)
}
// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetExternalAddress() (res UpdateLoadBalancerPayloadGetExternalAddressRetType) {
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 *UpdateLoadBalancerPayload) GetExternalAddressOk() (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress)
}
// HasExternalAddress returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool {
_, ok := o.GetExternalAddressOk()
return ok
}
// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field.
func (o *UpdateLoadBalancerPayload) SetExternalAddress(v UpdateLoadBalancerPayloadGetExternalAddressRetType) {
setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetLabels() (res UpdateLoadBalancerPayloadGetLabelsRetType) {
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 *UpdateLoadBalancerPayload) GetLabelsOk() (ret UpdateLoadBalancerPayloadGetLabelsRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) SetLabels(v UpdateLoadBalancerPayloadGetLabelsRetType) {
setUpdateLoadBalancerPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetListeners returns the Listeners field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetListeners() (res UpdateLoadBalancerPayloadGetListenersRetType) {
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 *UpdateLoadBalancerPayload) GetListenersOk() (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners)
}
// HasListeners returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasListeners() bool {
_, ok := o.GetListenersOk()
return ok
}
// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field.
func (o *UpdateLoadBalancerPayload) SetListeners(v UpdateLoadBalancerPayloadGetListenersRetType) {
setUpdateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v)
}
// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) {
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 *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (ret UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup)
}
// HasLoadBalancerSecurityGroup returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool {
_, ok := o.GetLoadBalancerSecurityGroupOk()
return ok
}
// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field.
func (o *UpdateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) {
setUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetName() (res UpdateLoadBalancerPayloadGetNameRetType) {
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 *UpdateLoadBalancerPayload) GetNameOk() (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateLoadBalancerPayload) SetName(v UpdateLoadBalancerPayloadGetNameRetType) {
setUpdateLoadBalancerPayloadGetNameAttributeType(&o.Name, v)
}
// GetNetworks returns the Networks field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetNetworks() (res UpdateLoadBalancerPayloadGetNetworksRetType) {
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 *UpdateLoadBalancerPayload) GetNetworksOk() (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks)
}
// HasNetworks returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasNetworks() bool {
_, ok := o.GetNetworksOk()
return ok
}
// SetNetworks gets a reference to the given []Network and assigns it to the Networks field.
func (o *UpdateLoadBalancerPayload) SetNetworks(v UpdateLoadBalancerPayloadGetNetworksRetType) {
setUpdateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v)
}
// GetOptions returns the Options field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetOptions() (res UpdateLoadBalancerPayloadGetOptionsRetType) {
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 *UpdateLoadBalancerPayload) GetOptionsOk() (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options)
}
// HasOptions returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasOptions() bool {
_, ok := o.GetOptionsOk()
return ok
}
// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field.
func (o *UpdateLoadBalancerPayload) SetOptions(v UpdateLoadBalancerPayloadGetOptionsRetType) {
setUpdateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v)
}
// GetPlanId returns the PlanId field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetPlanId() (res UpdateLoadBalancerPayloadGetPlanIdRetType) {
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 *UpdateLoadBalancerPayload) GetPlanIdOk() (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId)
}
// HasPlanId returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasPlanId() bool {
_, ok := o.GetPlanIdOk()
return ok
}
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
func (o *UpdateLoadBalancerPayload) SetPlanId(v UpdateLoadBalancerPayloadGetPlanIdRetType) {
setUpdateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v)
}
// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetPrivateAddress() (res UpdateLoadBalancerPayloadGetPrivateAddressRetType) {
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 *UpdateLoadBalancerPayload) GetPrivateAddressOk() (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress)
}
// HasPrivateAddress returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool {
_, ok := o.GetPrivateAddressOk()
return ok
}
// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field.
func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v UpdateLoadBalancerPayloadGetPrivateAddressRetType) {
setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v)
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetRegion() (res UpdateLoadBalancerPayloadGetRegionRetType) {
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 *UpdateLoadBalancerPayload) GetRegionOk() (ret UpdateLoadBalancerPayloadGetRegionRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *UpdateLoadBalancerPayload) SetRegion(v UpdateLoadBalancerPayloadGetRegionRetType) {
setUpdateLoadBalancerPayloadGetRegionAttributeType(&o.Region, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetStatus() (res UpdateLoadBalancerPayloadGetStatusRetType) {
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 *UpdateLoadBalancerPayload) GetStatusOk() (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *UpdateLoadBalancerPayload) SetStatus(v UpdateLoadBalancerPayloadGetStatusRetType) {
setUpdateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v)
}
// GetTargetPools returns the TargetPools field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetTargetPools() (res UpdateLoadBalancerPayloadGetTargetPoolsRetType) {
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 *UpdateLoadBalancerPayload) GetTargetPoolsOk() (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools)
}
// HasTargetPools returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasTargetPools() bool {
_, ok := o.GetTargetPoolsOk()
return ok
}
// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field.
func (o *UpdateLoadBalancerPayload) SetTargetPools(v UpdateLoadBalancerPayloadGetTargetPoolsRetType) {
setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v)
}
// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroup() (res UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType) {
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 *UpdateLoadBalancerPayload) GetTargetSecurityGroupOk() (ret UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup)
}
// HasTargetSecurityGroup returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasTargetSecurityGroup() bool {
_, ok := o.GetTargetSecurityGroupOk()
return ok
}
// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field.
func (o *UpdateLoadBalancerPayload) SetTargetSecurityGroup(v UpdateLoadBalancerPayloadGetTargetSecurityGroupRetType) {
setUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v)
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *UpdateLoadBalancerPayload) GetVersion() (res UpdateLoadBalancerPayloadGetVersionRetType) {
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 *UpdateLoadBalancerPayload) GetVersionOk() (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) {
return getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version)
}
// HasVersion returns a boolean if a field has been set.
func (o *UpdateLoadBalancerPayload) HasVersion() bool {
_, ok := o.GetVersionOk()
return ok
}
// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *UpdateLoadBalancerPayload) SetVersion(v UpdateLoadBalancerPayloadGetVersionRetType) {
setUpdateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v)
}
func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok {
toSerialize["DisableTargetSecurityGroupAssignment"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok {
toSerialize["Errors"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok {
toSerialize["ExternalAddress"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok {
toSerialize["Listeners"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok {
toSerialize["LoadBalancerSecurityGroup"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok {
toSerialize["Networks"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok {
toSerialize["Options"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok {
toSerialize["PlanId"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok {
toSerialize["PrivateAddress"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok {
toSerialize["TargetPools"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok {
toSerialize["TargetSecurityGroup"] = val
}
if val, ok := getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok {
toSerialize["Version"] = val
}
return toSerialize, nil
}
type NullableUpdateLoadBalancerPayload struct {
value *UpdateLoadBalancerPayload
isSet bool
}
func (v NullableUpdateLoadBalancerPayload) Get() *UpdateLoadBalancerPayload {
return v.value
}
func (v *NullableUpdateLoadBalancerPayload) Set(val *UpdateLoadBalancerPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateLoadBalancerPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateLoadBalancerPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateLoadBalancerPayload(val *UpdateLoadBalancerPayload) *NullableUpdateLoadBalancerPayload {
return &NullableUpdateLoadBalancerPayload{value: val, isSet: true}
}
func (v NullableUpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateLoadBalancerPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}