/* 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 CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateLoadBalancerPayload{} /* types and functions for disableTargetSecurityGroupAssignment */ // isBoolean type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType = *bool type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentArgType = bool type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType = bool func getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType) (ret CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(arg *CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType, val CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { *arg = &val } /* types and functions for errors */ // isArray type CreateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError type CreateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError type CreateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError func getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg CreateLoadBalancerPayloadGetErrorsAttributeType) (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetErrorsAttributeType(arg *CreateLoadBalancerPayloadGetErrorsAttributeType, val CreateLoadBalancerPayloadGetErrorsRetType) { *arg = &val } /* types and functions for externalAddress */ // isNotNullableString type CreateLoadBalancerPayloadGetExternalAddressAttributeType = *string func getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetExternalAddressAttributeType) (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetExternalAddressAttributeType(arg *CreateLoadBalancerPayloadGetExternalAddressAttributeType, val CreateLoadBalancerPayloadGetExternalAddressRetType) { *arg = &val } type CreateLoadBalancerPayloadGetExternalAddressArgType = string type CreateLoadBalancerPayloadGetExternalAddressRetType = string /* types and functions for labels */ // isContainer type CreateLoadBalancerPayloadGetLabelsAttributeType = *map[string]string type CreateLoadBalancerPayloadGetLabelsArgType = map[string]string type CreateLoadBalancerPayloadGetLabelsRetType = map[string]string func getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg CreateLoadBalancerPayloadGetLabelsAttributeType) (ret CreateLoadBalancerPayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetLabelsAttributeType(arg *CreateLoadBalancerPayloadGetLabelsAttributeType, val CreateLoadBalancerPayloadGetLabelsRetType) { *arg = &val } /* types and functions for listeners */ // isArray type CreateLoadBalancerPayloadGetListenersAttributeType = *[]Listener type CreateLoadBalancerPayloadGetListenersArgType = []Listener type CreateLoadBalancerPayloadGetListenersRetType = []Listener func getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(arg CreateLoadBalancerPayloadGetListenersAttributeType) (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetListenersAttributeType(arg *CreateLoadBalancerPayloadGetListenersAttributeType, val CreateLoadBalancerPayloadGetListenersRetType) { *arg = &val } /* types and functions for loadBalancerSecurityGroup */ // isModel type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup func getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType) (ret CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg *CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType, val CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { *arg = &val } /* types and functions for name */ // isNotNullableString type CreateLoadBalancerPayloadGetNameAttributeType = *string func getCreateLoadBalancerPayloadGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadGetNameAttributeType) (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetNameAttributeType(arg *CreateLoadBalancerPayloadGetNameAttributeType, val CreateLoadBalancerPayloadGetNameRetType) { *arg = &val } type CreateLoadBalancerPayloadGetNameArgType = string type CreateLoadBalancerPayloadGetNameRetType = string /* types and functions for networks */ // isArray type CreateLoadBalancerPayloadGetNetworksAttributeType = *[]Network type CreateLoadBalancerPayloadGetNetworksArgType = []Network type CreateLoadBalancerPayloadGetNetworksRetType = []Network func getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg CreateLoadBalancerPayloadGetNetworksAttributeType) (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetNetworksAttributeType(arg *CreateLoadBalancerPayloadGetNetworksAttributeType, val CreateLoadBalancerPayloadGetNetworksRetType) { *arg = &val } /* types and functions for options */ // isModel type CreateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions type CreateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions type CreateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions func getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg CreateLoadBalancerPayloadGetOptionsAttributeType) (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetOptionsAttributeType(arg *CreateLoadBalancerPayloadGetOptionsAttributeType, val CreateLoadBalancerPayloadGetOptionsRetType) { *arg = &val } /* types and functions for planId */ // isNotNullableString type CreateLoadBalancerPayloadGetPlanIdAttributeType = *string func getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg CreateLoadBalancerPayloadGetPlanIdAttributeType) (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetPlanIdAttributeType(arg *CreateLoadBalancerPayloadGetPlanIdAttributeType, val CreateLoadBalancerPayloadGetPlanIdRetType) { *arg = &val } type CreateLoadBalancerPayloadGetPlanIdArgType = string type CreateLoadBalancerPayloadGetPlanIdRetType = string /* types and functions for privateAddress */ // isNotNullableString type CreateLoadBalancerPayloadGetPrivateAddressAttributeType = *string func getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *CreateLoadBalancerPayloadGetPrivateAddressAttributeType, val CreateLoadBalancerPayloadGetPrivateAddressRetType) { *arg = &val } type CreateLoadBalancerPayloadGetPrivateAddressArgType = string type CreateLoadBalancerPayloadGetPrivateAddressRetType = string /* types and functions for region */ // isNotNullableString type CreateLoadBalancerPayloadGetRegionAttributeType = *string func getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(arg CreateLoadBalancerPayloadGetRegionAttributeType) (ret CreateLoadBalancerPayloadGetRegionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetRegionAttributeType(arg *CreateLoadBalancerPayloadGetRegionAttributeType, val CreateLoadBalancerPayloadGetRegionRetType) { *arg = &val } type CreateLoadBalancerPayloadGetRegionArgType = string type CreateLoadBalancerPayloadGetRegionRetType = string /* types and functions for status */ // isEnum // CreateLoadBalancerPayloadStatus the model 'CreateLoadBalancerPayload' // value type for enums type CreateLoadBalancerPayloadStatus string // List of Status const ( CREATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED CreateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" CREATELOADBALANCERPAYLOADSTATUS_PENDING CreateLoadBalancerPayloadStatus = "STATUS_PENDING" CREATELOADBALANCERPAYLOADSTATUS_READY CreateLoadBalancerPayloadStatus = "STATUS_READY" CREATELOADBALANCERPAYLOADSTATUS_ERROR CreateLoadBalancerPayloadStatus = "STATUS_ERROR" CREATELOADBALANCERPAYLOADSTATUS_TERMINATING CreateLoadBalancerPayloadStatus = "STATUS_TERMINATING" ) // All allowed values of CreateLoadBalancerPayload enum var AllowedCreateLoadBalancerPayloadStatusEnumValues = []CreateLoadBalancerPayloadStatus{ "STATUS_UNSPECIFIED", "STATUS_PENDING", "STATUS_READY", "STATUS_ERROR", "STATUS_TERMINATING", } func (v *CreateLoadBalancerPayloadStatus) 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 CreateLoadBalancerPayloadStatus 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 := CreateLoadBalancerPayloadStatus(value) for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { if existing == enumTypeValue { *v = enumTypeValue return nil } } return fmt.Errorf("%+v is not a valid CreateLoadBalancerPayload", value) } // NewCreateLoadBalancerPayloadStatusFromValue returns a pointer to a valid CreateLoadBalancerPayloadStatus // for the value passed as argument, or an error if the value passed is not allowed by the enum func NewCreateLoadBalancerPayloadStatusFromValue(v CreateLoadBalancerPayloadStatus) (*CreateLoadBalancerPayloadStatus, error) { ev := CreateLoadBalancerPayloadStatus(v) if ev.IsValid() { return &ev, nil } else { return nil, fmt.Errorf("invalid value '%v' for CreateLoadBalancerPayloadStatus: valid values are %v", v, AllowedCreateLoadBalancerPayloadStatusEnumValues) } } // IsValid return true if the value is valid for the enum, false otherwise func (v CreateLoadBalancerPayloadStatus) IsValid() bool { for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { if existing == v { return true } } return false } // Ptr returns reference to StatusStatus value func (v CreateLoadBalancerPayloadStatus) Ptr() *CreateLoadBalancerPayloadStatus { return &v } type NullableCreateLoadBalancerPayloadStatus struct { value *CreateLoadBalancerPayloadStatus isSet bool } func (v NullableCreateLoadBalancerPayloadStatus) Get() *CreateLoadBalancerPayloadStatus { return v.value } func (v *NullableCreateLoadBalancerPayloadStatus) Set(val *CreateLoadBalancerPayloadStatus) { v.value = val v.isSet = true } func (v NullableCreateLoadBalancerPayloadStatus) IsSet() bool { return v.isSet } func (v *NullableCreateLoadBalancerPayloadStatus) Unset() { v.value = nil v.isSet = false } func NewNullableCreateLoadBalancerPayloadStatus(val *CreateLoadBalancerPayloadStatus) *NullableCreateLoadBalancerPayloadStatus { return &NullableCreateLoadBalancerPayloadStatus{value: val, isSet: true} } func (v NullableCreateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } type CreateLoadBalancerPayloadGetStatusAttributeType = *CreateLoadBalancerPayloadStatus type CreateLoadBalancerPayloadGetStatusArgType = CreateLoadBalancerPayloadStatus type CreateLoadBalancerPayloadGetStatusRetType = CreateLoadBalancerPayloadStatus func getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(arg CreateLoadBalancerPayloadGetStatusAttributeType) (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetStatusAttributeType(arg *CreateLoadBalancerPayloadGetStatusAttributeType, val CreateLoadBalancerPayloadGetStatusRetType) { *arg = &val } /* types and functions for targetPools */ // isArray type CreateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool type CreateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool type CreateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool func getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *CreateLoadBalancerPayloadGetTargetPoolsAttributeType, val CreateLoadBalancerPayloadGetTargetPoolsRetType) { *arg = &val } /* types and functions for targetSecurityGroup */ // isModel type CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup type CreateLoadBalancerPayloadGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup type CreateLoadBalancerPayloadGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup func getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType) (ret CreateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType, val CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) { *arg = &val } /* types and functions for version */ // isNotNullableString type CreateLoadBalancerPayloadGetVersionAttributeType = *string func getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(arg CreateLoadBalancerPayloadGetVersionAttributeType) (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateLoadBalancerPayloadGetVersionAttributeType(arg *CreateLoadBalancerPayloadGetVersionAttributeType, val CreateLoadBalancerPayloadGetVersionRetType) { *arg = &val } type CreateLoadBalancerPayloadGetVersionArgType = string type CreateLoadBalancerPayloadGetVersionRetType = string // CreateLoadBalancerPayload struct for CreateLoadBalancerPayload type CreateLoadBalancerPayload 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 CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"` // Reports all errors a application load balancer has. Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. ExternalAddress CreateLoadBalancerPayloadGetExternalAddressAttributeType `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 CreateLoadBalancerPayloadGetLabelsAttributeType `json:"labels,omitempty"` // There is a maximum listener count of 20. Listeners CreateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` LoadBalancerSecurityGroup CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` // Application Load Balancer name. Not changeable after creation. Name CreateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. Networks CreateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` Options CreateLoadBalancerPayloadGetOptionsAttributeType `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 CreateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` // Transient private application load balancer IP address that can change any time. PrivateAddress CreateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` // Region of the LoadBalancer. Region CreateLoadBalancerPayloadGetRegionAttributeType `json:"region,omitempty"` Status CreateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` // List of all target pools which will be used in the application load balancer. Limited to 20. TargetPools CreateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` TargetSecurityGroup CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType `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 CreateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` } // NewCreateLoadBalancerPayload instantiates a new CreateLoadBalancerPayload 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 NewCreateLoadBalancerPayload() *CreateLoadBalancerPayload { this := CreateLoadBalancerPayload{} return &this } // NewCreateLoadBalancerPayloadWithDefaults instantiates a new CreateLoadBalancerPayload 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 NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload { this := CreateLoadBalancerPayload{} return &this } // GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (res CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { 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 *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (ret CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) { return getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment) } // HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { _, ok := o.GetDisableTargetSecurityGroupAssignmentOk() return ok } // SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. func (o *CreateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) { setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v) } // GetErrors returns the Errors field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetErrors() (res CreateLoadBalancerPayloadGetErrorsRetType) { 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 *CreateLoadBalancerPayload) GetErrorsOk() (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { return getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) } // HasErrors returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasErrors() bool { _, ok := o.GetErrorsOk() return ok } // SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. func (o *CreateLoadBalancerPayload) SetErrors(v CreateLoadBalancerPayloadGetErrorsRetType) { setCreateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) } // GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetExternalAddress() (res CreateLoadBalancerPayloadGetExternalAddressRetType) { 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 *CreateLoadBalancerPayload) GetExternalAddressOk() (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { return getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) } // HasExternalAddress returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { _, ok := o.GetExternalAddressOk() return ok } // SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. func (o *CreateLoadBalancerPayload) SetExternalAddress(v CreateLoadBalancerPayloadGetExternalAddressRetType) { setCreateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v) } // GetLabels returns the Labels field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetLabels() (res CreateLoadBalancerPayloadGetLabelsRetType) { 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 *CreateLoadBalancerPayload) GetLabelsOk() (ret CreateLoadBalancerPayloadGetLabelsRetType, ok bool) { return getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) SetLabels(v CreateLoadBalancerPayloadGetLabelsRetType) { setCreateLoadBalancerPayloadGetLabelsAttributeType(&o.Labels, v) } // GetListeners returns the Listeners field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetListeners() (res CreateLoadBalancerPayloadGetListenersRetType) { 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 *CreateLoadBalancerPayload) GetListenersOk() (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { return getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) } // HasListeners returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasListeners() bool { _, ok := o.GetListenersOk() return ok } // SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. func (o *CreateLoadBalancerPayload) SetListeners(v CreateLoadBalancerPayloadGetListenersRetType) { setCreateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) } // GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { 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 *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (ret CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) { return getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup) } // HasLoadBalancerSecurityGroup returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { _, ok := o.GetLoadBalancerSecurityGroupOk() return ok } // SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field. func (o *CreateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) { setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, v) } // GetName returns the Name field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetName() (res CreateLoadBalancerPayloadGetNameRetType) { 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 *CreateLoadBalancerPayload) GetNameOk() (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { return getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *CreateLoadBalancerPayload) SetName(v CreateLoadBalancerPayloadGetNameRetType) { setCreateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) } // GetNetworks returns the Networks field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetNetworks() (res CreateLoadBalancerPayloadGetNetworksRetType) { 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 *CreateLoadBalancerPayload) GetNetworksOk() (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { return getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) } // HasNetworks returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasNetworks() bool { _, ok := o.GetNetworksOk() return ok } // SetNetworks gets a reference to the given []Network and assigns it to the Networks field. func (o *CreateLoadBalancerPayload) SetNetworks(v CreateLoadBalancerPayloadGetNetworksRetType) { setCreateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) } // GetOptions returns the Options field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetOptions() (res CreateLoadBalancerPayloadGetOptionsRetType) { 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 *CreateLoadBalancerPayload) GetOptionsOk() (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { return getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) } // HasOptions returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasOptions() bool { _, ok := o.GetOptionsOk() return ok } // SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. func (o *CreateLoadBalancerPayload) SetOptions(v CreateLoadBalancerPayloadGetOptionsRetType) { setCreateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) } // GetPlanId returns the PlanId field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetPlanId() (res CreateLoadBalancerPayloadGetPlanIdRetType) { 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 *CreateLoadBalancerPayload) GetPlanIdOk() (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { return getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasPlanId() bool { _, ok := o.GetPlanIdOk() return ok } // SetPlanId gets a reference to the given string and assigns it to the PlanId field. func (o *CreateLoadBalancerPayload) SetPlanId(v CreateLoadBalancerPayloadGetPlanIdRetType) { setCreateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) } // GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetPrivateAddress() (res CreateLoadBalancerPayloadGetPrivateAddressRetType) { 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 *CreateLoadBalancerPayload) GetPrivateAddressOk() (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { return getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) } // HasPrivateAddress returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { _, ok := o.GetPrivateAddressOk() return ok } // SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. func (o *CreateLoadBalancerPayload) SetPrivateAddress(v CreateLoadBalancerPayloadGetPrivateAddressRetType) { setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) } // GetRegion returns the Region field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetRegion() (res CreateLoadBalancerPayloadGetRegionRetType) { 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 *CreateLoadBalancerPayload) GetRegionOk() (ret CreateLoadBalancerPayloadGetRegionRetType, ok bool) { return getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region) } // HasRegion returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasRegion() bool { _, ok := o.GetRegionOk() return ok } // SetRegion gets a reference to the given string and assigns it to the Region field. func (o *CreateLoadBalancerPayload) SetRegion(v CreateLoadBalancerPayloadGetRegionRetType) { setCreateLoadBalancerPayloadGetRegionAttributeType(&o.Region, v) } // GetStatus returns the Status field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetStatus() (res CreateLoadBalancerPayloadGetStatusRetType) { 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 *CreateLoadBalancerPayload) GetStatusOk() (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { return getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status) } // HasStatus returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasStatus() bool { _, ok := o.GetStatusOk() return ok } // SetStatus gets a reference to the given string and assigns it to the Status field. func (o *CreateLoadBalancerPayload) SetStatus(v CreateLoadBalancerPayloadGetStatusRetType) { setCreateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) } // GetTargetPools returns the TargetPools field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetTargetPools() (res CreateLoadBalancerPayloadGetTargetPoolsRetType) { 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 *CreateLoadBalancerPayload) GetTargetPoolsOk() (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { return getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) } // HasTargetPools returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasTargetPools() bool { _, ok := o.GetTargetPoolsOk() return ok } // SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. func (o *CreateLoadBalancerPayload) SetTargetPools(v CreateLoadBalancerPayloadGetTargetPoolsRetType) { setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) } // GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetTargetSecurityGroup() (res CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) { 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 *CreateLoadBalancerPayload) GetTargetSecurityGroupOk() (ret CreateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) { return getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup) } // HasTargetSecurityGroup returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasTargetSecurityGroup() bool { _, ok := o.GetTargetSecurityGroupOk() return ok } // SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field. func (o *CreateLoadBalancerPayload) SetTargetSecurityGroup(v CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) { setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v) } // GetVersion returns the Version field value if set, zero value otherwise. func (o *CreateLoadBalancerPayload) GetVersion() (res CreateLoadBalancerPayloadGetVersionRetType) { 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 *CreateLoadBalancerPayload) GetVersionOk() (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { return getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) } // HasVersion returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. func (o *CreateLoadBalancerPayload) SetVersion(v CreateLoadBalancerPayloadGetVersionRetType) { setCreateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) } func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok { toSerialize["DisableTargetSecurityGroupAssignment"] = val } if val, ok := getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { toSerialize["Errors"] = val } if val, ok := getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { toSerialize["ExternalAddress"] = val } if val, ok := getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels); ok { toSerialize["Labels"] = val } if val, ok := getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { toSerialize["Listeners"] = val } if val, ok := getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok { toSerialize["LoadBalancerSecurityGroup"] = val } if val, ok := getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { toSerialize["Networks"] = val } if val, ok := getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { toSerialize["Options"] = val } if val, ok := getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { toSerialize["PlanId"] = val } if val, ok := getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { toSerialize["PrivateAddress"] = val } if val, ok := getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region); ok { toSerialize["Region"] = val } if val, ok := getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { toSerialize["Status"] = val } if val, ok := getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { toSerialize["TargetPools"] = val } if val, ok := getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok { toSerialize["TargetSecurityGroup"] = val } if val, ok := getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { toSerialize["Version"] = val } return toSerialize, nil } type NullableCreateLoadBalancerPayload struct { value *CreateLoadBalancerPayload isSet bool } func (v NullableCreateLoadBalancerPayload) Get() *CreateLoadBalancerPayload { return v.value } func (v *NullableCreateLoadBalancerPayload) Set(val *CreateLoadBalancerPayload) { v.value = val v.isSet = true } func (v NullableCreateLoadBalancerPayload) IsSet() bool { return v.isSet } func (v *NullableCreateLoadBalancerPayload) Unset() { v.value = nil v.isSet = false } func NewNullableCreateLoadBalancerPayload(val *CreateLoadBalancerPayload) *NullableCreateLoadBalancerPayload { return &NullableCreateLoadBalancerPayload{value: val, isSet: true} } func (v NullableCreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCreateLoadBalancerPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }