From 7dafc50a074c402d2edfbb4ec9b8a12b06573e11 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 23 Sep 2025 09:24:50 +0000 Subject: [PATCH] Generate loadbalancer --- .../model_create_load_balancer_payload.go | 48 +++++++++++++++++++ services/loadbalancer/model_load_balancer.go | 48 +++++++++++++++++++ .../model_update_load_balancer_payload.go | 48 +++++++++++++++++++ 3 files changed, 144 insertions(+) diff --git a/services/loadbalancer/model_create_load_balancer_payload.go b/services/loadbalancer/model_create_load_balancer_payload.go index 11ddb91d4..9592ab958 100644 --- a/services/loadbalancer/model_create_load_balancer_payload.go +++ b/services/loadbalancer/model_create_load_balancer_payload.go @@ -79,6 +79,26 @@ func setCreateLoadBalancerPayloadGetExternalAddressAttributeType(arg *CreateLoad 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 */ @@ -442,6 +462,8 @@ type CreateLoadBalancerPayload struct { Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External load balancer IP address where this 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 LB. **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. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. Listeners CreateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` LoadBalancerSecurityGroup CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` @@ -550,6 +572,29 @@ func (o *CreateLoadBalancerPayload) SetExternalAddress(v CreateLoadBalancerPaylo 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() @@ -837,6 +882,9 @@ func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { 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 } diff --git a/services/loadbalancer/model_load_balancer.go b/services/loadbalancer/model_load_balancer.go index 7c3436ce2..f39154fda 100644 --- a/services/loadbalancer/model_load_balancer.go +++ b/services/loadbalancer/model_load_balancer.go @@ -79,6 +79,26 @@ func setLoadBalancerGetExternalAddressAttributeType(arg *LoadBalancerGetExternal 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 */ @@ -442,6 +462,8 @@ type LoadBalancer struct { Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"` // External load balancer IP address where this 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 LB. **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. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. Listeners LoadBalancerGetListenersAttributeType `json:"listeners,omitempty"` LoadBalancerSecurityGroup LoadBalancerGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` @@ -550,6 +572,29 @@ func (o *LoadBalancer) SetExternalAddress(v LoadBalancerGetExternalAddressRetTyp 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() @@ -837,6 +882,9 @@ func (o LoadBalancer) ToMap() (map[string]interface{}, error) { 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 } diff --git a/services/loadbalancer/model_update_load_balancer_payload.go b/services/loadbalancer/model_update_load_balancer_payload.go index d2f989520..0875e1993 100644 --- a/services/loadbalancer/model_update_load_balancer_payload.go +++ b/services/loadbalancer/model_update_load_balancer_payload.go @@ -79,6 +79,26 @@ func setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(arg *UpdateLoad 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 */ @@ -442,6 +462,8 @@ type UpdateLoadBalancerPayload struct { Errors UpdateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External load balancer IP address where this 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 LB. **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. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. Listeners UpdateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` LoadBalancerSecurityGroup UpdateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"` @@ -550,6 +572,29 @@ func (o *UpdateLoadBalancerPayload) SetExternalAddress(v UpdateLoadBalancerPaylo 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() @@ -837,6 +882,9 @@ func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { 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 }