diff --git a/CHANGELOG.md b/CHANGELOG.md index 29d4b1ff3..db603e85c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - `iaas`: [v0.11.0](services/iaas/CHANGELOG.md#v0110-2024-10-11) - **Feature:** Filter networks by labels using the new `LabelSelector` method on `ApiListNetworksRequest` - `loadbalancer`: [v0.16.0](services/loadbalancer/CHANGELOG.md#v0160-2024-10-11) -- **Feature:** Add pagination to `ListLoadBalancers` with the new fields `pageSize` and `pageId` on `ApiListLoadBalancersRequest` and the field `NextPageId` in `ListLoadBalancersResponse` + - **Feature:** Add pagination to `ListLoadBalancers` with the new fields `pageSize` and `pageId` on `ApiListLoadBalancersRequest` and the field `NextPageId` in `ListLoadBalancersResponse` ## Release (2024-09-19) diff --git a/services/loadbalancer/CHANGELOG.md b/services/loadbalancer/CHANGELOG.md index dea4324c2..2ecce9547 100644 --- a/services/loadbalancer/CHANGELOG.md +++ b/services/loadbalancer/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.17.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.16.0 (2024-10-11) - **Feature:** Add pagination to `ListLoadBalancers` with the new fields `pageSize` and `pageId` on `ApiListLoadBalancersRequest` and the field `NextPageId` in `ListLoadBalancersResponse` diff --git a/services/loadbalancer/model_active_health_check.go b/services/loadbalancer/model_active_health_check.go index 1a0523264..9723c4011 100644 --- a/services/loadbalancer/model_active_health_check.go +++ b/services/loadbalancer/model_active_health_check.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActiveHealthCheck{} + // ActiveHealthCheck struct for ActiveHealthCheck type ActiveHealthCheck struct { // Healthy threshold of the health checking @@ -23,3 +30,236 @@ type ActiveHealthCheck struct { // Unhealthy threshold of the health checking UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` } + +// NewActiveHealthCheck instantiates a new ActiveHealthCheck 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 NewActiveHealthCheck() *ActiveHealthCheck { + this := ActiveHealthCheck{} + return &this +} + +// NewActiveHealthCheckWithDefaults instantiates a new ActiveHealthCheck 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 NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { + this := ActiveHealthCheck{} + return &this +} + +// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetHealthyThreshold() *int64 { + if o == nil || IsNil(o.HealthyThreshold) { + var ret *int64 + return ret + } + return o.HealthyThreshold +} + +// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*int64, bool) { + if o == nil || IsNil(o.HealthyThreshold) { + return nil, false + } + return o.HealthyThreshold, true +} + +// HasHealthyThreshold returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasHealthyThreshold() bool { + if o != nil && !IsNil(o.HealthyThreshold) { + return true + } + + return false +} + +// SetHealthyThreshold gets a reference to the given int64 and assigns it to the HealthyThreshold field. +func (o *ActiveHealthCheck) SetHealthyThreshold(v *int64) { + o.HealthyThreshold = v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetInterval() *string { + if o == nil || IsNil(o.Interval) { + var ret *string + return ret + } + return o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetIntervalOk() (*string, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given string and assigns it to the Interval field. +func (o *ActiveHealthCheck) SetInterval(v *string) { + o.Interval = v +} + +// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetIntervalJitter() *string { + if o == nil || IsNil(o.IntervalJitter) { + var ret *string + return ret + } + return o.IntervalJitter +} + +// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetIntervalJitterOk() (*string, bool) { + if o == nil || IsNil(o.IntervalJitter) { + return nil, false + } + return o.IntervalJitter, true +} + +// HasIntervalJitter returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasIntervalJitter() bool { + if o != nil && !IsNil(o.IntervalJitter) { + return true + } + + return false +} + +// SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field. +func (o *ActiveHealthCheck) SetIntervalJitter(v *string) { + o.IntervalJitter = v +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetTimeout() *string { + if o == nil || IsNil(o.Timeout) { + var ret *string + return ret + } + return o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.Timeout) { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasTimeout() bool { + if o != nil && !IsNil(o.Timeout) { + return true + } + + return false +} + +// SetTimeout gets a reference to the given string and assigns it to the Timeout field. +func (o *ActiveHealthCheck) SetTimeout(v *string) { + o.Timeout = v +} + +// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. +func (o *ActiveHealthCheck) GetUnhealthyThreshold() *int64 { + if o == nil || IsNil(o.UnhealthyThreshold) { + var ret *int64 + return ret + } + return o.UnhealthyThreshold +} + +// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*int64, bool) { + if o == nil || IsNil(o.UnhealthyThreshold) { + return nil, false + } + return o.UnhealthyThreshold, true +} + +// HasUnhealthyThreshold returns a boolean if a field has been set. +func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { + if o != nil && !IsNil(o.UnhealthyThreshold) { + return true + } + + return false +} + +// 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 !IsNil(o.HealthyThreshold) { + toSerialize["healthyThreshold"] = o.HealthyThreshold + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.IntervalJitter) { + toSerialize["intervalJitter"] = o.IntervalJitter + } + if !IsNil(o.Timeout) { + toSerialize["timeout"] = o.Timeout + } + if !IsNil(o.UnhealthyThreshold) { + toSerialize["unhealthyThreshold"] = o.UnhealthyThreshold + } + return toSerialize, nil +} + +type NullableActiveHealthCheck struct { + value *ActiveHealthCheck + isSet bool +} + +func (v NullableActiveHealthCheck) Get() *ActiveHealthCheck { + return v.value +} + +func (v *NullableActiveHealthCheck) Set(val *ActiveHealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableActiveHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableActiveHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActiveHealthCheck(val *ActiveHealthCheck) *NullableActiveHealthCheck { + return &NullableActiveHealthCheck{value: val, isSet: true} +} + +func (v NullableActiveHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActiveHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_create_credentials_payload.go b/services/loadbalancer/model_create_credentials_payload.go index 9b87978f3..7cef67795 100644 --- a/services/loadbalancer/model_create_credentials_payload.go +++ b/services/loadbalancer/model_create_credentials_payload.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsPayload{} + // CreateCredentialsPayload struct for CreateCredentialsPayload type CreateCredentialsPayload struct { // Credential name @@ -19,3 +26,166 @@ type CreateCredentialsPayload struct { // A valid username used for an existing ARGUS instance, which is used during basic auth. Username *string `json:"username,omitempty"` } + +// NewCreateCredentialsPayload instantiates a new CreateCredentialsPayload 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 NewCreateCredentialsPayload() *CreateCredentialsPayload { + this := CreateCredentialsPayload{} + return &this +} + +// NewCreateCredentialsPayloadWithDefaults instantiates a new CreateCredentialsPayload 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 NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload { + this := CreateCredentialsPayload{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetDisplayName() *string { + if o == nil || IsNil(o.DisplayName) { + var ret *string + return ret + } + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CreateCredentialsPayload) SetDisplayName(v *string) { + o.DisplayName = v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetPassword() *string { + if o == nil || IsNil(o.Password) { + var ret *string + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *CreateCredentialsPayload) SetPassword(v *string) { + o.Password = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateCredentialsPayload) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateCredentialsPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateCredentialsPayload) SetUsername(v *string) { + o.Username = v +} + +func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCreateCredentialsPayload struct { + value *CreateCredentialsPayload + isSet bool +} + +func (v NullableCreateCredentialsPayload) Get() *CreateCredentialsPayload { + return v.value +} + +func (v *NullableCreateCredentialsPayload) Set(val *CreateCredentialsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsPayload(val *CreateCredentialsPayload) *NullableCreateCredentialsPayload { + return &NullableCreateCredentialsPayload{value: val, isSet: true} +} + +func (v NullableCreateCredentialsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_create_credentials_response.go b/services/loadbalancer/model_create_credentials_response.go index d0b80d534..52d0e3f96 100644 --- a/services/loadbalancer/model_create_credentials_response.go +++ b/services/loadbalancer/model_create_credentials_response.go @@ -10,7 +10,107 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsResponse{} + // CreateCredentialsResponse struct for CreateCredentialsResponse type CreateCredentialsResponse struct { Credential *CredentialsResponse `json:"credential,omitempty"` } + +// NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponse() *CreateCredentialsResponse { + this := CreateCredentialsResponse{} + return &this +} + +// NewCreateCredentialsResponseWithDefaults instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { + this := CreateCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *CreateCredentialsResponse) GetCredential() *CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret *CredentialsResponse + return ret + } + return o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *CreateCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *CreateCredentialsResponse) SetCredential(v *CredentialsResponse) { + o.Credential = v +} + +func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableCreateCredentialsResponse struct { + value *CreateCredentialsResponse + isSet bool +} + +func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse { + return v.value +} + +func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse { + return &NullableCreateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCreateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_create_load_balancer_payload.go b/services/loadbalancer/model_create_load_balancer_payload.go index 217b9f550..f1b14ca2d 100644 --- a/services/loadbalancer/model_create_load_balancer_payload.go +++ b/services/loadbalancer/model_create_load_balancer_payload.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLoadBalancerPayload{} + // CreateLoadBalancerPayload struct for CreateLoadBalancerPayload type CreateLoadBalancerPayload struct { // Reports all errors a load balancer has. @@ -33,3 +40,446 @@ type CreateLoadBalancerPayload struct { // 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 load balancer resource that changes during updates of the load balancers. On updates this field specified the 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 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 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 *string `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 +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetErrors() *[]LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret *[]LoadBalancerError + return ret + } + return o.Errors +} + +// 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() (*[]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *CreateLoadBalancerPayload) SetErrors(v *[]LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetExternalAddress() *string { + if o == nil || IsNil(o.ExternalAddress) { + var ret *string + return ret + } + return o.ExternalAddress +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *CreateLoadBalancerPayload) SetExternalAddress(v *string) { + o.ExternalAddress = v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetListeners() *[]Listener { + if o == nil || IsNil(o.Listeners) { + var ret *[]Listener + return ret + } + return o.Listeners +} + +// 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() (*[]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *CreateLoadBalancerPayload) SetListeners(v *[]Listener) { + o.Listeners = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateLoadBalancerPayload) SetName(v *string) { + o.Name = v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetNetworks() *[]Network { + if o == nil || IsNil(o.Networks) { + var ret *[]Network + return ret + } + return o.Networks +} + +// 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() (*[]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *CreateLoadBalancerPayload) SetNetworks(v *[]Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetOptions() *LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret *LoadBalancerOptions + return ret + } + return o.Options +} + +// 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() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *CreateLoadBalancerPayload) SetOptions(v *LoadBalancerOptions) { + o.Options = v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetPlanId() *string { + if o == nil || IsNil(o.PlanId) { + var ret *string + return ret + } + return o.PlanId +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *CreateLoadBalancerPayload) SetPlanId(v *string) { + o.PlanId = v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetPrivateAddress() *string { + if o == nil || IsNil(o.PrivateAddress) { + var ret *string + return ret + } + return o.PrivateAddress +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *CreateLoadBalancerPayload) SetPrivateAddress(v *string) { + o.PrivateAddress = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CreateLoadBalancerPayload) SetStatus(v *string) { + o.Status = v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetTargetPools() *[]TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret *[]TargetPool + return ret + } + return o.TargetPools +} + +// 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() (*[]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *CreateLoadBalancerPayload) SetTargetPools(v *[]TargetPool) { + o.TargetPools = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CreateLoadBalancerPayload) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CreateLoadBalancerPayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CreateLoadBalancerPayload) SetVersion(v *string) { + o.Version = v +} + +func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + 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) +} diff --git a/services/loadbalancer/model_credentials_response.go b/services/loadbalancer/model_credentials_response.go index d5269396e..8ebc7dd36 100644 --- a/services/loadbalancer/model_credentials_response.go +++ b/services/loadbalancer/model_credentials_response.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsResponse{} + // CredentialsResponse struct for CredentialsResponse type CredentialsResponse struct { // The credentials reference can be used for observability of the Load Balancer. @@ -19,3 +26,166 @@ type CredentialsResponse struct { // The username used for the ARGUS instance Username *string `json:"username,omitempty"` } + +// NewCredentialsResponse instantiates a new CredentialsResponse 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 NewCredentialsResponse() *CredentialsResponse { + this := CredentialsResponse{} + return &this +} + +// NewCredentialsResponseWithDefaults instantiates a new CredentialsResponse 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 NewCredentialsResponseWithDefaults() *CredentialsResponse { + this := CredentialsResponse{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *CredentialsResponse) GetCredentialsRef() *string { + if o == nil || IsNil(o.CredentialsRef) { + var ret *string + return ret + } + return o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *CredentialsResponse) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *CredentialsResponse) SetCredentialsRef(v *string) { + o.CredentialsRef = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CredentialsResponse) GetDisplayName() *string { + if o == nil || IsNil(o.DisplayName) { + var ret *string + return ret + } + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CredentialsResponse) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CredentialsResponse) SetDisplayName(v *string) { + o.DisplayName = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CredentialsResponse) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsResponse) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CredentialsResponse) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CredentialsResponse) SetUsername(v *string) { + o.Username = v +} + +func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCredentialsResponse struct { + value *CredentialsResponse + isSet bool +} + +func (v NullableCredentialsResponse) Get() *CredentialsResponse { + return v.value +} + +func (v *NullableCredentialsResponse) Set(val *CredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsResponse(val *CredentialsResponse) *NullableCredentialsResponse { + return &NullableCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_get_credentials_response.go b/services/loadbalancer/model_get_credentials_response.go index da692f18f..bdc347f15 100644 --- a/services/loadbalancer/model_get_credentials_response.go +++ b/services/loadbalancer/model_get_credentials_response.go @@ -10,7 +10,107 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCredentialsResponse{} + // GetCredentialsResponse struct for GetCredentialsResponse type GetCredentialsResponse struct { Credential *CredentialsResponse `json:"credential,omitempty"` } + +// NewGetCredentialsResponse instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponse() *GetCredentialsResponse { + this := GetCredentialsResponse{} + return &this +} + +// NewGetCredentialsResponseWithDefaults instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { + this := GetCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *GetCredentialsResponse) GetCredential() *CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret *CredentialsResponse + return ret + } + return o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *GetCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *GetCredentialsResponse) SetCredential(v *CredentialsResponse) { + o.Credential = v +} + +func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableGetCredentialsResponse struct { + value *GetCredentialsResponse + isSet bool +} + +func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse { + return v.value +} + +func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse { + return &NullableGetCredentialsResponse{value: val, isSet: true} +} + +func (v NullableGetCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_get_quota_response.go b/services/loadbalancer/model_get_quota_response.go index 2739001b0..151573abb 100644 --- a/services/loadbalancer/model_get_quota_response.go +++ b/services/loadbalancer/model_get_quota_response.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time +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. @@ -18,3 +25,131 @@ type GetQuotaResponse struct { // Project identifier ProjectId *string `json:"projectId,omitempty"` } + +// NewGetQuotaResponse instantiates a new GetQuotaResponse 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 NewGetQuotaResponse() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// NewGetQuotaResponseWithDefaults instantiates a new GetQuotaResponse 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 NewGetQuotaResponseWithDefaults() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetMaxLoadBalancers() *int64 { + if o == nil || IsNil(o.MaxLoadBalancers) { + var ret *int64 + return ret + } + return o.MaxLoadBalancers +} + +// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*int64, bool) { + if o == nil || IsNil(o.MaxLoadBalancers) { + return nil, false + } + return o.MaxLoadBalancers, true +} + +// HasMaxLoadBalancers returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { + if o != nil && !IsNil(o.MaxLoadBalancers) { + return true + } + + return false +} + +// SetMaxLoadBalancers gets a reference to the given int64 and assigns it to the MaxLoadBalancers field. +func (o *GetQuotaResponse) SetMaxLoadBalancers(v *int64) { + o.MaxLoadBalancers = v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetProjectId() *string { + if o == nil || IsNil(o.ProjectId) { + var ret *string + return ret + } + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GetQuotaResponse) SetProjectId(v *string) { + o.ProjectId = v +} + +func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MaxLoadBalancers) { + toSerialize["maxLoadBalancers"] = o.MaxLoadBalancers + } + if !IsNil(o.ProjectId) { + toSerialize["projectId"] = o.ProjectId + } + return toSerialize, nil +} + +type NullableGetQuotaResponse struct { + value *GetQuotaResponse + isSet bool +} + +func (v NullableGetQuotaResponse) Get() *GetQuotaResponse { + return v.value +} + +func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetQuotaResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetQuotaResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse { + return &NullableGetQuotaResponse{value: val, isSet: true} +} + +func (v NullableGetQuotaResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_get_service_status_response.go b/services/loadbalancer/model_get_service_status_response.go index 6e611f448..43ccd1c42 100644 --- a/services/loadbalancer/model_get_service_status_response.go +++ b/services/loadbalancer/model_get_service_status_response.go @@ -10,8 +10,108 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the GetServiceStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetServiceStatusResponse{} + // GetServiceStatusResponse Response with customer project status. type GetServiceStatusResponse struct { // status of the project Status *string `json:"status,omitempty"` } + +// NewGetServiceStatusResponse instantiates a new GetServiceStatusResponse 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 NewGetServiceStatusResponse() *GetServiceStatusResponse { + this := GetServiceStatusResponse{} + return &this +} + +// NewGetServiceStatusResponseWithDefaults instantiates a new GetServiceStatusResponse 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 NewGetServiceStatusResponseWithDefaults() *GetServiceStatusResponse { + this := GetServiceStatusResponse{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetServiceStatusResponse) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *GetServiceStatusResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetServiceStatusResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *GetServiceStatusResponse) SetStatus(v *string) { + o.Status = v +} + +func (o GetServiceStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableGetServiceStatusResponse struct { + value *GetServiceStatusResponse + isSet bool +} + +func (v NullableGetServiceStatusResponse) Get() *GetServiceStatusResponse { + return v.value +} + +func (v *NullableGetServiceStatusResponse) Set(val *GetServiceStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetServiceStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetServiceStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetServiceStatusResponse(val *GetServiceStatusResponse) *NullableGetServiceStatusResponse { + return &NullableGetServiceStatusResponse{value: val, isSet: true} +} + +func (v NullableGetServiceStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetServiceStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_google_protobuf_any.go b/services/loadbalancer/model_google_protobuf_any.go index c4949b5da..9b9017fdc 100644 --- a/services/loadbalancer/model_google_protobuf_any.go +++ b/services/loadbalancer/model_google_protobuf_any.go @@ -10,9 +10,116 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GoogleProtobufAny{} + // GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. type GoogleProtobufAny struct { // The type of the serialized message. Type *string `json:"@type,omitempty"` AdditionalProperties map[string]interface{} } + +type _GoogleProtobufAny GoogleProtobufAny + +// NewGoogleProtobufAny instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAny() *GoogleProtobufAny { + this := GoogleProtobufAny{} + return &this +} + +// NewGoogleProtobufAnyWithDefaults instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { + this := GoogleProtobufAny{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GoogleProtobufAny) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleProtobufAny) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GoogleProtobufAny) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GoogleProtobufAny) SetType(v *string) { + o.Type = v +} + +func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["@type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +type NullableGoogleProtobufAny struct { + value *GoogleProtobufAny + isSet bool +} + +func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny { + return v.value +} + +func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) { + v.value = val + v.isSet = true +} + +func (v NullableGoogleProtobufAny) IsSet() bool { + return v.isSet +} + +func (v *NullableGoogleProtobufAny) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny { + return &NullableGoogleProtobufAny{value: val, isSet: true} +} + +func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_list_credentials_response.go b/services/loadbalancer/model_list_credentials_response.go index d14dbd069..0aea8d165 100644 --- a/services/loadbalancer/model_list_credentials_response.go +++ b/services/loadbalancer/model_list_credentials_response.go @@ -10,7 +10,107 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCredentialsResponse{} + // ListCredentialsResponse struct for ListCredentialsResponse type ListCredentialsResponse struct { Credentials *[]CredentialsResponse `json:"credentials,omitempty"` } + +// NewListCredentialsResponse instantiates a new ListCredentialsResponse 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 NewListCredentialsResponse() *ListCredentialsResponse { + this := ListCredentialsResponse{} + return &this +} + +// NewListCredentialsResponseWithDefaults instantiates a new ListCredentialsResponse 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 NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { + this := ListCredentialsResponse{} + return &this +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *ListCredentialsResponse) GetCredentials() *[]CredentialsResponse { + if o == nil || IsNil(o.Credentials) { + var ret *[]CredentialsResponse + return ret + } + return o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCredentialsResponse) GetCredentialsOk() (*[]CredentialsResponse, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *ListCredentialsResponse) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field. +func (o *ListCredentialsResponse) SetCredentials(v *[]CredentialsResponse) { + o.Credentials = v +} + +func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + return toSerialize, nil +} + +type NullableListCredentialsResponse struct { + value *ListCredentialsResponse + isSet bool +} + +func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse { + return v.value +} + +func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse { + return &NullableListCredentialsResponse{value: val, isSet: true} +} + +func (v NullableListCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_list_load_balancers_response.go b/services/loadbalancer/model_list_load_balancers_response.go index cea30af9a..2d1bab055 100644 --- a/services/loadbalancer/model_list_load_balancers_response.go +++ b/services/loadbalancer/model_list_load_balancers_response.go @@ -10,9 +10,144 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListLoadBalancersResponse{} + // ListLoadBalancersResponse struct for ListLoadBalancersResponse type ListLoadBalancersResponse struct { LoadBalancers *[]LoadBalancer `json:"loadBalancers,omitempty"` // Continue token from the ListLoadBalancerResponse with Limit option NextPageId *string `json:"nextPageId,omitempty"` } + +// NewListLoadBalancersResponse instantiates a new ListLoadBalancersResponse 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 NewListLoadBalancersResponse() *ListLoadBalancersResponse { + this := ListLoadBalancersResponse{} + return &this +} + +// NewListLoadBalancersResponseWithDefaults instantiates a new ListLoadBalancersResponse 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 NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse { + this := ListLoadBalancersResponse{} + return &this +} + +// GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise. +func (o *ListLoadBalancersResponse) GetLoadBalancers() *[]LoadBalancer { + if o == nil || IsNil(o.LoadBalancers) { + var ret *[]LoadBalancer + return ret + } + return o.LoadBalancers +} + +// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLoadBalancersResponse) GetLoadBalancersOk() (*[]LoadBalancer, bool) { + if o == nil || IsNil(o.LoadBalancers) { + return nil, false + } + return o.LoadBalancers, true +} + +// HasLoadBalancers returns a boolean if a field has been set. +func (o *ListLoadBalancersResponse) HasLoadBalancers() bool { + if o != nil && !IsNil(o.LoadBalancers) { + return true + } + + return false +} + +// SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field. +func (o *ListLoadBalancersResponse) SetLoadBalancers(v *[]LoadBalancer) { + o.LoadBalancers = v +} + +// GetNextPageId returns the NextPageId field value if set, zero value otherwise. +func (o *ListLoadBalancersResponse) GetNextPageId() *string { + if o == nil || IsNil(o.NextPageId) { + var ret *string + return ret + } + return o.NextPageId +} + +// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLoadBalancersResponse) GetNextPageIdOk() (*string, bool) { + if o == nil || IsNil(o.NextPageId) { + return nil, false + } + return o.NextPageId, true +} + +// HasNextPageId returns a boolean if a field has been set. +func (o *ListLoadBalancersResponse) HasNextPageId() bool { + if o != nil && !IsNil(o.NextPageId) { + return true + } + + return false +} + +// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field. +func (o *ListLoadBalancersResponse) SetNextPageId(v *string) { + o.NextPageId = v +} + +func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancers) { + toSerialize["loadBalancers"] = o.LoadBalancers + } + if !IsNil(o.NextPageId) { + toSerialize["nextPageId"] = o.NextPageId + } + return toSerialize, nil +} + +type NullableListLoadBalancersResponse struct { + value *ListLoadBalancersResponse + isSet bool +} + +func (v NullableListLoadBalancersResponse) Get() *ListLoadBalancersResponse { + return v.value +} + +func (v *NullableListLoadBalancersResponse) Set(val *ListLoadBalancersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListLoadBalancersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListLoadBalancersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListLoadBalancersResponse(val *ListLoadBalancersResponse) *NullableListLoadBalancersResponse { + return &NullableListLoadBalancersResponse{value: val, isSet: true} +} + +func (v NullableListLoadBalancersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListLoadBalancersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_list_plans_response.go b/services/loadbalancer/model_list_plans_response.go index 35a9abfbe..58be65a34 100644 --- a/services/loadbalancer/model_list_plans_response.go +++ b/services/loadbalancer/model_list_plans_response.go @@ -10,7 +10,107 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPlansResponse{} + // ListPlansResponse struct for ListPlansResponse type ListPlansResponse struct { ValidPlans *[]PlanDetails `json:"validPlans,omitempty"` } + +// NewListPlansResponse instantiates a new ListPlansResponse 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 NewListPlansResponse() *ListPlansResponse { + this := ListPlansResponse{} + return &this +} + +// NewListPlansResponseWithDefaults instantiates a new ListPlansResponse 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 NewListPlansResponseWithDefaults() *ListPlansResponse { + this := ListPlansResponse{} + return &this +} + +// GetValidPlans returns the ValidPlans field value if set, zero value otherwise. +func (o *ListPlansResponse) GetValidPlans() *[]PlanDetails { + if o == nil || IsNil(o.ValidPlans) { + var ret *[]PlanDetails + return ret + } + return o.ValidPlans +} + +// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListPlansResponse) GetValidPlansOk() (*[]PlanDetails, bool) { + if o == nil || IsNil(o.ValidPlans) { + return nil, false + } + return o.ValidPlans, true +} + +// HasValidPlans returns a boolean if a field has been set. +func (o *ListPlansResponse) HasValidPlans() bool { + if o != nil && !IsNil(o.ValidPlans) { + return true + } + + return false +} + +// SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field. +func (o *ListPlansResponse) SetValidPlans(v *[]PlanDetails) { + o.ValidPlans = v +} + +func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ValidPlans) { + toSerialize["validPlans"] = o.ValidPlans + } + return toSerialize, nil +} + +type NullableListPlansResponse struct { + value *ListPlansResponse + isSet bool +} + +func (v NullableListPlansResponse) Get() *ListPlansResponse { + return v.value +} + +func (v *NullableListPlansResponse) Set(val *ListPlansResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListPlansResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListPlansResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListPlansResponse(val *ListPlansResponse) *NullableListPlansResponse { + return &NullableListPlansResponse{value: val, isSet: true} +} + +func (v NullableListPlansResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListPlansResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_listener.go b/services/loadbalancer/model_listener.go index b2887cec1..2c3833a23 100644 --- a/services/loadbalancer/model_listener.go +++ b/services/loadbalancer/model_listener.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the Listener type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Listener{} + // Listener struct for Listener type Listener struct { DisplayName *string `json:"displayName,omitempty"` @@ -27,3 +34,341 @@ type Listener struct { Tcp *OptionsTCP `json:"tcp,omitempty"` Udp *OptionsUDP `json:"udp,omitempty"` } + +// NewListener instantiates a new Listener 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 NewListener() *Listener { + this := Listener{} + return &this +} + +// NewListenerWithDefaults instantiates a new Listener 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 NewListenerWithDefaults() *Listener { + this := Listener{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Listener) GetDisplayName() *string { + if o == nil || IsNil(o.DisplayName) { + var ret *string + return ret + } + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Listener) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Listener) SetDisplayName(v *string) { + o.DisplayName = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Listener) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *Listener) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Listener) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Listener) SetName(v *string) { + o.Name = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *Listener) GetPort() *int64 { + if o == nil || IsNil(o.Port) { + var ret *int64 + return ret + } + return o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *Listener) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *Listener) SetPort(v *int64) { + o.Port = v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *Listener) GetProtocol() *string { + if o == nil || IsNil(o.Protocol) { + var ret *string + return ret + } + return o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *Listener) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *Listener) SetProtocol(v *string) { + o.Protocol = v +} + +// GetServerNameIndicators returns the ServerNameIndicators field value if set, zero value otherwise. +func (o *Listener) GetServerNameIndicators() *[]ServerNameIndicator { + if o == nil || IsNil(o.ServerNameIndicators) { + var ret *[]ServerNameIndicator + return ret + } + return o.ServerNameIndicators +} + +// GetServerNameIndicatorsOk returns a tuple with the ServerNameIndicators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetServerNameIndicatorsOk() (*[]ServerNameIndicator, bool) { + if o == nil || IsNil(o.ServerNameIndicators) { + return nil, false + } + return o.ServerNameIndicators, true +} + +// HasServerNameIndicators returns a boolean if a field has been set. +func (o *Listener) HasServerNameIndicators() bool { + if o != nil && !IsNil(o.ServerNameIndicators) { + return true + } + + return false +} + +// SetServerNameIndicators gets a reference to the given []ServerNameIndicator and assigns it to the ServerNameIndicators field. +func (o *Listener) SetServerNameIndicators(v *[]ServerNameIndicator) { + o.ServerNameIndicators = v +} + +// GetTargetPool returns the TargetPool field value if set, zero value otherwise. +func (o *Listener) GetTargetPool() *string { + if o == nil || IsNil(o.TargetPool) { + var ret *string + return ret + } + return o.TargetPool +} + +// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetTargetPoolOk() (*string, bool) { + if o == nil || IsNil(o.TargetPool) { + return nil, false + } + return o.TargetPool, true +} + +// HasTargetPool returns a boolean if a field has been set. +func (o *Listener) HasTargetPool() bool { + if o != nil && !IsNil(o.TargetPool) { + return true + } + + return false +} + +// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. +func (o *Listener) SetTargetPool(v *string) { + o.TargetPool = v +} + +// GetTcp returns the Tcp field value if set, zero value otherwise. +func (o *Listener) GetTcp() *OptionsTCP { + if o == nil || IsNil(o.Tcp) { + var ret *OptionsTCP + return ret + } + return o.Tcp +} + +// GetTcpOk returns a tuple with the Tcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetTcpOk() (*OptionsTCP, bool) { + if o == nil || IsNil(o.Tcp) { + return nil, false + } + return o.Tcp, true +} + +// HasTcp returns a boolean if a field has been set. +func (o *Listener) HasTcp() bool { + if o != nil && !IsNil(o.Tcp) { + return true + } + + return false +} + +// SetTcp gets a reference to the given OptionsTCP and assigns it to the Tcp field. +func (o *Listener) SetTcp(v *OptionsTCP) { + o.Tcp = v +} + +// GetUdp returns the Udp field value if set, zero value otherwise. +func (o *Listener) GetUdp() *OptionsUDP { + if o == nil || IsNil(o.Udp) { + var ret *OptionsUDP + return ret + } + return o.Udp +} + +// GetUdpOk returns a tuple with the Udp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Listener) GetUdpOk() (*OptionsUDP, bool) { + if o == nil || IsNil(o.Udp) { + return nil, false + } + return o.Udp, true +} + +// HasUdp returns a boolean if a field has been set. +func (o *Listener) HasUdp() bool { + if o != nil && !IsNil(o.Udp) { + return true + } + + return false +} + +// SetUdp gets a reference to the given OptionsUDP and assigns it to the Udp field. +func (o *Listener) SetUdp(v *OptionsUDP) { + o.Udp = v +} + +func (o Listener) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.ServerNameIndicators) { + toSerialize["serverNameIndicators"] = o.ServerNameIndicators + } + if !IsNil(o.TargetPool) { + toSerialize["targetPool"] = o.TargetPool + } + if !IsNil(o.Tcp) { + toSerialize["tcp"] = o.Tcp + } + if !IsNil(o.Udp) { + toSerialize["udp"] = o.Udp + } + return toSerialize, nil +} + +type NullableListener struct { + value *Listener + isSet bool +} + +func (v NullableListener) Get() *Listener { + return v.value +} + +func (v *NullableListener) Set(val *Listener) { + v.value = val + v.isSet = true +} + +func (v NullableListener) IsSet() bool { + return v.isSet +} + +func (v *NullableListener) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListener(val *Listener) *NullableListener { + return &NullableListener{value: val, isSet: true} +} + +func (v NullableListener) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListener) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_load_balancer.go b/services/loadbalancer/model_load_balancer.go index 0a61a65df..75755a369 100644 --- a/services/loadbalancer/model_load_balancer.go +++ b/services/loadbalancer/model_load_balancer.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancer{} + // LoadBalancer struct for LoadBalancer type LoadBalancer struct { // Reports all errors a load balancer has. @@ -33,3 +40,446 @@ type LoadBalancer struct { // 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 load balancer resource that changes during updates of the load balancers. On updates this field specified the 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 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 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 *string `json:"version,omitempty"` } + +// NewLoadBalancer instantiates a new LoadBalancer 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 NewLoadBalancer() *LoadBalancer { + this := LoadBalancer{} + return &this +} + +// NewLoadBalancerWithDefaults instantiates a new LoadBalancer 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 NewLoadBalancerWithDefaults() *LoadBalancer { + this := LoadBalancer{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *LoadBalancer) GetErrors() *[]LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret *[]LoadBalancerError + return ret + } + return o.Errors +} + +// 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 *LoadBalancer) GetErrorsOk() (*[]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *LoadBalancer) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *LoadBalancer) SetErrors(v *[]LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *LoadBalancer) GetExternalAddress() *string { + if o == nil || IsNil(o.ExternalAddress) { + var ret *string + return ret + } + return o.ExternalAddress +} + +// 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 *LoadBalancer) GetExternalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *LoadBalancer) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *LoadBalancer) SetExternalAddress(v *string) { + o.ExternalAddress = v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *LoadBalancer) GetListeners() *[]Listener { + if o == nil || IsNil(o.Listeners) { + var ret *[]Listener + return ret + } + return o.Listeners +} + +// 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 *LoadBalancer) GetListenersOk() (*[]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *LoadBalancer) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *LoadBalancer) SetListeners(v *[]Listener) { + o.Listeners = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancer) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *LoadBalancer) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LoadBalancer) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LoadBalancer) SetName(v *string) { + o.Name = v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *LoadBalancer) GetNetworks() *[]Network { + if o == nil || IsNil(o.Networks) { + var ret *[]Network + return ret + } + return o.Networks +} + +// 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 *LoadBalancer) GetNetworksOk() (*[]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *LoadBalancer) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *LoadBalancer) SetNetworks(v *[]Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *LoadBalancer) GetOptions() *LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret *LoadBalancerOptions + return ret + } + return o.Options +} + +// 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 *LoadBalancer) GetOptionsOk() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *LoadBalancer) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *LoadBalancer) SetOptions(v *LoadBalancerOptions) { + o.Options = v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *LoadBalancer) GetPlanId() *string { + if o == nil || IsNil(o.PlanId) { + var ret *string + return ret + } + return o.PlanId +} + +// 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 *LoadBalancer) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *LoadBalancer) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *LoadBalancer) SetPlanId(v *string) { + o.PlanId = v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *LoadBalancer) GetPrivateAddress() *string { + if o == nil || IsNil(o.PrivateAddress) { + var ret *string + return ret + } + return o.PrivateAddress +} + +// 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 *LoadBalancer) GetPrivateAddressOk() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *LoadBalancer) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *LoadBalancer) SetPrivateAddress(v *string) { + o.PrivateAddress = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LoadBalancer) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *LoadBalancer) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *LoadBalancer) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *LoadBalancer) SetStatus(v *string) { + o.Status = v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *LoadBalancer) GetTargetPools() *[]TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret *[]TargetPool + return ret + } + return o.TargetPools +} + +// 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 *LoadBalancer) GetTargetPoolsOk() (*[]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *LoadBalancer) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *LoadBalancer) SetTargetPools(v *[]TargetPool) { + o.TargetPools = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *LoadBalancer) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// 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 *LoadBalancer) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *LoadBalancer) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *LoadBalancer) SetVersion(v *string) { + o.Version = v +} + +func (o LoadBalancer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableLoadBalancer struct { + value *LoadBalancer + isSet bool +} + +func (v NullableLoadBalancer) Get() *LoadBalancer { + return v.value +} + +func (v *NullableLoadBalancer) Set(val *LoadBalancer) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancer) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer { + return &NullableLoadBalancer{value: val, isSet: true} +} + +func (v NullableLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_load_balancer_error.go b/services/loadbalancer/model_load_balancer_error.go index bdc17aa37..dc8361fe7 100644 --- a/services/loadbalancer/model_load_balancer_error.go +++ b/services/loadbalancer/model_load_balancer_error.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerError{} + // LoadBalancerError struct for LoadBalancerError type LoadBalancerError struct { // The error description contains additional helpful user information to fix the error state of the load balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP \"45.135.247.139\" could not be found or if the IP was deleted then you will get a proper error message. @@ -17,3 +24,131 @@ type LoadBalancerError struct { // The error type specifies which part of the load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error or TYPE_FIP_NOT_FOUND if the IP was deleted. Type *string `json:"type,omitempty"` } + +// NewLoadBalancerError instantiates a new LoadBalancerError 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 NewLoadBalancerError() *LoadBalancerError { + this := LoadBalancerError{} + return &this +} + +// NewLoadBalancerErrorWithDefaults instantiates a new LoadBalancerError 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 NewLoadBalancerErrorWithDefaults() *LoadBalancerError { + this := LoadBalancerError{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancerError) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerError) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *LoadBalancerError) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *LoadBalancerError) SetDescription(v *string) { + o.Description = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LoadBalancerError) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerError) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *LoadBalancerError) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *LoadBalancerError) SetType(v *string) { + o.Type = v +} + +func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableLoadBalancerError struct { + value *LoadBalancerError + isSet bool +} + +func (v NullableLoadBalancerError) Get() *LoadBalancerError { + return v.value +} + +func (v *NullableLoadBalancerError) Set(val *LoadBalancerError) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerError) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerError(val *LoadBalancerError) *NullableLoadBalancerError { + return &NullableLoadBalancerError{value: val, isSet: true} +} + +func (v NullableLoadBalancerError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_load_balancer_options.go b/services/loadbalancer/model_load_balancer_options.go index c7094947f..076177cb8 100644 --- a/services/loadbalancer/model_load_balancer_options.go +++ b/services/loadbalancer/model_load_balancer_options.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOptions{} + // LoadBalancerOptions Defines any optional functionality you want to have enabled on your load balancer. type LoadBalancerOptions struct { AccessControl *LoadbalancerOptionAccessControl `json:"accessControl,omitempty"` @@ -18,3 +25,201 @@ type LoadBalancerOptions struct { // Load Balancer is accessible only via a private network ip address. Not changeable after creation. PrivateNetworkOnly *bool `json:"privateNetworkOnly,omitempty"` } + +// NewLoadBalancerOptions instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptions() *LoadBalancerOptions { + this := LoadBalancerOptions{} + return &this +} + +// NewLoadBalancerOptionsWithDefaults instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions { + this := LoadBalancerOptions{} + return &this +} + +// GetAccessControl returns the AccessControl field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetAccessControl() *LoadbalancerOptionAccessControl { + if o == nil || IsNil(o.AccessControl) { + var ret *LoadbalancerOptionAccessControl + return ret + } + return o.AccessControl +} + +// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetAccessControlOk() (*LoadbalancerOptionAccessControl, bool) { + if o == nil || IsNil(o.AccessControl) { + return nil, false + } + return o.AccessControl, true +} + +// HasAccessControl returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasAccessControl() bool { + if o != nil && !IsNil(o.AccessControl) { + return true + } + + return false +} + +// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field. +func (o *LoadBalancerOptions) SetAccessControl(v *LoadbalancerOptionAccessControl) { + o.AccessControl = v +} + +// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetEphemeralAddress() *bool { + if o == nil || IsNil(o.EphemeralAddress) { + var ret *bool + return ret + } + return o.EphemeralAddress +} + +// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetEphemeralAddressOk() (*bool, bool) { + if o == nil || IsNil(o.EphemeralAddress) { + return nil, false + } + return o.EphemeralAddress, true +} + +// HasEphemeralAddress returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasEphemeralAddress() bool { + if o != nil && !IsNil(o.EphemeralAddress) { + return true + } + + return false +} + +// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field. +func (o *LoadBalancerOptions) SetEphemeralAddress(v *bool) { + o.EphemeralAddress = v +} + +// GetObservability returns the Observability field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetObservability() *LoadbalancerOptionObservability { + if o == nil || IsNil(o.Observability) { + var ret *LoadbalancerOptionObservability + return ret + } + return o.Observability +} + +// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetObservabilityOk() (*LoadbalancerOptionObservability, bool) { + if o == nil || IsNil(o.Observability) { + return nil, false + } + return o.Observability, true +} + +// HasObservability returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasObservability() bool { + if o != nil && !IsNil(o.Observability) { + return true + } + + return false +} + +// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field. +func (o *LoadBalancerOptions) SetObservability(v *LoadbalancerOptionObservability) { + o.Observability = v +} + +// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. +func (o *LoadBalancerOptions) GetPrivateNetworkOnly() *bool { + if o == nil || IsNil(o.PrivateNetworkOnly) { + var ret *bool + return ret + } + return o.PrivateNetworkOnly +} + +// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.PrivateNetworkOnly) { + return nil, false + } + return o.PrivateNetworkOnly, true +} + +// HasPrivateNetworkOnly returns a boolean if a field has been set. +func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool { + if o != nil && !IsNil(o.PrivateNetworkOnly) { + return true + } + + return false +} + +// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field. +func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v *bool) { + o.PrivateNetworkOnly = v +} + +func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessControl) { + toSerialize["accessControl"] = o.AccessControl + } + if !IsNil(o.EphemeralAddress) { + toSerialize["ephemeralAddress"] = o.EphemeralAddress + } + if !IsNil(o.Observability) { + toSerialize["observability"] = o.Observability + } + if !IsNil(o.PrivateNetworkOnly) { + toSerialize["privateNetworkOnly"] = o.PrivateNetworkOnly + } + return toSerialize, nil +} + +type NullableLoadBalancerOptions struct { + value *LoadBalancerOptions + isSet bool +} + +func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions { + return v.value +} + +func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions { + return &NullableLoadBalancerOptions{value: val, isSet: true} +} + +func (v NullableLoadBalancerOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_loadbalancer_option_access_control.go b/services/loadbalancer/model_loadbalancer_option_access_control.go index 4e6e7ccd3..16700f0a6 100644 --- a/services/loadbalancer/model_loadbalancer_option_access_control.go +++ b/services/loadbalancer/model_loadbalancer_option_access_control.go @@ -10,8 +10,108 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionAccessControl{} + // LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the load balancer. type LoadbalancerOptionAccessControl struct { // Load Balancer is accessible only from an IP address in this range AllowedSourceRanges *[]string `json:"allowedSourceRanges,omitempty"` } + +// NewLoadbalancerOptionAccessControl instantiates a new LoadbalancerOptionAccessControl 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 NewLoadbalancerOptionAccessControl() *LoadbalancerOptionAccessControl { + this := LoadbalancerOptionAccessControl{} + return &this +} + +// NewLoadbalancerOptionAccessControlWithDefaults instantiates a new LoadbalancerOptionAccessControl 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 NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessControl { + this := LoadbalancerOptionAccessControl{} + return &this +} + +// GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise. +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() *[]string { + if o == nil || IsNil(o.AllowedSourceRanges) { + var ret *[]string + return ret + } + return o.AllowedSourceRanges +} + +// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() (*[]string, bool) { + if o == nil || IsNil(o.AllowedSourceRanges) { + return nil, false + } + return o.AllowedSourceRanges, true +} + +// HasAllowedSourceRanges returns a boolean if a field has been set. +func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool { + if o != nil && !IsNil(o.AllowedSourceRanges) { + return true + } + + return false +} + +// SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field. +func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v *[]string) { + o.AllowedSourceRanges = v +} + +func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedSourceRanges) { + toSerialize["allowedSourceRanges"] = o.AllowedSourceRanges + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionAccessControl struct { + value *LoadbalancerOptionAccessControl + isSet bool +} + +func (v NullableLoadbalancerOptionAccessControl) Get() *LoadbalancerOptionAccessControl { + return v.value +} + +func (v *NullableLoadbalancerOptionAccessControl) Set(val *LoadbalancerOptionAccessControl) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionAccessControl) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionAccessControl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionAccessControl(val *LoadbalancerOptionAccessControl) *NullableLoadbalancerOptionAccessControl { + return &NullableLoadbalancerOptionAccessControl{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionAccessControl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_loadbalancer_option_logs.go b/services/loadbalancer/model_loadbalancer_option_logs.go index c7431d5e7..07938fbc8 100644 --- a/services/loadbalancer/model_loadbalancer_option_logs.go +++ b/services/loadbalancer/model_loadbalancer_option_logs.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionLogs{} + // LoadbalancerOptionLogs struct for LoadbalancerOptionLogs type LoadbalancerOptionLogs struct { // Credentials reference for logging. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the logging solution the push URL points to. Then this enables monitoring via remote write for the Load Balancer. @@ -17,3 +24,131 @@ type LoadbalancerOptionLogs struct { // The ARGUS/Loki remote write Push URL you want the logs to be shipped to. PushUrl *string `json:"pushUrl,omitempty"` } + +// NewLoadbalancerOptionLogs instantiates a new LoadbalancerOptionLogs 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 NewLoadbalancerOptionLogs() *LoadbalancerOptionLogs { + this := LoadbalancerOptionLogs{} + return &this +} + +// NewLoadbalancerOptionLogsWithDefaults instantiates a new LoadbalancerOptionLogs 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 NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs { + this := LoadbalancerOptionLogs{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *LoadbalancerOptionLogs) GetCredentialsRef() *string { + if o == nil || IsNil(o.CredentialsRef) { + var ret *string + return ret + } + return o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *LoadbalancerOptionLogs) SetCredentialsRef(v *string) { + o.CredentialsRef = v +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LoadbalancerOptionLogs) GetPushUrl() *string { + if o == nil || IsNil(o.PushUrl) { + var ret *string + return ret + } + return o.PushUrl +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionLogs) GetPushUrlOk() (*string, bool) { + if o == nil || IsNil(o.PushUrl) { + return nil, false + } + return o.PushUrl, true +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LoadbalancerOptionLogs) HasPushUrl() bool { + if o != nil && !IsNil(o.PushUrl) { + return true + } + + return false +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LoadbalancerOptionLogs) SetPushUrl(v *string) { + o.PushUrl = v +} + +func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.PushUrl) { + toSerialize["pushUrl"] = o.PushUrl + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionLogs struct { + value *LoadbalancerOptionLogs + isSet bool +} + +func (v NullableLoadbalancerOptionLogs) Get() *LoadbalancerOptionLogs { + return v.value +} + +func (v *NullableLoadbalancerOptionLogs) Set(val *LoadbalancerOptionLogs) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionLogs) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionLogs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionLogs(val *LoadbalancerOptionLogs) *NullableLoadbalancerOptionLogs { + return &NullableLoadbalancerOptionLogs{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionLogs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_loadbalancer_option_metrics.go b/services/loadbalancer/model_loadbalancer_option_metrics.go index 3f773b5ad..6a68cbf9a 100644 --- a/services/loadbalancer/model_loadbalancer_option_metrics.go +++ b/services/loadbalancer/model_loadbalancer_option_metrics.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionMetrics{} + // LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics type LoadbalancerOptionMetrics struct { // Credentials reference for metrics. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the metrics solution the push URL points to. Then this enables monitoring via remote write for the Load Balancer. @@ -17,3 +24,131 @@ type LoadbalancerOptionMetrics struct { // The ARGUS/Prometheus remote write Push URL you want the metrics to be shipped to. PushUrl *string `json:"pushUrl,omitempty"` } + +// NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics 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 NewLoadbalancerOptionMetrics() *LoadbalancerOptionMetrics { + this := LoadbalancerOptionMetrics{} + return &this +} + +// NewLoadbalancerOptionMetricsWithDefaults instantiates a new LoadbalancerOptionMetrics 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 NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics { + this := LoadbalancerOptionMetrics{} + return &this +} + +// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. +func (o *LoadbalancerOptionMetrics) GetCredentialsRef() *string { + if o == nil || IsNil(o.CredentialsRef) { + var ret *string + return ret + } + return o.CredentialsRef +} + +// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (*string, bool) { + if o == nil || IsNil(o.CredentialsRef) { + return nil, false + } + return o.CredentialsRef, true +} + +// HasCredentialsRef returns a boolean if a field has been set. +func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool { + if o != nil && !IsNil(o.CredentialsRef) { + return true + } + + return false +} + +// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. +func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v *string) { + o.CredentialsRef = v +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LoadbalancerOptionMetrics) GetPushUrl() *string { + if o == nil || IsNil(o.PushUrl) { + var ret *string + return ret + } + return o.PushUrl +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (*string, bool) { + if o == nil || IsNil(o.PushUrl) { + return nil, false + } + return o.PushUrl, true +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LoadbalancerOptionMetrics) HasPushUrl() bool { + if o != nil && !IsNil(o.PushUrl) { + return true + } + + return false +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LoadbalancerOptionMetrics) SetPushUrl(v *string) { + o.PushUrl = v +} + +func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsRef) { + toSerialize["credentialsRef"] = o.CredentialsRef + } + if !IsNil(o.PushUrl) { + toSerialize["pushUrl"] = o.PushUrl + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionMetrics struct { + value *LoadbalancerOptionMetrics + isSet bool +} + +func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics { + return v.value +} + +func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics { + return &NullableLoadbalancerOptionMetrics{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_loadbalancer_option_observability.go b/services/loadbalancer/model_loadbalancer_option_observability.go index 504f496ad..986f7ed7c 100644 --- a/services/loadbalancer/model_loadbalancer_option_observability.go +++ b/services/loadbalancer/model_loadbalancer_option_observability.go @@ -10,8 +10,143 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadbalancerOptionObservability{} + // LoadbalancerOptionObservability We offer Load Balancer metrics observability via ARGUS or external solutions. Not changeable after creation. type LoadbalancerOptionObservability struct { Logs *LoadbalancerOptionLogs `json:"logs,omitempty"` Metrics *LoadbalancerOptionMetrics `json:"metrics,omitempty"` } + +// NewLoadbalancerOptionObservability instantiates a new LoadbalancerOptionObservability 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 NewLoadbalancerOptionObservability() *LoadbalancerOptionObservability { + this := LoadbalancerOptionObservability{} + return &this +} + +// NewLoadbalancerOptionObservabilityWithDefaults instantiates a new LoadbalancerOptionObservability 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 NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObservability { + this := LoadbalancerOptionObservability{} + return &this +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *LoadbalancerOptionObservability) GetLogs() *LoadbalancerOptionLogs { + if o == nil || IsNil(o.Logs) { + var ret *LoadbalancerOptionLogs + return ret + } + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionObservability) GetLogsOk() (*LoadbalancerOptionLogs, bool) { + if o == nil || IsNil(o.Logs) { + return nil, false + } + return o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *LoadbalancerOptionObservability) HasLogs() bool { + if o != nil && !IsNil(o.Logs) { + return true + } + + return false +} + +// SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field. +func (o *LoadbalancerOptionObservability) SetLogs(v *LoadbalancerOptionLogs) { + o.Logs = v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *LoadbalancerOptionObservability) GetMetrics() *LoadbalancerOptionMetrics { + if o == nil || IsNil(o.Metrics) { + var ret *LoadbalancerOptionMetrics + return ret + } + return o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadbalancerOptionObservability) GetMetricsOk() (*LoadbalancerOptionMetrics, bool) { + if o == nil || IsNil(o.Metrics) { + return nil, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *LoadbalancerOptionObservability) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field. +func (o *LoadbalancerOptionObservability) SetMetrics(v *LoadbalancerOptionMetrics) { + o.Metrics = v +} + +func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Logs) { + toSerialize["logs"] = o.Logs + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + return toSerialize, nil +} + +type NullableLoadbalancerOptionObservability struct { + value *LoadbalancerOptionObservability + isSet bool +} + +func (v NullableLoadbalancerOptionObservability) Get() *LoadbalancerOptionObservability { + return v.value +} + +func (v *NullableLoadbalancerOptionObservability) Set(val *LoadbalancerOptionObservability) { + v.value = val + v.isSet = true +} + +func (v NullableLoadbalancerOptionObservability) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadbalancerOptionObservability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadbalancerOptionObservability(val *LoadbalancerOptionObservability) *NullableLoadbalancerOptionObservability { + return &NullableLoadbalancerOptionObservability{value: val, isSet: true} +} + +func (v NullableLoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadbalancerOptionObservability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_network.go b/services/loadbalancer/model_network.go index 48df73f93..e47c3c48a 100644 --- a/services/loadbalancer/model_network.go +++ b/services/loadbalancer/model_network.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the Network type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Network{} + // Network struct for Network type Network struct { // Openstack network ID @@ -17,3 +24,131 @@ type Network struct { // The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. Role *string `json:"role,omitempty"` } + +// NewNetwork instantiates a new Network 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 NewNetwork() *Network { + this := Network{} + return &this +} + +// NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { + this := Network{} + return &this +} + +// GetNetworkId returns the NetworkId field value if set, zero value otherwise. +func (o *Network) GetNetworkId() *string { + if o == nil || IsNil(o.NetworkId) { + var ret *string + return ret + } + return o.NetworkId +} + +// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetNetworkIdOk() (*string, bool) { + if o == nil || IsNil(o.NetworkId) { + return nil, false + } + return o.NetworkId, true +} + +// HasNetworkId returns a boolean if a field has been set. +func (o *Network) HasNetworkId() bool { + if o != nil && !IsNil(o.NetworkId) { + return true + } + + return false +} + +// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. +func (o *Network) SetNetworkId(v *string) { + o.NetworkId = v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *Network) GetRole() *string { + if o == nil || IsNil(o.Role) { + var ret *string + return ret + } + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *Network) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *Network) SetRole(v *string) { + o.Role = v +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NetworkId) { + toSerialize["networkId"] = o.NetworkId + } + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + return toSerialize, nil +} + +type NullableNetwork struct { + value *Network + isSet bool +} + +func (v NullableNetwork) Get() *Network { + return v.value +} + +func (v *NullableNetwork) Set(val *Network) { + v.value = val + v.isSet = true +} + +func (v NullableNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetwork(val *Network) *NullableNetwork { + return &NullableNetwork{value: val, isSet: true} +} + +func (v NullableNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_options_tcp.go b/services/loadbalancer/model_options_tcp.go index 51b4c01cd..fab5bc767 100644 --- a/services/loadbalancer/model_options_tcp.go +++ b/services/loadbalancer/model_options_tcp.go @@ -10,8 +10,108 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the OptionsTCP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptionsTCP{} + // OptionsTCP struct for OptionsTCP type OptionsTCP struct { // The connection idle timeout to be used with the protocol. The default value is set to 5 minutes, and the maximum value is one hour. IdleTimeout *string `json:"idleTimeout,omitempty"` } + +// NewOptionsTCP instantiates a new OptionsTCP 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 NewOptionsTCP() *OptionsTCP { + this := OptionsTCP{} + return &this +} + +// NewOptionsTCPWithDefaults instantiates a new OptionsTCP 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 NewOptionsTCPWithDefaults() *OptionsTCP { + this := OptionsTCP{} + return &this +} + +// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. +func (o *OptionsTCP) GetIdleTimeout() *string { + if o == nil || IsNil(o.IdleTimeout) { + var ret *string + return ret + } + return o.IdleTimeout +} + +// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptionsTCP) GetIdleTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.IdleTimeout) { + return nil, false + } + return o.IdleTimeout, true +} + +// HasIdleTimeout returns a boolean if a field has been set. +func (o *OptionsTCP) HasIdleTimeout() bool { + if o != nil && !IsNil(o.IdleTimeout) { + return true + } + + return false +} + +// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. +func (o *OptionsTCP) SetIdleTimeout(v *string) { + o.IdleTimeout = v +} + +func (o OptionsTCP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IdleTimeout) { + toSerialize["idleTimeout"] = o.IdleTimeout + } + return toSerialize, nil +} + +type NullableOptionsTCP struct { + value *OptionsTCP + isSet bool +} + +func (v NullableOptionsTCP) Get() *OptionsTCP { + return v.value +} + +func (v *NullableOptionsTCP) Set(val *OptionsTCP) { + v.value = val + v.isSet = true +} + +func (v NullableOptionsTCP) IsSet() bool { + return v.isSet +} + +func (v *NullableOptionsTCP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptionsTCP(val *OptionsTCP) *NullableOptionsTCP { + return &NullableOptionsTCP{value: val, isSet: true} +} + +func (v NullableOptionsTCP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptionsTCP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_options_udp.go b/services/loadbalancer/model_options_udp.go index 62d3e5ca2..808abd15c 100644 --- a/services/loadbalancer/model_options_udp.go +++ b/services/loadbalancer/model_options_udp.go @@ -10,8 +10,108 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the OptionsUDP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptionsUDP{} + // OptionsUDP struct for OptionsUDP type OptionsUDP struct { // The connection idle timeout to be used with the protocol. The default value is set to 1 minute, and the maximum value is 2 minutes. IdleTimeout *string `json:"idleTimeout,omitempty"` } + +// NewOptionsUDP instantiates a new OptionsUDP 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 NewOptionsUDP() *OptionsUDP { + this := OptionsUDP{} + return &this +} + +// NewOptionsUDPWithDefaults instantiates a new OptionsUDP 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 NewOptionsUDPWithDefaults() *OptionsUDP { + this := OptionsUDP{} + return &this +} + +// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise. +func (o *OptionsUDP) GetIdleTimeout() *string { + if o == nil || IsNil(o.IdleTimeout) { + var ret *string + return ret + } + return o.IdleTimeout +} + +// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptionsUDP) GetIdleTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.IdleTimeout) { + return nil, false + } + return o.IdleTimeout, true +} + +// HasIdleTimeout returns a boolean if a field has been set. +func (o *OptionsUDP) HasIdleTimeout() bool { + if o != nil && !IsNil(o.IdleTimeout) { + return true + } + + return false +} + +// SetIdleTimeout gets a reference to the given string and assigns it to the IdleTimeout field. +func (o *OptionsUDP) SetIdleTimeout(v *string) { + o.IdleTimeout = v +} + +func (o OptionsUDP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IdleTimeout) { + toSerialize["idleTimeout"] = o.IdleTimeout + } + return toSerialize, nil +} + +type NullableOptionsUDP struct { + value *OptionsUDP + isSet bool +} + +func (v NullableOptionsUDP) Get() *OptionsUDP { + return v.value +} + +func (v *NullableOptionsUDP) Set(val *OptionsUDP) { + v.value = val + v.isSet = true +} + +func (v NullableOptionsUDP) IsSet() bool { + return v.isSet +} + +func (v *NullableOptionsUDP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptionsUDP(val *OptionsUDP) *NullableOptionsUDP { + return &NullableOptionsUDP{value: val, isSet: true} +} + +func (v NullableOptionsUDP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptionsUDP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_plan_details.go b/services/loadbalancer/model_plan_details.go index cc31f3c22..1c8239671 100644 --- a/services/loadbalancer/model_plan_details.go +++ b/services/loadbalancer/model_plan_details.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the PlanDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanDetails{} + // PlanDetails struct for PlanDetails type PlanDetails struct { // Description @@ -24,3 +31,236 @@ type PlanDetails struct { // Service Plan Identifier PlanId *string `json:"planId,omitempty"` } + +// NewPlanDetails instantiates a new PlanDetails 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 NewPlanDetails() *PlanDetails { + this := PlanDetails{} + return &this +} + +// NewPlanDetailsWithDefaults instantiates a new PlanDetails 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 NewPlanDetailsWithDefaults() *PlanDetails { + this := PlanDetails{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PlanDetails) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PlanDetails) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PlanDetails) SetDescription(v *string) { + o.Description = v +} + +// GetFlavorName returns the FlavorName field value if set, zero value otherwise. +func (o *PlanDetails) GetFlavorName() *string { + if o == nil || IsNil(o.FlavorName) { + var ret *string + return ret + } + return o.FlavorName +} + +// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetFlavorNameOk() (*string, bool) { + if o == nil || IsNil(o.FlavorName) { + return nil, false + } + return o.FlavorName, true +} + +// HasFlavorName returns a boolean if a field has been set. +func (o *PlanDetails) HasFlavorName() bool { + if o != nil && !IsNil(o.FlavorName) { + return true + } + + return false +} + +// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field. +func (o *PlanDetails) SetFlavorName(v *string) { + o.FlavorName = v +} + +// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. +func (o *PlanDetails) GetMaxConnections() *int64 { + if o == nil || IsNil(o.MaxConnections) { + var ret *int64 + return ret + } + return o.MaxConnections +} + +// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanDetails) GetMaxConnectionsOk() (*int64, bool) { + if o == nil || IsNil(o.MaxConnections) { + return nil, false + } + return o.MaxConnections, true +} + +// HasMaxConnections returns a boolean if a field has been set. +func (o *PlanDetails) HasMaxConnections() bool { + if o != nil && !IsNil(o.MaxConnections) { + return true + } + + return false +} + +// SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field. +func (o *PlanDetails) SetMaxConnections(v *int64) { + o.MaxConnections = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PlanDetails) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *PlanDetails) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PlanDetails) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PlanDetails) SetName(v *string) { + o.Name = v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *PlanDetails) GetPlanId() *string { + if o == nil || IsNil(o.PlanId) { + var ret *string + return ret + } + return o.PlanId +} + +// 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 *PlanDetails) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *PlanDetails) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *PlanDetails) SetPlanId(v *string) { + o.PlanId = v +} + +func (o PlanDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.FlavorName) { + toSerialize["flavorName"] = o.FlavorName + } + if !IsNil(o.MaxConnections) { + toSerialize["maxConnections"] = o.MaxConnections + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + return toSerialize, nil +} + +type NullablePlanDetails struct { + value *PlanDetails + isSet bool +} + +func (v NullablePlanDetails) Get() *PlanDetails { + return v.value +} + +func (v *NullablePlanDetails) Set(val *PlanDetails) { + v.value = val + v.isSet = true +} + +func (v NullablePlanDetails) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails { + return &NullablePlanDetails{value: val, isSet: true} +} + +func (v NullablePlanDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_server_name_indicator.go b/services/loadbalancer/model_server_name_indicator.go index 90eaeef00..8298639fb 100644 --- a/services/loadbalancer/model_server_name_indicator.go +++ b/services/loadbalancer/model_server_name_indicator.go @@ -10,8 +10,108 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the ServerNameIndicator type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerNameIndicator{} + // ServerNameIndicator struct for ServerNameIndicator type ServerNameIndicator struct { // The domain name for this SNI config. Name *string `json:"name,omitempty"` } + +// NewServerNameIndicator instantiates a new ServerNameIndicator 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 NewServerNameIndicator() *ServerNameIndicator { + this := ServerNameIndicator{} + return &this +} + +// NewServerNameIndicatorWithDefaults instantiates a new ServerNameIndicator 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 NewServerNameIndicatorWithDefaults() *ServerNameIndicator { + this := ServerNameIndicator{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ServerNameIndicator) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *ServerNameIndicator) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ServerNameIndicator) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ServerNameIndicator) SetName(v *string) { + o.Name = v +} + +func (o ServerNameIndicator) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableServerNameIndicator struct { + value *ServerNameIndicator + isSet bool +} + +func (v NullableServerNameIndicator) Get() *ServerNameIndicator { + return v.value +} + +func (v *NullableServerNameIndicator) Set(val *ServerNameIndicator) { + v.value = val + v.isSet = true +} + +func (v NullableServerNameIndicator) IsSet() bool { + return v.isSet +} + +func (v *NullableServerNameIndicator) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerNameIndicator(val *ServerNameIndicator) *NullableServerNameIndicator { + return &NullableServerNameIndicator{value: val, isSet: true} +} + +func (v NullableServerNameIndicator) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerNameIndicator) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_session_persistence.go b/services/loadbalancer/model_session_persistence.go index 4a429ce12..6be59b0d5 100644 --- a/services/loadbalancer/model_session_persistence.go +++ b/services/loadbalancer/model_session_persistence.go @@ -10,8 +10,108 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the SessionPersistence type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionPersistence{} + // SessionPersistence struct for SessionPersistence type SessionPersistence struct { // If enabled then all connections from one source IP address are redirected to the same target. This setting changes the load balancing algorithm to Maglev. UseSourceIpAddress *bool `json:"useSourceIpAddress,omitempty"` } + +// NewSessionPersistence instantiates a new SessionPersistence 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 NewSessionPersistence() *SessionPersistence { + this := SessionPersistence{} + return &this +} + +// NewSessionPersistenceWithDefaults instantiates a new SessionPersistence 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 NewSessionPersistenceWithDefaults() *SessionPersistence { + this := SessionPersistence{} + return &this +} + +// GetUseSourceIpAddress returns the UseSourceIpAddress field value if set, zero value otherwise. +func (o *SessionPersistence) GetUseSourceIpAddress() *bool { + if o == nil || IsNil(o.UseSourceIpAddress) { + var ret *bool + return ret + } + return o.UseSourceIpAddress +} + +// GetUseSourceIpAddressOk returns a tuple with the UseSourceIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionPersistence) GetUseSourceIpAddressOk() (*bool, bool) { + if o == nil || IsNil(o.UseSourceIpAddress) { + return nil, false + } + return o.UseSourceIpAddress, true +} + +// HasUseSourceIpAddress returns a boolean if a field has been set. +func (o *SessionPersistence) HasUseSourceIpAddress() bool { + if o != nil && !IsNil(o.UseSourceIpAddress) { + return true + } + + return false +} + +// SetUseSourceIpAddress gets a reference to the given bool and assigns it to the UseSourceIpAddress field. +func (o *SessionPersistence) SetUseSourceIpAddress(v *bool) { + o.UseSourceIpAddress = v +} + +func (o SessionPersistence) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.UseSourceIpAddress) { + toSerialize["useSourceIpAddress"] = o.UseSourceIpAddress + } + return toSerialize, nil +} + +type NullableSessionPersistence struct { + value *SessionPersistence + isSet bool +} + +func (v NullableSessionPersistence) Get() *SessionPersistence { + return v.value +} + +func (v *NullableSessionPersistence) Set(val *SessionPersistence) { + v.value = val + v.isSet = true +} + +func (v NullableSessionPersistence) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionPersistence) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionPersistence(val *SessionPersistence) *NullableSessionPersistence { + return &NullableSessionPersistence{value: val, isSet: true} +} + +func (v NullableSessionPersistence) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionPersistence) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_status.go b/services/loadbalancer/model_status.go index 2b841706f..cc8792e6d 100644 --- a/services/loadbalancer/model_status.go +++ b/services/loadbalancer/model_status.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the Status type satisfies the MappedNullable interface at compile time +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]. @@ -20,3 +27,166 @@ type Status struct { // 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. Message *string `json:"message,omitempty"` } + +// NewStatus instantiates a new Status 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 NewStatus() *Status { + this := Status{} + return &this +} + +// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status { + this := Status{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Status) GetCode() *int64 { + if o == nil || IsNil(o.Code) { + var ret *int64 + return ret + } + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetCodeOk() (*int64, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int64 and assigns it to the Code field. +func (o *Status) SetCode(v *int64) { + o.Code = v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Status) GetDetails() *[]GoogleProtobufAny { + if o == nil || IsNil(o.Details) { + var ret *[]GoogleProtobufAny + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetDetailsOk() (*[]GoogleProtobufAny, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Status) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. +func (o *Status) SetDetails(v *[]GoogleProtobufAny) { + o.Details = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status) SetMessage(v *string) { + o.Message = v +} + +func (o Status) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableStatus struct { + value *Status + isSet bool +} + +func (v NullableStatus) Get() *Status { + return v.value +} + +func (v *NullableStatus) Set(val *Status) { + v.value = val + v.isSet = true +} + +func (v NullableStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus(val *Status) *NullableStatus { + return &NullableStatus{value: val, isSet: true} +} + +func (v NullableStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_target.go b/services/loadbalancer/model_target.go index 8dfd1392f..bf930121f 100644 --- a/services/loadbalancer/model_target.go +++ b/services/loadbalancer/model_target.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the Target type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Target{} + // Target struct for Target type Target struct { // Target name @@ -17,3 +24,131 @@ type Target struct { // Target IP. Must by unique within a target pool. Ip *string `json:"ip,omitempty"` } + +// NewTarget instantiates a new Target 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 NewTarget() *Target { + this := Target{} + return &this +} + +// NewTargetWithDefaults instantiates a new Target 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 NewTargetWithDefaults() *Target { + this := Target{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Target) GetDisplayName() *string { + if o == nil || IsNil(o.DisplayName) { + var ret *string + return ret + } + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Target) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Target) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Target) SetDisplayName(v *string) { + o.DisplayName = v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *Target) GetIp() *string { + if o == nil || IsNil(o.Ip) { + var ret *string + return ret + } + return o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Target) GetIpOk() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *Target) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *Target) SetIp(v *string) { + o.Ip = v +} + +func (o Target) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + return toSerialize, nil +} + +type NullableTarget struct { + value *Target + isSet bool +} + +func (v NullableTarget) Get() *Target { + return v.value +} + +func (v *NullableTarget) Set(val *Target) { + v.value = val + v.isSet = true +} + +func (v NullableTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTarget(val *Target) *NullableTarget { + return &NullableTarget{value: val, isSet: true} +} + +func (v NullableTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_target_pool.go b/services/loadbalancer/model_target_pool.go index 2c6332b10..b7f8161f7 100644 --- a/services/loadbalancer/model_target_pool.go +++ b/services/loadbalancer/model_target_pool.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the TargetPool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TargetPool{} + // TargetPool struct for TargetPool type TargetPool struct { ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` @@ -22,3 +29,236 @@ type TargetPool struct { // List of all targets which will be used in the pool. Limited to 250. Targets *[]Target `json:"targets,omitempty"` } + +// NewTargetPool instantiates a new TargetPool 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 NewTargetPool() *TargetPool { + this := TargetPool{} + return &this +} + +// NewTargetPoolWithDefaults instantiates a new TargetPool 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 NewTargetPoolWithDefaults() *TargetPool { + this := TargetPool{} + return &this +} + +// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. +func (o *TargetPool) GetActiveHealthCheck() *ActiveHealthCheck { + if o == nil || IsNil(o.ActiveHealthCheck) { + var ret *ActiveHealthCheck + return ret + } + return o.ActiveHealthCheck +} + +// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { + if o == nil || IsNil(o.ActiveHealthCheck) { + return nil, false + } + return o.ActiveHealthCheck, true +} + +// HasActiveHealthCheck returns a boolean if a field has been set. +func (o *TargetPool) HasActiveHealthCheck() bool { + if o != nil && !IsNil(o.ActiveHealthCheck) { + return true + } + + return false +} + +// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. +func (o *TargetPool) SetActiveHealthCheck(v *ActiveHealthCheck) { + o.ActiveHealthCheck = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TargetPool) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *TargetPool) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TargetPool) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TargetPool) SetName(v *string) { + o.Name = v +} + +// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. +func (o *TargetPool) GetSessionPersistence() *SessionPersistence { + if o == nil || IsNil(o.SessionPersistence) { + var ret *SessionPersistence + return ret + } + return o.SessionPersistence +} + +// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetSessionPersistenceOk() (*SessionPersistence, bool) { + if o == nil || IsNil(o.SessionPersistence) { + return nil, false + } + return o.SessionPersistence, true +} + +// HasSessionPersistence returns a boolean if a field has been set. +func (o *TargetPool) HasSessionPersistence() bool { + if o != nil && !IsNil(o.SessionPersistence) { + return true + } + + return false +} + +// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. +func (o *TargetPool) SetSessionPersistence(v *SessionPersistence) { + o.SessionPersistence = v +} + +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *TargetPool) GetTargetPort() *int64 { + if o == nil || IsNil(o.TargetPort) { + var ret *int64 + return ret + } + return o.TargetPort +} + +// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetTargetPortOk() (*int64, bool) { + if o == nil || IsNil(o.TargetPort) { + return nil, false + } + return o.TargetPort, true +} + +// HasTargetPort returns a boolean if a field has been set. +func (o *TargetPool) HasTargetPort() bool { + if o != nil && !IsNil(o.TargetPort) { + return true + } + + return false +} + +// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. +func (o *TargetPool) SetTargetPort(v *int64) { + o.TargetPort = v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *TargetPool) GetTargets() *[]Target { + if o == nil || IsNil(o.Targets) { + var ret *[]Target + return ret + } + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TargetPool) GetTargetsOk() (*[]Target, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *TargetPool) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given []Target and assigns it to the Targets field. +func (o *TargetPool) SetTargets(v *[]Target) { + o.Targets = v +} + +func (o TargetPool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActiveHealthCheck) { + toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SessionPersistence) { + toSerialize["sessionPersistence"] = o.SessionPersistence + } + if !IsNil(o.TargetPort) { + toSerialize["targetPort"] = o.TargetPort + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + return toSerialize, nil +} + +type NullableTargetPool struct { + value *TargetPool + isSet bool +} + +func (v NullableTargetPool) Get() *TargetPool { + return v.value +} + +func (v *NullableTargetPool) Set(val *TargetPool) { + v.value = val + v.isSet = true +} + +func (v NullableTargetPool) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetPool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetPool(val *TargetPool) *NullableTargetPool { + return &NullableTargetPool{value: val, isSet: true} +} + +func (v NullableTargetPool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetPool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_update_credentials_payload.go b/services/loadbalancer/model_update_credentials_payload.go index 717a772d3..f8b428d9e 100644 --- a/services/loadbalancer/model_update_credentials_payload.go +++ b/services/loadbalancer/model_update_credentials_payload.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsPayload{} + // UpdateCredentialsPayload struct for UpdateCredentialsPayload type UpdateCredentialsPayload struct { // Credential name @@ -19,3 +26,166 @@ type UpdateCredentialsPayload struct { // A valid username used for an existing ARGUS instance, which is used during basic auth. Username *string `json:"username,omitempty"` } + +// NewUpdateCredentialsPayload instantiates a new UpdateCredentialsPayload 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 NewUpdateCredentialsPayload() *UpdateCredentialsPayload { + this := UpdateCredentialsPayload{} + return &this +} + +// NewUpdateCredentialsPayloadWithDefaults instantiates a new UpdateCredentialsPayload 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 NewUpdateCredentialsPayloadWithDefaults() *UpdateCredentialsPayload { + this := UpdateCredentialsPayload{} + return &this +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetDisplayName() *string { + if o == nil || IsNil(o.DisplayName) { + var ret *string + return ret + } + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *UpdateCredentialsPayload) SetDisplayName(v *string) { + o.DisplayName = v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetPassword() *string { + if o == nil || IsNil(o.Password) { + var ret *string + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *UpdateCredentialsPayload) SetPassword(v *string) { + o.Password = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UpdateCredentialsPayload) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpdateCredentialsPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UpdateCredentialsPayload) SetUsername(v *string) { + o.Username = v +} + +func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUpdateCredentialsPayload struct { + value *UpdateCredentialsPayload + isSet bool +} + +func (v NullableUpdateCredentialsPayload) Get() *UpdateCredentialsPayload { + return v.value +} + +func (v *NullableUpdateCredentialsPayload) Set(val *UpdateCredentialsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsPayload(val *UpdateCredentialsPayload) *NullableUpdateCredentialsPayload { + return &NullableUpdateCredentialsPayload{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_update_credentials_response.go b/services/loadbalancer/model_update_credentials_response.go index 18f5b884e..23f6e3a63 100644 --- a/services/loadbalancer/model_update_credentials_response.go +++ b/services/loadbalancer/model_update_credentials_response.go @@ -10,7 +10,107 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsResponse{} + // UpdateCredentialsResponse struct for UpdateCredentialsResponse type UpdateCredentialsResponse struct { Credential *CredentialsResponse `json:"credential,omitempty"` } + +// NewUpdateCredentialsResponse instantiates a new UpdateCredentialsResponse 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 NewUpdateCredentialsResponse() *UpdateCredentialsResponse { + this := UpdateCredentialsResponse{} + return &this +} + +// NewUpdateCredentialsResponseWithDefaults instantiates a new UpdateCredentialsResponse 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 NewUpdateCredentialsResponseWithDefaults() *UpdateCredentialsResponse { + this := UpdateCredentialsResponse{} + return &this +} + +// GetCredential returns the Credential field value if set, zero value otherwise. +func (o *UpdateCredentialsResponse) GetCredential() *CredentialsResponse { + if o == nil || IsNil(o.Credential) { + var ret *CredentialsResponse + return ret + } + return o.Credential +} + +// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { + if o == nil || IsNil(o.Credential) { + return nil, false + } + return o.Credential, true +} + +// HasCredential returns a boolean if a field has been set. +func (o *UpdateCredentialsResponse) HasCredential() bool { + if o != nil && !IsNil(o.Credential) { + return true + } + + return false +} + +// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. +func (o *UpdateCredentialsResponse) SetCredential(v *CredentialsResponse) { + o.Credential = v +} + +func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Credential) { + toSerialize["credential"] = o.Credential + } + return toSerialize, nil +} + +type NullableUpdateCredentialsResponse struct { + value *UpdateCredentialsResponse + isSet bool +} + +func (v NullableUpdateCredentialsResponse) Get() *UpdateCredentialsResponse { + return v.value +} + +func (v *NullableUpdateCredentialsResponse) Set(val *UpdateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsResponse(val *UpdateCredentialsResponse) *NullableUpdateCredentialsResponse { + return &NullableUpdateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/loadbalancer/model_update_load_balancer_payload.go b/services/loadbalancer/model_update_load_balancer_payload.go index 5c06060c4..c5df97505 100644 --- a/services/loadbalancer/model_update_load_balancer_payload.go +++ b/services/loadbalancer/model_update_load_balancer_payload.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateLoadBalancerPayload{} + // UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload type UpdateLoadBalancerPayload struct { // Reports all errors a load balancer has. @@ -33,3 +40,446 @@ type UpdateLoadBalancerPayload struct { // 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 load balancer resource that changes during updates of the load balancers. On updates this field specified the 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 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 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 *string `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 +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetErrors() *[]LoadBalancerError { + if o == nil || IsNil(o.Errors) { + var ret *[]LoadBalancerError + return ret + } + return o.Errors +} + +// 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() (*[]LoadBalancerError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. +func (o *UpdateLoadBalancerPayload) SetErrors(v *[]LoadBalancerError) { + o.Errors = v +} + +// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetExternalAddress() *string { + if o == nil || IsNil(o.ExternalAddress) { + var ret *string + return ret + } + return o.ExternalAddress +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.ExternalAddress) { + return nil, false + } + return o.ExternalAddress, true +} + +// HasExternalAddress returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool { + if o != nil && !IsNil(o.ExternalAddress) { + return true + } + + return false +} + +// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. +func (o *UpdateLoadBalancerPayload) SetExternalAddress(v *string) { + o.ExternalAddress = v +} + +// GetListeners returns the Listeners field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetListeners() *[]Listener { + if o == nil || IsNil(o.Listeners) { + var ret *[]Listener + return ret + } + return o.Listeners +} + +// 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() (*[]Listener, bool) { + if o == nil || IsNil(o.Listeners) { + return nil, false + } + return o.Listeners, true +} + +// HasListeners returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasListeners() bool { + if o != nil && !IsNil(o.Listeners) { + return true + } + + return false +} + +// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. +func (o *UpdateLoadBalancerPayload) SetListeners(v *[]Listener) { + o.Listeners = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateLoadBalancerPayload) SetName(v *string) { + o.Name = v +} + +// GetNetworks returns the Networks field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetNetworks() *[]Network { + if o == nil || IsNil(o.Networks) { + var ret *[]Network + return ret + } + return o.Networks +} + +// 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() (*[]Network, bool) { + if o == nil || IsNil(o.Networks) { + return nil, false + } + return o.Networks, true +} + +// HasNetworks returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasNetworks() bool { + if o != nil && !IsNil(o.Networks) { + return true + } + + return false +} + +// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. +func (o *UpdateLoadBalancerPayload) SetNetworks(v *[]Network) { + o.Networks = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetOptions() *LoadBalancerOptions { + if o == nil || IsNil(o.Options) { + var ret *LoadBalancerOptions + return ret + } + return o.Options +} + +// 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() (*LoadBalancerOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. +func (o *UpdateLoadBalancerPayload) SetOptions(v *LoadBalancerOptions) { + o.Options = v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetPlanId() *string { + if o == nil || IsNil(o.PlanId) { + var ret *string + return ret + } + return o.PlanId +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *UpdateLoadBalancerPayload) SetPlanId(v *string) { + o.PlanId = v +} + +// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetPrivateAddress() *string { + if o == nil || IsNil(o.PrivateAddress) { + var ret *string + return ret + } + return o.PrivateAddress +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PrivateAddress) { + return nil, false + } + return o.PrivateAddress, true +} + +// HasPrivateAddress returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool { + if o != nil && !IsNil(o.PrivateAddress) { + return true + } + + return false +} + +// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. +func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v *string) { + o.PrivateAddress = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *UpdateLoadBalancerPayload) SetStatus(v *string) { + o.Status = v +} + +// GetTargetPools returns the TargetPools field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetTargetPools() *[]TargetPool { + if o == nil || IsNil(o.TargetPools) { + var ret *[]TargetPool + return ret + } + return o.TargetPools +} + +// 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() (*[]TargetPool, bool) { + if o == nil || IsNil(o.TargetPools) { + return nil, false + } + return o.TargetPools, true +} + +// HasTargetPools returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasTargetPools() bool { + if o != nil && !IsNil(o.TargetPools) { + return true + } + + return false +} + +// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. +func (o *UpdateLoadBalancerPayload) SetTargetPools(v *[]TargetPool) { + o.TargetPools = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *UpdateLoadBalancerPayload) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *UpdateLoadBalancerPayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *UpdateLoadBalancerPayload) SetVersion(v *string) { + o.Version = v +} + +func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.ExternalAddress) { + toSerialize["externalAddress"] = o.ExternalAddress + } + if !IsNil(o.Listeners) { + toSerialize["listeners"] = o.Listeners + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Networks) { + toSerialize["networks"] = o.Networks + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + if !IsNil(o.PrivateAddress) { + toSerialize["privateAddress"] = o.PrivateAddress + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TargetPools) { + toSerialize["targetPools"] = o.TargetPools + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + 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) +} diff --git a/services/loadbalancer/model_update_target_pool_payload.go b/services/loadbalancer/model_update_target_pool_payload.go index 0584bcb87..57858a412 100644 --- a/services/loadbalancer/model_update_target_pool_payload.go +++ b/services/loadbalancer/model_update_target_pool_payload.go @@ -10,6 +10,13 @@ API version: 1.7.2 package loadbalancer +import ( + "encoding/json" +) + +// checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateTargetPoolPayload{} + // UpdateTargetPoolPayload struct for UpdateTargetPoolPayload type UpdateTargetPoolPayload struct { ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` @@ -22,3 +29,236 @@ type UpdateTargetPoolPayload struct { // List of all targets which will be used in the pool. Limited to 250. Targets *[]Target `json:"targets,omitempty"` } + +// NewUpdateTargetPoolPayload instantiates a new UpdateTargetPoolPayload 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 NewUpdateTargetPoolPayload() *UpdateTargetPoolPayload { + this := UpdateTargetPoolPayload{} + return &this +} + +// NewUpdateTargetPoolPayloadWithDefaults instantiates a new UpdateTargetPoolPayload 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 NewUpdateTargetPoolPayloadWithDefaults() *UpdateTargetPoolPayload { + this := UpdateTargetPoolPayload{} + return &this +} + +// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() *ActiveHealthCheck { + if o == nil || IsNil(o.ActiveHealthCheck) { + var ret *ActiveHealthCheck + return ret + } + return o.ActiveHealthCheck +} + +// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { + if o == nil || IsNil(o.ActiveHealthCheck) { + return nil, false + } + return o.ActiveHealthCheck, true +} + +// HasActiveHealthCheck returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasActiveHealthCheck() bool { + if o != nil && !IsNil(o.ActiveHealthCheck) { + return true + } + + return false +} + +// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. +func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v *ActiveHealthCheck) { + o.ActiveHealthCheck = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *UpdateTargetPoolPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateTargetPoolPayload) SetName(v *string) { + o.Name = v +} + +// GetSessionPersistence returns the SessionPersistence field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetSessionPersistence() *SessionPersistence { + if o == nil || IsNil(o.SessionPersistence) { + var ret *SessionPersistence + return ret + } + return o.SessionPersistence +} + +// GetSessionPersistenceOk returns a tuple with the SessionPersistence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetSessionPersistenceOk() (*SessionPersistence, bool) { + if o == nil || IsNil(o.SessionPersistence) { + return nil, false + } + return o.SessionPersistence, true +} + +// HasSessionPersistence returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasSessionPersistence() bool { + if o != nil && !IsNil(o.SessionPersistence) { + return true + } + + return false +} + +// SetSessionPersistence gets a reference to the given SessionPersistence and assigns it to the SessionPersistence field. +func (o *UpdateTargetPoolPayload) SetSessionPersistence(v *SessionPersistence) { + o.SessionPersistence = v +} + +// GetTargetPort returns the TargetPort field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargetPort() *int64 { + if o == nil || IsNil(o.TargetPort) { + var ret *int64 + return ret + } + return o.TargetPort +} + +// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*int64, bool) { + if o == nil || IsNil(o.TargetPort) { + return nil, false + } + return o.TargetPort, true +} + +// HasTargetPort returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasTargetPort() bool { + if o != nil && !IsNil(o.TargetPort) { + return true + } + + return false +} + +// SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. +func (o *UpdateTargetPoolPayload) SetTargetPort(v *int64) { + o.TargetPort = v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *UpdateTargetPoolPayload) GetTargets() *[]Target { + if o == nil || IsNil(o.Targets) { + var ret *[]Target + return ret + } + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTargetPoolPayload) GetTargetsOk() (*[]Target, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *UpdateTargetPoolPayload) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given []Target and assigns it to the Targets field. +func (o *UpdateTargetPoolPayload) SetTargets(v *[]Target) { + o.Targets = v +} + +func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActiveHealthCheck) { + toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SessionPersistence) { + toSerialize["sessionPersistence"] = o.SessionPersistence + } + if !IsNil(o.TargetPort) { + toSerialize["targetPort"] = o.TargetPort + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + return toSerialize, nil +} + +type NullableUpdateTargetPoolPayload struct { + value *UpdateTargetPoolPayload + isSet bool +} + +func (v NullableUpdateTargetPoolPayload) Get() *UpdateTargetPoolPayload { + return v.value +} + +func (v *NullableUpdateTargetPoolPayload) Set(val *UpdateTargetPoolPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateTargetPoolPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateTargetPoolPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateTargetPoolPayload(val *UpdateTargetPoolPayload) *NullableUpdateTargetPoolPayload { + return &NullableUpdateTargetPoolPayload{value: val, isSet: true} +} + +func (v NullableUpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateTargetPoolPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}