diff --git a/services/lbapplication/model_active_health_check.go b/services/lbapplication/model_active_health_check.go index f77787a4b..1d0966761 100644 --- a/services/lbapplication/model_active_health_check.go +++ b/services/lbapplication/model_active_health_check.go @@ -20,7 +20,7 @@ var _ MappedNullable = &ActiveHealthCheck{} // ActiveHealthCheck struct for ActiveHealthCheck type ActiveHealthCheck struct { // Healthy threshold of the health checking - HealthyThreshold *interface{} `json:"healthyThreshold,omitempty"` + HealthyThreshold *int64 `json:"healthyThreshold,omitempty"` HttpHealthChecks *HttpHealthChecks `json:"httpHealthChecks,omitempty"` // Interval duration of health checking in seconds Interval *string `json:"interval,omitempty"` @@ -29,7 +29,7 @@ type ActiveHealthCheck struct { // Active health checking timeout duration in seconds Timeout *string `json:"timeout,omitempty"` // Unhealthy threshold of the health checking - UnhealthyThreshold *interface{} `json:"unhealthyThreshold,omitempty"` + UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` } // NewActiveHealthCheck instantiates a new ActiveHealthCheck object @@ -49,10 +49,10 @@ func NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { return &this } -// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ActiveHealthCheck) GetHealthyThreshold() *interface{} { +// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetHealthyThreshold() *int64 { if o == nil || IsNil(o.HealthyThreshold) { - var ret *interface{} + var ret *int64 return ret } return o.HealthyThreshold @@ -60,8 +60,7 @@ func (o *ActiveHealthCheck) GetHealthyThreshold() *interface{} { // GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*interface{}, bool) { +func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*int64, bool) { if o == nil || IsNil(o.HealthyThreshold) { return nil, false } @@ -77,8 +76,8 @@ func (o *ActiveHealthCheck) HasHealthyThreshold() bool { return false } -// SetHealthyThreshold gets a reference to the given interface{} and assigns it to the HealthyThreshold field. -func (o *ActiveHealthCheck) SetHealthyThreshold(v *interface{}) { +// SetHealthyThreshold gets a reference to the given int64 and assigns it to the HealthyThreshold field. +func (o *ActiveHealthCheck) SetHealthyThreshold(v *int64) { o.HealthyThreshold = v } @@ -210,10 +209,10 @@ func (o *ActiveHealthCheck) SetTimeout(v *string) { o.Timeout = v } -// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ActiveHealthCheck) GetUnhealthyThreshold() *interface{} { +// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetUnhealthyThreshold() *int64 { if o == nil || IsNil(o.UnhealthyThreshold) { - var ret *interface{} + var ret *int64 return ret } return o.UnhealthyThreshold @@ -221,8 +220,7 @@ func (o *ActiveHealthCheck) GetUnhealthyThreshold() *interface{} { // GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*interface{}, bool) { +func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*int64, bool) { if o == nil || IsNil(o.UnhealthyThreshold) { return nil, false } @@ -238,14 +236,14 @@ func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { return false } -// SetUnhealthyThreshold gets a reference to the given interface{} and assigns it to the UnhealthyThreshold field. -func (o *ActiveHealthCheck) SetUnhealthyThreshold(v *interface{}) { +// SetUnhealthyThreshold gets a reference to the given int64 and assigns it to the UnhealthyThreshold field. +func (o *ActiveHealthCheck) SetUnhealthyThreshold(v *int64) { o.UnhealthyThreshold = v } func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.HealthyThreshold != nil { + if !IsNil(o.HealthyThreshold) { toSerialize["healthyThreshold"] = o.HealthyThreshold } if !IsNil(o.HttpHealthChecks) { @@ -260,7 +258,7 @@ func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - if o.UnhealthyThreshold != nil { + if !IsNil(o.UnhealthyThreshold) { toSerialize["unhealthyThreshold"] = o.UnhealthyThreshold } return toSerialize, nil diff --git a/services/lbapplication/model_get_quota_response.go b/services/lbapplication/model_get_quota_response.go index f19c64e0e..6b270b597 100644 --- a/services/lbapplication/model_get_quota_response.go +++ b/services/lbapplication/model_get_quota_response.go @@ -20,7 +20,7 @@ var _ MappedNullable = &GetQuotaResponse{} // GetQuotaResponse struct for GetQuotaResponse type GetQuotaResponse struct { // The maximum number of load balancing servers in this project. Unlimited if set to -1. - MaxLoadBalancers *interface{} `json:"maxLoadBalancers,omitempty"` + MaxLoadBalancers *int64 `json:"maxLoadBalancers,omitempty"` // Project identifier ProjectId *string `json:"projectId,omitempty"` } @@ -42,10 +42,10 @@ func NewGetQuotaResponseWithDefaults() *GetQuotaResponse { return &this } -// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetQuotaResponse) GetMaxLoadBalancers() *interface{} { +// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetMaxLoadBalancers() *int64 { if o == nil || IsNil(o.MaxLoadBalancers) { - var ret *interface{} + var ret *int64 return ret } return o.MaxLoadBalancers @@ -53,8 +53,7 @@ func (o *GetQuotaResponse) GetMaxLoadBalancers() *interface{} { // GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*interface{}, bool) { +func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*int64, bool) { if o == nil || IsNil(o.MaxLoadBalancers) { return nil, false } @@ -70,8 +69,8 @@ func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { return false } -// SetMaxLoadBalancers gets a reference to the given interface{} and assigns it to the MaxLoadBalancers field. -func (o *GetQuotaResponse) SetMaxLoadBalancers(v *interface{}) { +// SetMaxLoadBalancers gets a reference to the given int64 and assigns it to the MaxLoadBalancers field. +func (o *GetQuotaResponse) SetMaxLoadBalancers(v *int64) { o.MaxLoadBalancers = v } @@ -109,7 +108,7 @@ func (o *GetQuotaResponse) SetProjectId(v *string) { func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.MaxLoadBalancers != nil { + if !IsNil(o.MaxLoadBalancers) { toSerialize["maxLoadBalancers"] = o.MaxLoadBalancers } if !IsNil(o.ProjectId) { diff --git a/services/lbapplication/model_listener.go b/services/lbapplication/model_listener.go index d74ab302a..46d6d790b 100644 --- a/services/lbapplication/model_listener.go +++ b/services/lbapplication/model_listener.go @@ -25,7 +25,7 @@ type Listener struct { // Will be used to reference a listener and will replace display name in the future. Currently uses - as the name if no display name is given. Name *string `json:"name,omitempty"` // Port number where we listen for traffic - Port *interface{} `json:"port,omitempty"` + Port *int64 `json:"port,omitempty"` // Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported. Protocol *string `json:"protocol,omitempty"` // Rules define the routing parameters for the HTTP and HTTPS listeners. @@ -177,10 +177,10 @@ func (o *Listener) SetName(v *string) { o.Name = v } -// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Listener) GetPort() *interface{} { +// GetPort returns the Port field value if set, zero value otherwise. +func (o *Listener) GetPort() *int64 { if o == nil || IsNil(o.Port) { - var ret *interface{} + var ret *int64 return ret } return o.Port @@ -188,8 +188,7 @@ func (o *Listener) GetPort() *interface{} { // GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Listener) GetPortOk() (*interface{}, bool) { +func (o *Listener) GetPortOk() (*int64, bool) { if o == nil || IsNil(o.Port) { return nil, false } @@ -205,8 +204,8 @@ func (o *Listener) HasPort() bool { return false } -// SetPort gets a reference to the given interface{} and assigns it to the Port field. -func (o *Listener) SetPort(v *interface{}) { +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *Listener) SetPort(v *int64) { o.Port = v } @@ -288,7 +287,7 @@ func (o Listener) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Port != nil { + if !IsNil(o.Port) { toSerialize["port"] = o.Port } if !IsNil(o.Protocol) { diff --git a/services/lbapplication/model_plan_details.go b/services/lbapplication/model_plan_details.go index 1cf0650aa..996535924 100644 --- a/services/lbapplication/model_plan_details.go +++ b/services/lbapplication/model_plan_details.go @@ -24,7 +24,7 @@ type PlanDetails struct { // Flavor Name FlavorName *string `json:"flavorName,omitempty"` // Maximum number of concurrent connections per application load balancer VM instance. - MaxConnections *interface{} `json:"maxConnections,omitempty"` + MaxConnections *int64 `json:"maxConnections,omitempty"` // Service Plan Name Name *string `json:"name,omitempty"` // Service Plan Identifier @@ -112,10 +112,10 @@ func (o *PlanDetails) SetFlavorName(v *string) { o.FlavorName = v } -// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PlanDetails) GetMaxConnections() *interface{} { +// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. +func (o *PlanDetails) GetMaxConnections() *int64 { if o == nil || IsNil(o.MaxConnections) { - var ret *interface{} + var ret *int64 return ret } return o.MaxConnections @@ -123,8 +123,7 @@ func (o *PlanDetails) GetMaxConnections() *interface{} { // GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlanDetails) GetMaxConnectionsOk() (*interface{}, bool) { +func (o *PlanDetails) GetMaxConnectionsOk() (*int64, bool) { if o == nil || IsNil(o.MaxConnections) { return nil, false } @@ -140,8 +139,8 @@ func (o *PlanDetails) HasMaxConnections() bool { return false } -// SetMaxConnections gets a reference to the given interface{} and assigns it to the MaxConnections field. -func (o *PlanDetails) SetMaxConnections(v *interface{}) { +// SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field. +func (o *PlanDetails) SetMaxConnections(v *int64) { o.MaxConnections = v } @@ -217,7 +216,7 @@ func (o PlanDetails) ToMap() (map[string]interface{}, error) { if !IsNil(o.FlavorName) { toSerialize["flavorName"] = o.FlavorName } - if o.MaxConnections != nil { + if !IsNil(o.MaxConnections) { toSerialize["maxConnections"] = o.MaxConnections } if !IsNil(o.Name) { diff --git a/services/lbapplication/model_status.go b/services/lbapplication/model_status.go index 9804077ca..ea546534f 100644 --- a/services/lbapplication/model_status.go +++ b/services/lbapplication/model_status.go @@ -20,7 +20,8 @@ var _ MappedNullable = &Status{} // Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). type Status struct { // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - Code *interface{} `json:"code,omitempty"` + // Can be cast to int32 without loss of precision. + Code *int64 `json:"code,omitempty"` // A list of messages that carry the error details. There is a common set of message types for APIs to use. Details *[]GoogleProtobufAny `json:"details,omitempty"` // A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. @@ -44,10 +45,10 @@ func NewStatusWithDefaults() *Status { return &this } -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Status) GetCode() *interface{} { +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Status) GetCode() *int64 { if o == nil || IsNil(o.Code) { - var ret *interface{} + var ret *int64 return ret } return o.Code @@ -55,8 +56,7 @@ func (o *Status) GetCode() *interface{} { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Status) GetCodeOk() (*interface{}, bool) { +func (o *Status) GetCodeOk() (*int64, bool) { if o == nil || IsNil(o.Code) { return nil, false } @@ -72,8 +72,8 @@ func (o *Status) HasCode() bool { return false } -// SetCode gets a reference to the given interface{} and assigns it to the Code field. -func (o *Status) SetCode(v *interface{}) { +// SetCode gets a reference to the given int64 and assigns it to the Code field. +func (o *Status) SetCode(v *int64) { o.Code = v } @@ -143,7 +143,7 @@ func (o *Status) SetMessage(v *string) { func (o Status) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Code != nil { + if !IsNil(o.Code) { toSerialize["code"] = o.Code } if !IsNil(o.Details) { diff --git a/services/lbapplication/model_target_pool.go b/services/lbapplication/model_target_pool.go index fb331144f..26ec61d20 100644 --- a/services/lbapplication/model_target_pool.go +++ b/services/lbapplication/model_target_pool.go @@ -23,7 +23,7 @@ type TargetPool struct { // Target pool name Name *string `json:"name,omitempty"` // The number identifying the port where each target listens for traffic. - TargetPort *interface{} `json:"targetPort,omitempty"` + TargetPort *int64 `json:"targetPort,omitempty"` // List of all targets which will be used in the pool. Limited to 250. Targets *[]Target `json:"targets,omitempty"` } @@ -109,10 +109,10 @@ func (o *TargetPool) SetName(v *string) { o.Name = v } -// GetTargetPort returns the TargetPort field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TargetPool) GetTargetPort() *interface{} { +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *TargetPool) GetTargetPort() *int64 { if o == nil || IsNil(o.TargetPort) { - var ret *interface{} + var ret *int64 return ret } return o.TargetPort @@ -120,8 +120,7 @@ func (o *TargetPool) GetTargetPort() *interface{} { // GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TargetPool) GetTargetPortOk() (*interface{}, bool) { +func (o *TargetPool) GetTargetPortOk() (*int64, bool) { if o == nil || IsNil(o.TargetPort) { return nil, false } @@ -137,8 +136,8 @@ func (o *TargetPool) HasTargetPort() bool { return false } -// SetTargetPort gets a reference to the given interface{} and assigns it to the TargetPort field. -func (o *TargetPool) SetTargetPort(v *interface{}) { +// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. +func (o *TargetPool) SetTargetPort(v *int64) { o.TargetPort = v } @@ -182,7 +181,7 @@ func (o TargetPool) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.TargetPort != nil { + if !IsNil(o.TargetPort) { toSerialize["targetPort"] = o.TargetPort } if !IsNil(o.Targets) { diff --git a/services/lbapplication/model_update_target_pool_payload.go b/services/lbapplication/model_update_target_pool_payload.go index 9eac793dc..fe281f741 100644 --- a/services/lbapplication/model_update_target_pool_payload.go +++ b/services/lbapplication/model_update_target_pool_payload.go @@ -23,7 +23,7 @@ type UpdateTargetPoolPayload struct { // Target pool name Name *string `json:"name,omitempty"` // The number identifying the port where each target listens for traffic. - TargetPort *interface{} `json:"targetPort,omitempty"` + TargetPort *int64 `json:"targetPort,omitempty"` // List of all targets which will be used in the pool. Limited to 250. Targets *[]Target `json:"targets,omitempty"` } @@ -109,10 +109,10 @@ func (o *UpdateTargetPoolPayload) SetName(v *string) { o.Name = v } -// GetTargetPort returns the TargetPort field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UpdateTargetPoolPayload) GetTargetPort() *interface{} { +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargetPort() *int64 { if o == nil || IsNil(o.TargetPort) { - var ret *interface{} + var ret *int64 return ret } return o.TargetPort @@ -120,8 +120,7 @@ func (o *UpdateTargetPoolPayload) GetTargetPort() *interface{} { // GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*interface{}, bool) { +func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*int64, bool) { if o == nil || IsNil(o.TargetPort) { return nil, false } @@ -137,8 +136,8 @@ func (o *UpdateTargetPoolPayload) HasTargetPort() bool { return false } -// SetTargetPort gets a reference to the given interface{} and assigns it to the TargetPort field. -func (o *UpdateTargetPoolPayload) SetTargetPort(v *interface{}) { +// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. +func (o *UpdateTargetPoolPayload) SetTargetPort(v *int64) { o.TargetPort = v } @@ -182,7 +181,7 @@ func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.TargetPort != nil { + if !IsNil(o.TargetPort) { toSerialize["targetPort"] = o.TargetPort } if !IsNil(o.Targets) {