From 63837d5c09693e69ae3366ca8432145dff639898 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 11 Jun 2025 12:51:08 +0000 Subject: [PATCH] Generate loadbalancer --- .../model_create_load_balancer_payload.go | 48 +++++++++++++++++++ ..._balancer_payload_target_security_group.go | 2 +- services/loadbalancer/model_load_balancer.go | 48 +++++++++++++++++++ .../model_update_load_balancer_payload.go | 48 +++++++++++++++++++ 4 files changed, 145 insertions(+), 1 deletion(-) diff --git a/services/loadbalancer/model_create_load_balancer_payload.go b/services/loadbalancer/model_create_load_balancer_payload.go index cda8e84d..f1fc77cf 100644 --- a/services/loadbalancer/model_create_load_balancer_payload.go +++ b/services/loadbalancer/model_create_load_balancer_payload.go @@ -18,6 +18,26 @@ import ( // 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 */ @@ -396,6 +416,8 @@ 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 load balancer has. Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External load balancer IP address where this load balancer is exposed. Not changeable after creation. @@ -438,6 +460,29 @@ func NewCreateLoadBalancerPayloadWithDefaults() *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() @@ -739,6 +784,9 @@ func (o *CreateLoadBalancerPayload) SetVersion(v CreateLoadBalancerPayloadGetVer 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 } diff --git a/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go b/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go index 90112e5e..ecdc9a72 100644 --- a/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go +++ b/services/loadbalancer/model_create_load_balancer_payload_target_security_group.go @@ -59,7 +59,7 @@ func setCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType(arg *Cr type CreateLoadBalancerPayloadTargetSecurityGroupGetNameArgType = string type CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType = string -// CreateLoadBalancerPayloadTargetSecurityGroup Security Group permitting network traffic from the LoadBalancer to the targets. +// CreateLoadBalancerPayloadTargetSecurityGroup Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. type CreateLoadBalancerPayloadTargetSecurityGroup struct { // ID of the security Group Id CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType `json:"id,omitempty"` diff --git a/services/loadbalancer/model_load_balancer.go b/services/loadbalancer/model_load_balancer.go index 7f069ec4..818e72c4 100644 --- a/services/loadbalancer/model_load_balancer.go +++ b/services/loadbalancer/model_load_balancer.go @@ -18,6 +18,26 @@ import ( // checks if the LoadBalancer type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadBalancer{} +/* + types and functions for disableTargetSecurityGroupAssignment +*/ + +// isBoolean +type LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType = *bool +type LoadBalancergetDisableTargetSecurityGroupAssignmentArgType = bool +type LoadBalancergetDisableTargetSecurityGroupAssignmentRetType = bool + +func getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType) (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(arg *LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType, val LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) { + *arg = &val +} + /* types and functions for errors */ @@ -396,6 +416,8 @@ type LoadBalancerGetVersionRetType = string // LoadBalancer struct for LoadBalancer type LoadBalancer struct { + // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. + DisableTargetSecurityGroupAssignment LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"` // Reports all errors a load balancer has. Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"` // External load balancer IP address where this load balancer is exposed. Not changeable after creation. @@ -438,6 +460,29 @@ func NewLoadBalancerWithDefaults() *LoadBalancer { return &this } +// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. +func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() (res LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) { + res, _ = o.GetDisableTargetSecurityGroupAssignmentOk() + return +} + +// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignmentOk() (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) { + return getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment) +} + +// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. +func (o *LoadBalancer) HasDisableTargetSecurityGroupAssignment() bool { + _, ok := o.GetDisableTargetSecurityGroupAssignmentOk() + return ok +} + +// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. +func (o *LoadBalancer) SetDisableTargetSecurityGroupAssignment(v LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) { + setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v) +} + // GetErrors returns the Errors field value if set, zero value otherwise. func (o *LoadBalancer) GetErrors() (res LoadBalancerGetErrorsRetType) { res, _ = o.GetErrorsOk() @@ -739,6 +784,9 @@ func (o *LoadBalancer) SetVersion(v LoadBalancerGetVersionRetType) { func (o LoadBalancer) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok { + toSerialize["DisableTargetSecurityGroupAssignment"] = val + } if val, ok := getLoadBalancerGetErrorsAttributeTypeOk(o.Errors); ok { toSerialize["Errors"] = val } diff --git a/services/loadbalancer/model_update_load_balancer_payload.go b/services/loadbalancer/model_update_load_balancer_payload.go index 0bf1b652..af566e08 100644 --- a/services/loadbalancer/model_update_load_balancer_payload.go +++ b/services/loadbalancer/model_update_load_balancer_payload.go @@ -18,6 +18,26 @@ import ( // 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 */ @@ -396,6 +416,8 @@ 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 load balancer has. Errors UpdateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External load balancer IP address where this load balancer is exposed. Not changeable after creation. @@ -438,6 +460,29 @@ func NewUpdateLoadBalancerPayloadWithDefaults() *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() @@ -739,6 +784,9 @@ func (o *UpdateLoadBalancerPayload) SetVersion(v UpdateLoadBalancerPayloadGetVer 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 }