diff --git a/services/ske/CHANGELOG.md b/services/ske/CHANGELOG.md index f187af5e9..57b473c00 100644 --- a/services/ske/CHANGELOG.md +++ b/services/ske/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.20.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.19.0 (2024-07-18) - **Feature:** New fields for `Extension`: `Dns` diff --git a/services/ske/model_acl.go b/services/ske/model_acl.go index a1f1857ee..2daeaf4a3 100644 --- a/services/ske/model_acl.go +++ b/services/ske/model_acl.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + // ACL struct for ACL type ACL struct { // Array of CIDRs to allow access to the kubernetes API. @@ -19,3 +26,115 @@ type ACL struct { // REQUIRED Enabled *bool `json:"enabled"` } + +type _ACL ACL + +// NewACL instantiates a new ACL 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 NewACL(allowedCidrs *[]string, enabled *bool) *ACL { + this := ACL{} + this.AllowedCidrs = allowedCidrs + this.Enabled = enabled + return &this +} + +// NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetAllowedCidrs returns the AllowedCidrs field value +func (o *ACL) GetAllowedCidrs() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.AllowedCidrs +} + +// GetAllowedCidrsOk returns a tuple with the AllowedCidrs field value +// and a boolean to check if the value has been set. +func (o *ACL) GetAllowedCidrsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.AllowedCidrs, true +} + +// SetAllowedCidrs sets field value +func (o *ACL) SetAllowedCidrs(v *[]string) { + o.AllowedCidrs = v +} + +// GetEnabled returns the Enabled field value +func (o *ACL) GetEnabled() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ACL) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled, true +} + +// SetEnabled sets field value +func (o *ACL) SetEnabled(v *bool) { + o.Enabled = v +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["allowedCidrs"] = o.AllowedCidrs + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_argus.go b/services/ske/model_argus.go index 165449c34..22cf06e75 100644 --- a/services/ske/model_argus.go +++ b/services/ske/model_argus.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Argus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Argus{} + // Argus struct for Argus type Argus struct { // Argus instance ID to choose which Argus instance is used. @@ -19,3 +26,115 @@ type Argus struct { // REQUIRED Enabled *bool `json:"enabled"` } + +type _Argus Argus + +// NewArgus instantiates a new Argus 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 NewArgus(argusInstanceId *string, enabled *bool) *Argus { + this := Argus{} + this.ArgusInstanceId = argusInstanceId + this.Enabled = enabled + return &this +} + +// NewArgusWithDefaults instantiates a new Argus 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 NewArgusWithDefaults() *Argus { + this := Argus{} + return &this +} + +// GetArgusInstanceId returns the ArgusInstanceId field value +func (o *Argus) GetArgusInstanceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ArgusInstanceId +} + +// GetArgusInstanceIdOk returns a tuple with the ArgusInstanceId field value +// and a boolean to check if the value has been set. +func (o *Argus) GetArgusInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ArgusInstanceId, true +} + +// SetArgusInstanceId sets field value +func (o *Argus) SetArgusInstanceId(v *string) { + o.ArgusInstanceId = v +} + +// GetEnabled returns the Enabled field value +func (o *Argus) GetEnabled() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *Argus) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled, true +} + +// SetEnabled sets field value +func (o *Argus) SetEnabled(v *bool) { + o.Enabled = v +} + +func (o Argus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["argusInstanceId"] = o.ArgusInstanceId + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +type NullableArgus struct { + value *Argus + isSet bool +} + +func (v NullableArgus) Get() *Argus { + return v.value +} + +func (v *NullableArgus) Set(val *Argus) { + v.value = val + v.isSet = true +} + +func (v NullableArgus) IsSet() bool { + return v.isSet +} + +func (v *NullableArgus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArgus(val *Argus) *NullableArgus { + return &NullableArgus{value: val, isSet: true} +} + +func (v NullableArgus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArgus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_availability_zone.go b/services/ske/model_availability_zone.go index 7de7e512d..44aab4893 100644 --- a/services/ske/model_availability_zone.go +++ b/services/ske/model_availability_zone.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the AvailabilityZone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AvailabilityZone{} + // AvailabilityZone struct for AvailabilityZone type AvailabilityZone struct { Name *string `json:"name,omitempty"` } + +// NewAvailabilityZone instantiates a new AvailabilityZone 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 NewAvailabilityZone() *AvailabilityZone { + this := AvailabilityZone{} + return &this +} + +// NewAvailabilityZoneWithDefaults instantiates a new AvailabilityZone 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 NewAvailabilityZoneWithDefaults() *AvailabilityZone { + this := AvailabilityZone{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AvailabilityZone) 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 *AvailabilityZone) 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 *AvailabilityZone) 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 *AvailabilityZone) SetName(v *string) { + o.Name = v +} + +func (o AvailabilityZone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableAvailabilityZone struct { + value *AvailabilityZone + isSet bool +} + +func (v NullableAvailabilityZone) Get() *AvailabilityZone { + return v.value +} + +func (v *NullableAvailabilityZone) Set(val *AvailabilityZone) { + v.value = val + v.isSet = true +} + +func (v NullableAvailabilityZone) IsSet() bool { + return v.isSet +} + +func (v *NullableAvailabilityZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAvailabilityZone(val *AvailabilityZone) *NullableAvailabilityZone { + return &NullableAvailabilityZone{value: val, isSet: true} +} + +func (v NullableAvailabilityZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAvailabilityZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_cluster.go b/services/ske/model_cluster.go index 7c8a75823..05d06a851 100644 --- a/services/ske/model_cluster.go +++ b/services/ske/model_cluster.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Cluster type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cluster{} + // Cluster struct for Cluster type Cluster struct { Extensions *Extension `json:"extensions,omitempty"` @@ -23,3 +30,325 @@ type Cluster struct { Nodepools *[]Nodepool `json:"nodepools"` Status *ClusterStatus `json:"status,omitempty"` } + +type _Cluster Cluster + +// NewCluster instantiates a new Cluster 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 NewCluster(kubernetes *Kubernetes, nodepools *[]Nodepool) *Cluster { + this := Cluster{} + this.Kubernetes = kubernetes + this.Nodepools = nodepools + return &this +} + +// NewClusterWithDefaults instantiates a new Cluster 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 NewClusterWithDefaults() *Cluster { + this := Cluster{} + return &this +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *Cluster) GetExtensions() *Extension { + if o == nil || IsNil(o.Extensions) { + var ret *Extension + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetExtensionsOk() (*Extension, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *Cluster) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +func (o *Cluster) SetExtensions(v *Extension) { + o.Extensions = v +} + +// GetHibernation returns the Hibernation field value if set, zero value otherwise. +func (o *Cluster) GetHibernation() *Hibernation { + if o == nil || IsNil(o.Hibernation) { + var ret *Hibernation + return ret + } + return o.Hibernation +} + +// GetHibernationOk returns a tuple with the Hibernation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetHibernationOk() (*Hibernation, bool) { + if o == nil || IsNil(o.Hibernation) { + return nil, false + } + return o.Hibernation, true +} + +// HasHibernation returns a boolean if a field has been set. +func (o *Cluster) HasHibernation() bool { + if o != nil && !IsNil(o.Hibernation) { + return true + } + + return false +} + +// SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +func (o *Cluster) SetHibernation(v *Hibernation) { + o.Hibernation = v +} + +// GetKubernetes returns the Kubernetes field value +func (o *Cluster) GetKubernetes() *Kubernetes { + if o == nil { + var ret *Kubernetes + return ret + } + + return o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value +// and a boolean to check if the value has been set. +func (o *Cluster) GetKubernetesOk() (*Kubernetes, bool) { + if o == nil { + return nil, false + } + return o.Kubernetes, true +} + +// SetKubernetes sets field value +func (o *Cluster) SetKubernetes(v *Kubernetes) { + o.Kubernetes = v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *Cluster) GetMaintenance() *Maintenance { + if o == nil || IsNil(o.Maintenance) { + var ret *Maintenance + return ret + } + return o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetMaintenanceOk() (*Maintenance, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *Cluster) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +func (o *Cluster) SetMaintenance(v *Maintenance) { + o.Maintenance = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Cluster) 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 *Cluster) 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 *Cluster) 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 *Cluster) SetName(v *string) { + o.Name = v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *Cluster) GetNetwork() *Network { + if o == nil || IsNil(o.Network) { + var ret *Network + return ret + } + return o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetNetworkOk() (*Network, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *Cluster) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given Network and assigns it to the Network field. +func (o *Cluster) SetNetwork(v *Network) { + o.Network = v +} + +// GetNodepools returns the Nodepools field value +func (o *Cluster) GetNodepools() *[]Nodepool { + if o == nil { + var ret *[]Nodepool + return ret + } + + return o.Nodepools +} + +// GetNodepoolsOk returns a tuple with the Nodepools field value +// and a boolean to check if the value has been set. +func (o *Cluster) GetNodepoolsOk() (*[]Nodepool, bool) { + if o == nil { + return nil, false + } + return o.Nodepools, true +} + +// SetNodepools sets field value +func (o *Cluster) SetNodepools(v *[]Nodepool) { + o.Nodepools = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Cluster) GetStatus() *ClusterStatus { + if o == nil || IsNil(o.Status) { + var ret *ClusterStatus + 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 *Cluster) GetStatusOk() (*ClusterStatus, 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 *Cluster) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +func (o *Cluster) SetStatus(v *ClusterStatus) { + o.Status = v +} + +func (o Cluster) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + if !IsNil(o.Hibernation) { + toSerialize["hibernation"] = o.Hibernation + } + toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + toSerialize["nodepools"] = o.Nodepools + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableCluster struct { + value *Cluster + isSet bool +} + +func (v NullableCluster) Get() *Cluster { + return v.value +} + +func (v *NullableCluster) Set(val *Cluster) { + v.value = val + v.isSet = true +} + +func (v NullableCluster) IsSet() bool { + return v.isSet +} + +func (v *NullableCluster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCluster(val *Cluster) *NullableCluster { + return &NullableCluster{value: val, isSet: true} +} + +func (v NullableCluster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCluster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_cluster_status.go b/services/ske/model_cluster_status.go index 8ee0099fe..87f3bafdd 100644 --- a/services/ske/model_cluster_status.go +++ b/services/ske/model_cluster_status.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the ClusterStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterStatus{} + // ClusterStatus struct for ClusterStatus type ClusterStatus struct { Aggregated *ClusterStatusState `json:"aggregated,omitempty"` @@ -19,3 +26,240 @@ type ClusterStatus struct { Error *RuntimeError `json:"error,omitempty"` Hibernated *bool `json:"hibernated,omitempty"` } + +// NewClusterStatus instantiates a new ClusterStatus 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 NewClusterStatus() *ClusterStatus { + this := ClusterStatus{} + var aggregated ClusterStatusState = CLUSTERSTATUSSTATE_UNSPECIFIED + this.Aggregated = &aggregated + return &this +} + +// NewClusterStatusWithDefaults instantiates a new ClusterStatus 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 NewClusterStatusWithDefaults() *ClusterStatus { + this := ClusterStatus{} + var aggregated ClusterStatusState = CLUSTERSTATUSSTATE_UNSPECIFIED + this.Aggregated = &aggregated + return &this +} + +// GetAggregated returns the Aggregated field value if set, zero value otherwise. +func (o *ClusterStatus) GetAggregated() *ClusterStatusState { + if o == nil || IsNil(o.Aggregated) { + var ret *ClusterStatusState + return ret + } + return o.Aggregated +} + +// GetAggregatedOk returns a tuple with the Aggregated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetAggregatedOk() (*ClusterStatusState, bool) { + if o == nil || IsNil(o.Aggregated) { + return nil, false + } + return o.Aggregated, true +} + +// HasAggregated returns a boolean if a field has been set. +func (o *ClusterStatus) HasAggregated() bool { + if o != nil && !IsNil(o.Aggregated) { + return true + } + + return false +} + +// SetAggregated gets a reference to the given ClusterStatusState and assigns it to the Aggregated field. +func (o *ClusterStatus) SetAggregated(v *ClusterStatusState) { + o.Aggregated = v +} + +// GetCreationTime returns the CreationTime field value if set, zero value otherwise. +func (o *ClusterStatus) GetCreationTime() *string { + if o == nil || IsNil(o.CreationTime) { + var ret *string + return ret + } + return o.CreationTime +} + +// GetCreationTimeOk returns a tuple with the CreationTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetCreationTimeOk() (*string, bool) { + if o == nil || IsNil(o.CreationTime) { + return nil, false + } + return o.CreationTime, true +} + +// HasCreationTime returns a boolean if a field has been set. +func (o *ClusterStatus) HasCreationTime() bool { + if o != nil && !IsNil(o.CreationTime) { + return true + } + + return false +} + +// SetCreationTime gets a reference to the given string and assigns it to the CreationTime field. +func (o *ClusterStatus) SetCreationTime(v *string) { + o.CreationTime = v +} + +// GetCredentialsRotation returns the CredentialsRotation field value if set, zero value otherwise. +func (o *ClusterStatus) GetCredentialsRotation() *CredentialsRotationState { + if o == nil || IsNil(o.CredentialsRotation) { + var ret *CredentialsRotationState + return ret + } + return o.CredentialsRotation +} + +// GetCredentialsRotationOk returns a tuple with the CredentialsRotation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetCredentialsRotationOk() (*CredentialsRotationState, bool) { + if o == nil || IsNil(o.CredentialsRotation) { + return nil, false + } + return o.CredentialsRotation, true +} + +// HasCredentialsRotation returns a boolean if a field has been set. +func (o *ClusterStatus) HasCredentialsRotation() bool { + if o != nil && !IsNil(o.CredentialsRotation) { + return true + } + + return false +} + +// SetCredentialsRotation gets a reference to the given CredentialsRotationState and assigns it to the CredentialsRotation field. +func (o *ClusterStatus) SetCredentialsRotation(v *CredentialsRotationState) { + o.CredentialsRotation = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ClusterStatus) GetError() *RuntimeError { + if o == nil || IsNil(o.Error) { + var ret *RuntimeError + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorOk() (*RuntimeError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ClusterStatus) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given RuntimeError and assigns it to the Error field. +func (o *ClusterStatus) SetError(v *RuntimeError) { + o.Error = v +} + +// GetHibernated returns the Hibernated field value if set, zero value otherwise. +func (o *ClusterStatus) GetHibernated() *bool { + if o == nil || IsNil(o.Hibernated) { + var ret *bool + return ret + } + return o.Hibernated +} + +// GetHibernatedOk returns a tuple with the Hibernated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetHibernatedOk() (*bool, bool) { + if o == nil || IsNil(o.Hibernated) { + return nil, false + } + return o.Hibernated, true +} + +// HasHibernated returns a boolean if a field has been set. +func (o *ClusterStatus) HasHibernated() bool { + if o != nil && !IsNil(o.Hibernated) { + return true + } + + return false +} + +// SetHibernated gets a reference to the given bool and assigns it to the Hibernated field. +func (o *ClusterStatus) SetHibernated(v *bool) { + o.Hibernated = v +} + +func (o ClusterStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Aggregated) { + toSerialize["aggregated"] = o.Aggregated + } + if !IsNil(o.CreationTime) { + toSerialize["creationTime"] = o.CreationTime + } + if !IsNil(o.CredentialsRotation) { + toSerialize["credentialsRotation"] = o.CredentialsRotation + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Hibernated) { + toSerialize["hibernated"] = o.Hibernated + } + return toSerialize, nil +} + +type NullableClusterStatus struct { + value *ClusterStatus + isSet bool +} + +func (v NullableClusterStatus) Get() *ClusterStatus { + return v.value +} + +func (v *NullableClusterStatus) Set(val *ClusterStatus) { + v.value = val + v.isSet = true +} + +func (v NullableClusterStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterStatus(val *ClusterStatus) *NullableClusterStatus { + return &NullableClusterStatus{value: val, isSet: true} +} + +func (v NullableClusterStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_create_kubeconfig_payload.go b/services/ske/model_create_kubeconfig_payload.go index 080fe545d..7af3b81a0 100644 --- a/services/ske/model_create_kubeconfig_payload.go +++ b/services/ske/model_create_kubeconfig_payload.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the CreateKubeconfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateKubeconfigPayload{} + // CreateKubeconfigPayload struct for CreateKubeconfigPayload type CreateKubeconfigPayload struct { ExpirationSeconds *string `json:"expirationSeconds,omitempty"` } + +// NewCreateKubeconfigPayload instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayload() *CreateKubeconfigPayload { + this := CreateKubeconfigPayload{} + return &this +} + +// NewCreateKubeconfigPayloadWithDefaults instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayloadWithDefaults() *CreateKubeconfigPayload { + this := CreateKubeconfigPayload{} + return &this +} + +// GetExpirationSeconds returns the ExpirationSeconds field value if set, zero value otherwise. +func (o *CreateKubeconfigPayload) GetExpirationSeconds() *string { + if o == nil || IsNil(o.ExpirationSeconds) { + var ret *string + return ret + } + return o.ExpirationSeconds +} + +// GetExpirationSecondsOk returns a tuple with the ExpirationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateKubeconfigPayload) GetExpirationSecondsOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationSeconds) { + return nil, false + } + return o.ExpirationSeconds, true +} + +// HasExpirationSeconds returns a boolean if a field has been set. +func (o *CreateKubeconfigPayload) HasExpirationSeconds() bool { + if o != nil && !IsNil(o.ExpirationSeconds) { + return true + } + + return false +} + +// SetExpirationSeconds gets a reference to the given string and assigns it to the ExpirationSeconds field. +func (o *CreateKubeconfigPayload) SetExpirationSeconds(v *string) { + o.ExpirationSeconds = v +} + +func (o CreateKubeconfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationSeconds) { + toSerialize["expirationSeconds"] = o.ExpirationSeconds + } + return toSerialize, nil +} + +type NullableCreateKubeconfigPayload struct { + value *CreateKubeconfigPayload + isSet bool +} + +func (v NullableCreateKubeconfigPayload) Get() *CreateKubeconfigPayload { + return v.value +} + +func (v *NullableCreateKubeconfigPayload) Set(val *CreateKubeconfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateKubeconfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateKubeconfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateKubeconfigPayload(val *CreateKubeconfigPayload) *NullableCreateKubeconfigPayload { + return &NullableCreateKubeconfigPayload{value: val, isSet: true} +} + +func (v NullableCreateKubeconfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateKubeconfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_create_or_update_cluster_payload.go b/services/ske/model_create_or_update_cluster_payload.go index 68ad31b89..a6fed5fc5 100644 --- a/services/ske/model_create_or_update_cluster_payload.go +++ b/services/ske/model_create_or_update_cluster_payload.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the CreateOrUpdateClusterPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOrUpdateClusterPayload{} + // CreateOrUpdateClusterPayload struct for CreateOrUpdateClusterPayload type CreateOrUpdateClusterPayload struct { Extensions *Extension `json:"extensions,omitempty"` @@ -22,3 +29,290 @@ type CreateOrUpdateClusterPayload struct { Nodepools *[]Nodepool `json:"nodepools"` Status *ClusterStatus `json:"status,omitempty"` } + +type _CreateOrUpdateClusterPayload CreateOrUpdateClusterPayload + +// NewCreateOrUpdateClusterPayload instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayload(kubernetes *Kubernetes, nodepools *[]Nodepool) *CreateOrUpdateClusterPayload { + this := CreateOrUpdateClusterPayload{} + this.Kubernetes = kubernetes + this.Nodepools = nodepools + return &this +} + +// NewCreateOrUpdateClusterPayloadWithDefaults instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayloadWithDefaults() *CreateOrUpdateClusterPayload { + this := CreateOrUpdateClusterPayload{} + return &this +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetExtensions() *Extension { + if o == nil || IsNil(o.Extensions) { + var ret *Extension + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetExtensionsOk() (*Extension, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +func (o *CreateOrUpdateClusterPayload) SetExtensions(v *Extension) { + o.Extensions = v +} + +// GetHibernation returns the Hibernation field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetHibernation() *Hibernation { + if o == nil || IsNil(o.Hibernation) { + var ret *Hibernation + return ret + } + return o.Hibernation +} + +// GetHibernationOk returns a tuple with the Hibernation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetHibernationOk() (*Hibernation, bool) { + if o == nil || IsNil(o.Hibernation) { + return nil, false + } + return o.Hibernation, true +} + +// HasHibernation returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasHibernation() bool { + if o != nil && !IsNil(o.Hibernation) { + return true + } + + return false +} + +// SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +func (o *CreateOrUpdateClusterPayload) SetHibernation(v *Hibernation) { + o.Hibernation = v +} + +// GetKubernetes returns the Kubernetes field value +func (o *CreateOrUpdateClusterPayload) GetKubernetes() *Kubernetes { + if o == nil { + var ret *Kubernetes + return ret + } + + return o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetKubernetesOk() (*Kubernetes, bool) { + if o == nil { + return nil, false + } + return o.Kubernetes, true +} + +// SetKubernetes sets field value +func (o *CreateOrUpdateClusterPayload) SetKubernetes(v *Kubernetes) { + o.Kubernetes = v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetMaintenance() *Maintenance { + if o == nil || IsNil(o.Maintenance) { + var ret *Maintenance + return ret + } + return o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetMaintenanceOk() (*Maintenance, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +func (o *CreateOrUpdateClusterPayload) SetMaintenance(v *Maintenance) { + o.Maintenance = v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetNetwork() *Network { + if o == nil || IsNil(o.Network) { + var ret *Network + return ret + } + return o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetNetworkOk() (*Network, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given Network and assigns it to the Network field. +func (o *CreateOrUpdateClusterPayload) SetNetwork(v *Network) { + o.Network = v +} + +// GetNodepools returns the Nodepools field value +func (o *CreateOrUpdateClusterPayload) GetNodepools() *[]Nodepool { + if o == nil { + var ret *[]Nodepool + return ret + } + + return o.Nodepools +} + +// GetNodepoolsOk returns a tuple with the Nodepools field value +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetNodepoolsOk() (*[]Nodepool, bool) { + if o == nil { + return nil, false + } + return o.Nodepools, true +} + +// SetNodepools sets field value +func (o *CreateOrUpdateClusterPayload) SetNodepools(v *[]Nodepool) { + o.Nodepools = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetStatus() *ClusterStatus { + if o == nil || IsNil(o.Status) { + var ret *ClusterStatus + 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 *CreateOrUpdateClusterPayload) GetStatusOk() (*ClusterStatus, 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 *CreateOrUpdateClusterPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +func (o *CreateOrUpdateClusterPayload) SetStatus(v *ClusterStatus) { + o.Status = v +} + +func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + if !IsNil(o.Hibernation) { + toSerialize["hibernation"] = o.Hibernation + } + toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + toSerialize["nodepools"] = o.Nodepools + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableCreateOrUpdateClusterPayload struct { + value *CreateOrUpdateClusterPayload + isSet bool +} + +func (v NullableCreateOrUpdateClusterPayload) Get() *CreateOrUpdateClusterPayload { + return v.value +} + +func (v *NullableCreateOrUpdateClusterPayload) Set(val *CreateOrUpdateClusterPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOrUpdateClusterPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOrUpdateClusterPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOrUpdateClusterPayload(val *CreateOrUpdateClusterPayload) *NullableCreateOrUpdateClusterPayload { + return &NullableCreateOrUpdateClusterPayload{value: val, isSet: true} +} + +func (v NullableCreateOrUpdateClusterPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOrUpdateClusterPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_credentials.go b/services/ske/model_credentials.go index aa9145757..d574f2d88 100644 --- a/services/ske/model_credentials.go +++ b/services/ske/model_credentials.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Credentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Credentials{} + // Credentials struct for Credentials type Credentials struct { CertificateAuthorityData *string `json:"certificateAuthorityData,omitempty"` @@ -18,3 +25,201 @@ type Credentials struct { Server *string `json:"server,omitempty"` Token *string `json:"token,omitempty"` } + +// NewCredentials instantiates a new Credentials 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 NewCredentials() *Credentials { + this := Credentials{} + return &this +} + +// NewCredentialsWithDefaults instantiates a new Credentials 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 NewCredentialsWithDefaults() *Credentials { + this := Credentials{} + return &this +} + +// GetCertificateAuthorityData returns the CertificateAuthorityData field value if set, zero value otherwise. +func (o *Credentials) GetCertificateAuthorityData() *string { + if o == nil || IsNil(o.CertificateAuthorityData) { + var ret *string + return ret + } + return o.CertificateAuthorityData +} + +// GetCertificateAuthorityDataOk returns a tuple with the CertificateAuthorityData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credentials) GetCertificateAuthorityDataOk() (*string, bool) { + if o == nil || IsNil(o.CertificateAuthorityData) { + return nil, false + } + return o.CertificateAuthorityData, true +} + +// HasCertificateAuthorityData returns a boolean if a field has been set. +func (o *Credentials) HasCertificateAuthorityData() bool { + if o != nil && !IsNil(o.CertificateAuthorityData) { + return true + } + + return false +} + +// SetCertificateAuthorityData gets a reference to the given string and assigns it to the CertificateAuthorityData field. +func (o *Credentials) SetCertificateAuthorityData(v *string) { + o.CertificateAuthorityData = v +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *Credentials) GetKubeconfig() *string { + if o == nil || IsNil(o.Kubeconfig) { + var ret *string + return ret + } + return o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credentials) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *Credentials) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *Credentials) SetKubeconfig(v *string) { + o.Kubeconfig = v +} + +// GetServer returns the Server field value if set, zero value otherwise. +func (o *Credentials) GetServer() *string { + if o == nil || IsNil(o.Server) { + var ret *string + return ret + } + return o.Server +} + +// GetServerOk returns a tuple with the Server field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credentials) GetServerOk() (*string, bool) { + if o == nil || IsNil(o.Server) { + return nil, false + } + return o.Server, true +} + +// HasServer returns a boolean if a field has been set. +func (o *Credentials) HasServer() bool { + if o != nil && !IsNil(o.Server) { + return true + } + + return false +} + +// SetServer gets a reference to the given string and assigns it to the Server field. +func (o *Credentials) SetServer(v *string) { + o.Server = v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *Credentials) GetToken() *string { + if o == nil || IsNil(o.Token) { + var ret *string + return ret + } + return o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credentials) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *Credentials) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *Credentials) SetToken(v *string) { + o.Token = v +} + +func (o Credentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CertificateAuthorityData) { + toSerialize["certificateAuthorityData"] = o.CertificateAuthorityData + } + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + if !IsNil(o.Server) { + toSerialize["server"] = o.Server + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + return toSerialize, nil +} + +type NullableCredentials struct { + value *Credentials + isSet bool +} + +func (v NullableCredentials) Get() *Credentials { + return v.value +} + +func (v *NullableCredentials) Set(val *Credentials) { + v.value = val + v.isSet = true +} + +func (v NullableCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentials(val *Credentials) *NullableCredentials { + return &NullableCredentials{value: val, isSet: true} +} + +func (v NullableCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_credentials_rotation_state.go b/services/ske/model_credentials_rotation_state.go index 826faf7b0..e77ca6c93 100644 --- a/services/ske/model_credentials_rotation_state.go +++ b/services/ske/model_credentials_rotation_state.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the CredentialsRotationState type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsRotationState{} + // CredentialsRotationState struct for CredentialsRotationState type CredentialsRotationState struct { // Format: `2024-02-15T11:06:29Z` @@ -19,3 +26,166 @@ type CredentialsRotationState struct { // Phase of the credentials rotation. `NEVER` indicates that no credentials rotation has been performed using the new credentials rotation endpoints yet. Using the deprecated [rotate-credentials](#tag/Credentials/operation/SkeService_GetClusterCredentials) endpoint will not update this status field. Phase *string `json:"phase,omitempty"` } + +// NewCredentialsRotationState instantiates a new CredentialsRotationState 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 NewCredentialsRotationState() *CredentialsRotationState { + this := CredentialsRotationState{} + return &this +} + +// NewCredentialsRotationStateWithDefaults instantiates a new CredentialsRotationState 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 NewCredentialsRotationStateWithDefaults() *CredentialsRotationState { + this := CredentialsRotationState{} + return &this +} + +// GetLastCompletionTime returns the LastCompletionTime field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetLastCompletionTime() *string { + if o == nil || IsNil(o.LastCompletionTime) { + var ret *string + return ret + } + return o.LastCompletionTime +} + +// GetLastCompletionTimeOk returns a tuple with the LastCompletionTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetLastCompletionTimeOk() (*string, bool) { + if o == nil || IsNil(o.LastCompletionTime) { + return nil, false + } + return o.LastCompletionTime, true +} + +// HasLastCompletionTime returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasLastCompletionTime() bool { + if o != nil && !IsNil(o.LastCompletionTime) { + return true + } + + return false +} + +// SetLastCompletionTime gets a reference to the given string and assigns it to the LastCompletionTime field. +func (o *CredentialsRotationState) SetLastCompletionTime(v *string) { + o.LastCompletionTime = v +} + +// GetLastInitiationTime returns the LastInitiationTime field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetLastInitiationTime() *string { + if o == nil || IsNil(o.LastInitiationTime) { + var ret *string + return ret + } + return o.LastInitiationTime +} + +// GetLastInitiationTimeOk returns a tuple with the LastInitiationTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetLastInitiationTimeOk() (*string, bool) { + if o == nil || IsNil(o.LastInitiationTime) { + return nil, false + } + return o.LastInitiationTime, true +} + +// HasLastInitiationTime returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasLastInitiationTime() bool { + if o != nil && !IsNil(o.LastInitiationTime) { + return true + } + + return false +} + +// SetLastInitiationTime gets a reference to the given string and assigns it to the LastInitiationTime field. +func (o *CredentialsRotationState) SetLastInitiationTime(v *string) { + o.LastInitiationTime = v +} + +// GetPhase returns the Phase field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetPhase() *string { + if o == nil || IsNil(o.Phase) { + var ret *string + return ret + } + return o.Phase +} + +// GetPhaseOk returns a tuple with the Phase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetPhaseOk() (*string, bool) { + if o == nil || IsNil(o.Phase) { + return nil, false + } + return o.Phase, true +} + +// HasPhase returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasPhase() bool { + if o != nil && !IsNil(o.Phase) { + return true + } + + return false +} + +// SetPhase gets a reference to the given string and assigns it to the Phase field. +func (o *CredentialsRotationState) SetPhase(v *string) { + o.Phase = v +} + +func (o CredentialsRotationState) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LastCompletionTime) { + toSerialize["lastCompletionTime"] = o.LastCompletionTime + } + if !IsNil(o.LastInitiationTime) { + toSerialize["lastInitiationTime"] = o.LastInitiationTime + } + if !IsNil(o.Phase) { + toSerialize["phase"] = o.Phase + } + return toSerialize, nil +} + +type NullableCredentialsRotationState struct { + value *CredentialsRotationState + isSet bool +} + +func (v NullableCredentialsRotationState) Get() *CredentialsRotationState { + return v.value +} + +func (v *NullableCredentialsRotationState) Set(val *CredentialsRotationState) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsRotationState) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsRotationState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsRotationState(val *CredentialsRotationState) *NullableCredentialsRotationState { + return &NullableCredentialsRotationState{value: val, isSet: true} +} + +func (v NullableCredentialsRotationState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsRotationState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_cri.go b/services/ske/model_cri.go index e950e8b9a..702234e8e 100644 --- a/services/ske/model_cri.go +++ b/services/ske/model_cri.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the CRI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CRI{} + // CRI struct for CRI type CRI struct { Name *string `json:"name,omitempty"` } + +// NewCRI instantiates a new CRI 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 NewCRI() *CRI { + this := CRI{} + return &this +} + +// NewCRIWithDefaults instantiates a new CRI 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 NewCRIWithDefaults() *CRI { + this := CRI{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CRI) 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 *CRI) 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 *CRI) 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 *CRI) SetName(v *string) { + o.Name = v +} + +func (o CRI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableCRI struct { + value *CRI + isSet bool +} + +func (v NullableCRI) Get() *CRI { + return v.value +} + +func (v *NullableCRI) Set(val *CRI) { + v.value = val + v.isSet = true +} + +func (v NullableCRI) IsSet() bool { + return v.isSet +} + +func (v *NullableCRI) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCRI(val *CRI) *NullableCRI { + return &NullableCRI{value: val, isSet: true} +} + +func (v NullableCRI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCRI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_dns.go b/services/ske/model_dns.go index cfb1df3ec..401a4d9a9 100644 --- a/services/ske/model_dns.go +++ b/services/ske/model_dns.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the DNS type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DNS{} + // DNS struct for DNS type DNS struct { // Enables the dns extension. @@ -18,3 +25,124 @@ type DNS struct { // Array of domain filters for externalDNS, e.g., *.runs.onstackit.cloud. Zones *[]string `json:"zones,omitempty"` } + +type _DNS DNS + +// NewDNS instantiates a new DNS 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 NewDNS(enabled *bool) *DNS { + this := DNS{} + this.Enabled = enabled + return &this +} + +// NewDNSWithDefaults instantiates a new DNS 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 NewDNSWithDefaults() *DNS { + this := DNS{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *DNS) GetEnabled() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *DNS) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled, true +} + +// SetEnabled sets field value +func (o *DNS) SetEnabled(v *bool) { + o.Enabled = v +} + +// GetZones returns the Zones field value if set, zero value otherwise. +func (o *DNS) GetZones() *[]string { + if o == nil || IsNil(o.Zones) { + var ret *[]string + return ret + } + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DNS) GetZonesOk() (*[]string, bool) { + if o == nil || IsNil(o.Zones) { + return nil, false + } + return o.Zones, true +} + +// HasZones returns a boolean if a field has been set. +func (o *DNS) HasZones() bool { + if o != nil && !IsNil(o.Zones) { + return true + } + + return false +} + +// SetZones gets a reference to the given []string and assigns it to the Zones field. +func (o *DNS) SetZones(v *[]string) { + o.Zones = v +} + +func (o DNS) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Zones) { + toSerialize["zones"] = o.Zones + } + return toSerialize, nil +} + +type NullableDNS struct { + value *DNS + isSet bool +} + +func (v NullableDNS) Get() *DNS { + return v.value +} + +func (v *NullableDNS) Set(val *DNS) { + v.value = val + v.isSet = true +} + +func (v NullableDNS) IsSet() bool { + return v.isSet +} + +func (v *NullableDNS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDNS(val *DNS) *NullableDNS { + return &NullableDNS{value: val, isSet: true} +} + +func (v NullableDNS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDNS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_extension.go b/services/ske/model_extension.go index 9ac4c63dd..190cb3f86 100644 --- a/services/ske/model_extension.go +++ b/services/ske/model_extension.go @@ -10,9 +10,179 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Extension type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Extension{} + // Extension struct for Extension type Extension struct { Acl *ACL `json:"acl,omitempty"` Argus *Argus `json:"argus,omitempty"` Dns *DNS `json:"dns,omitempty"` } + +// NewExtension instantiates a new Extension 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 NewExtension() *Extension { + this := Extension{} + return &this +} + +// NewExtensionWithDefaults instantiates a new Extension 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 NewExtensionWithDefaults() *Extension { + this := Extension{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Extension) GetAcl() *ACL { + if o == nil || IsNil(o.Acl) { + var ret *ACL + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Extension) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Extension) SetAcl(v *ACL) { + o.Acl = v +} + +// GetArgus returns the Argus field value if set, zero value otherwise. +func (o *Extension) GetArgus() *Argus { + if o == nil || IsNil(o.Argus) { + var ret *Argus + return ret + } + return o.Argus +} + +// GetArgusOk returns a tuple with the Argus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetArgusOk() (*Argus, bool) { + if o == nil || IsNil(o.Argus) { + return nil, false + } + return o.Argus, true +} + +// HasArgus returns a boolean if a field has been set. +func (o *Extension) HasArgus() bool { + if o != nil && !IsNil(o.Argus) { + return true + } + + return false +} + +// SetArgus gets a reference to the given Argus and assigns it to the Argus field. +func (o *Extension) SetArgus(v *Argus) { + o.Argus = v +} + +// GetDns returns the Dns field value if set, zero value otherwise. +func (o *Extension) GetDns() *DNS { + if o == nil || IsNil(o.Dns) { + var ret *DNS + return ret + } + return o.Dns +} + +// GetDnsOk returns a tuple with the Dns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetDnsOk() (*DNS, bool) { + if o == nil || IsNil(o.Dns) { + return nil, false + } + return o.Dns, true +} + +// HasDns returns a boolean if a field has been set. +func (o *Extension) HasDns() bool { + if o != nil && !IsNil(o.Dns) { + return true + } + + return false +} + +// SetDns gets a reference to the given DNS and assigns it to the Dns field. +func (o *Extension) SetDns(v *DNS) { + o.Dns = v +} + +func (o Extension) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.Argus) { + toSerialize["argus"] = o.Argus + } + if !IsNil(o.Dns) { + toSerialize["dns"] = o.Dns + } + return toSerialize, nil +} + +type NullableExtension struct { + value *Extension + isSet bool +} + +func (v NullableExtension) Get() *Extension { + return v.value +} + +func (v *NullableExtension) Set(val *Extension) { + v.value = val + v.isSet = true +} + +func (v NullableExtension) IsSet() bool { + return v.isSet +} + +func (v *NullableExtension) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtension(val *Extension) *NullableExtension { + return &NullableExtension{value: val, isSet: true} +} + +func (v NullableExtension) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtension) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_hibernation.go b/services/ske/model_hibernation.go index fbfb0e1f1..b26dded29 100644 --- a/services/ske/model_hibernation.go +++ b/services/ske/model_hibernation.go @@ -10,8 +10,101 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Hibernation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Hibernation{} + // Hibernation struct for Hibernation type Hibernation struct { // REQUIRED Schedules *[]HibernationSchedule `json:"schedules"` } + +type _Hibernation Hibernation + +// NewHibernation instantiates a new Hibernation 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 NewHibernation(schedules *[]HibernationSchedule) *Hibernation { + this := Hibernation{} + this.Schedules = schedules + return &this +} + +// NewHibernationWithDefaults instantiates a new Hibernation 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 NewHibernationWithDefaults() *Hibernation { + this := Hibernation{} + return &this +} + +// GetSchedules returns the Schedules field value +func (o *Hibernation) GetSchedules() *[]HibernationSchedule { + if o == nil { + var ret *[]HibernationSchedule + return ret + } + + return o.Schedules +} + +// GetSchedulesOk returns a tuple with the Schedules field value +// and a boolean to check if the value has been set. +func (o *Hibernation) GetSchedulesOk() (*[]HibernationSchedule, bool) { + if o == nil { + return nil, false + } + return o.Schedules, true +} + +// SetSchedules sets field value +func (o *Hibernation) SetSchedules(v *[]HibernationSchedule) { + o.Schedules = v +} + +func (o Hibernation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["schedules"] = o.Schedules + return toSerialize, nil +} + +type NullableHibernation struct { + value *Hibernation + isSet bool +} + +func (v NullableHibernation) Get() *Hibernation { + return v.value +} + +func (v *NullableHibernation) Set(val *Hibernation) { + v.value = val + v.isSet = true +} + +func (v NullableHibernation) IsSet() bool { + return v.isSet +} + +func (v *NullableHibernation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHibernation(val *Hibernation) *NullableHibernation { + return &NullableHibernation{value: val, isSet: true} +} + +func (v NullableHibernation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHibernation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_hibernation_schedule.go b/services/ske/model_hibernation_schedule.go index ad03bdf25..b2cfbe573 100644 --- a/services/ske/model_hibernation_schedule.go +++ b/services/ske/model_hibernation_schedule.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the HibernationSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HibernationSchedule{} + // HibernationSchedule struct for HibernationSchedule type HibernationSchedule struct { // REQUIRED @@ -18,3 +25,150 @@ type HibernationSchedule struct { Start *string `json:"start"` Timezone *string `json:"timezone,omitempty"` } + +type _HibernationSchedule HibernationSchedule + +// NewHibernationSchedule instantiates a new HibernationSchedule 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 NewHibernationSchedule(end *string, start *string) *HibernationSchedule { + this := HibernationSchedule{} + this.End = end + this.Start = start + return &this +} + +// NewHibernationScheduleWithDefaults instantiates a new HibernationSchedule 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 NewHibernationScheduleWithDefaults() *HibernationSchedule { + this := HibernationSchedule{} + return &this +} + +// GetEnd returns the End field value +func (o *HibernationSchedule) GetEnd() *string { + if o == nil { + var ret *string + return ret + } + + return o.End +} + +// GetEndOk returns a tuple with the End field value +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetEndOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.End, true +} + +// SetEnd sets field value +func (o *HibernationSchedule) SetEnd(v *string) { + o.End = v +} + +// GetStart returns the Start field value +func (o *HibernationSchedule) GetStart() *string { + if o == nil { + var ret *string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Start, true +} + +// SetStart sets field value +func (o *HibernationSchedule) SetStart(v *string) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *HibernationSchedule) GetTimezone() *string { + if o == nil || IsNil(o.Timezone) { + var ret *string + return ret + } + return o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetTimezoneOk() (*string, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *HibernationSchedule) HasTimezone() bool { + if o != nil && !IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *HibernationSchedule) SetTimezone(v *string) { + o.Timezone = v +} + +func (o HibernationSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["end"] = o.End + toSerialize["start"] = o.Start + if !IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + return toSerialize, nil +} + +type NullableHibernationSchedule struct { + value *HibernationSchedule + isSet bool +} + +func (v NullableHibernationSchedule) Get() *HibernationSchedule { + return v.value +} + +func (v *NullableHibernationSchedule) Set(val *HibernationSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableHibernationSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableHibernationSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHibernationSchedule(val *HibernationSchedule) *NullableHibernationSchedule { + return &NullableHibernationSchedule{value: val, isSet: true} +} + +func (v NullableHibernationSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHibernationSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_image.go b/services/ske/model_image.go index 240635849..219220c85 100644 --- a/services/ske/model_image.go +++ b/services/ske/model_image.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Image type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Image{} + // Image For valid names and versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `machineImages`. type Image struct { // REQUIRED @@ -17,3 +24,115 @@ type Image struct { // REQUIRED Version *string `json:"version"` } + +type _Image Image + +// NewImage instantiates a new Image 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 NewImage(name *string, version *string) *Image { + this := Image{} + this.Name = name + this.Version = version + return &this +} + +// NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image { + this := Image{} + return &this +} + +// GetName returns the Name field value +func (o *Image) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Image) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Image) SetName(v *string) { + o.Name = v +} + +// GetVersion returns the Version field value +func (o *Image) GetVersion() *string { + if o == nil { + var ret *string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Image) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version, true +} + +// SetVersion sets field value +func (o *Image) SetVersion(v *string) { + o.Version = v +} + +func (o Image) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullableImage struct { + value *Image + isSet bool +} + +func (v NullableImage) Get() *Image { + return v.value +} + +func (v *NullableImage) Set(val *Image) { + v.value = val + v.isSet = true +} + +func (v NullableImage) IsSet() bool { + return v.isSet +} + +func (v *NullableImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImage(val *Image) *NullableImage { + return &NullableImage{value: val, isSet: true} +} + +func (v NullableImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_kubeconfig.go b/services/ske/model_kubeconfig.go index d3914c68b..a347eb05d 100644 --- a/services/ske/model_kubeconfig.go +++ b/services/ske/model_kubeconfig.go @@ -10,8 +10,143 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Kubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubeconfig{} + // Kubeconfig struct for Kubeconfig type Kubeconfig struct { ExpirationTimestamp *string `json:"expirationTimestamp,omitempty"` Kubeconfig *string `json:"kubeconfig,omitempty"` } + +// NewKubeconfig instantiates a new Kubeconfig 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 NewKubeconfig() *Kubeconfig { + this := Kubeconfig{} + return &this +} + +// NewKubeconfigWithDefaults instantiates a new Kubeconfig 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 NewKubeconfigWithDefaults() *Kubeconfig { + this := Kubeconfig{} + return &this +} + +// GetExpirationTimestamp returns the ExpirationTimestamp field value if set, zero value otherwise. +func (o *Kubeconfig) GetExpirationTimestamp() *string { + if o == nil || IsNil(o.ExpirationTimestamp) { + var ret *string + return ret + } + return o.ExpirationTimestamp +} + +// GetExpirationTimestampOk returns a tuple with the ExpirationTimestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetExpirationTimestampOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationTimestamp) { + return nil, false + } + return o.ExpirationTimestamp, true +} + +// HasExpirationTimestamp returns a boolean if a field has been set. +func (o *Kubeconfig) HasExpirationTimestamp() bool { + if o != nil && !IsNil(o.ExpirationTimestamp) { + return true + } + + return false +} + +// SetExpirationTimestamp gets a reference to the given string and assigns it to the ExpirationTimestamp field. +func (o *Kubeconfig) SetExpirationTimestamp(v *string) { + o.ExpirationTimestamp = v +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *Kubeconfig) GetKubeconfig() *string { + if o == nil || IsNil(o.Kubeconfig) { + var ret *string + return ret + } + return o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *Kubeconfig) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *Kubeconfig) SetKubeconfig(v *string) { + o.Kubeconfig = v +} + +func (o Kubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationTimestamp) { + toSerialize["expirationTimestamp"] = o.ExpirationTimestamp + } + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + return toSerialize, nil +} + +type NullableKubeconfig struct { + value *Kubeconfig + isSet bool +} + +func (v NullableKubeconfig) Get() *Kubeconfig { + return v.value +} + +func (v *NullableKubeconfig) Set(val *Kubeconfig) { + v.value = val + v.isSet = true +} + +func (v NullableKubeconfig) IsSet() bool { + return v.isSet +} + +func (v *NullableKubeconfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubeconfig(val *Kubeconfig) *NullableKubeconfig { + return &NullableKubeconfig{value: val, isSet: true} +} + +func (v NullableKubeconfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_kubernetes.go b/services/ske/model_kubernetes.go index 1e5e5d534..bc0eed645 100644 --- a/services/ske/model_kubernetes.go +++ b/services/ske/model_kubernetes.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Kubernetes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubernetes{} + // Kubernetes For valid versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `kubernetesVersions`. type Kubernetes struct { // DEPRECATED as of Kubernetes 1.25+ Flag to specify if privileged mode for containers is enabled or not. This should be used with care since it also disables a couple of other features like the use of some volume type (e.g. PVCs). By default this is set to true. @@ -17,3 +24,124 @@ type Kubernetes struct { // REQUIRED Version *string `json:"version"` } + +type _Kubernetes Kubernetes + +// NewKubernetes instantiates a new Kubernetes 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 NewKubernetes(version *string) *Kubernetes { + this := Kubernetes{} + this.Version = version + return &this +} + +// NewKubernetesWithDefaults instantiates a new Kubernetes 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 NewKubernetesWithDefaults() *Kubernetes { + this := Kubernetes{} + return &this +} + +// GetAllowPrivilegedContainers returns the AllowPrivilegedContainers field value if set, zero value otherwise. +func (o *Kubernetes) GetAllowPrivilegedContainers() *bool { + if o == nil || IsNil(o.AllowPrivilegedContainers) { + var ret *bool + return ret + } + return o.AllowPrivilegedContainers +} + +// GetAllowPrivilegedContainersOk returns a tuple with the AllowPrivilegedContainers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubernetes) GetAllowPrivilegedContainersOk() (*bool, bool) { + if o == nil || IsNil(o.AllowPrivilegedContainers) { + return nil, false + } + return o.AllowPrivilegedContainers, true +} + +// HasAllowPrivilegedContainers returns a boolean if a field has been set. +func (o *Kubernetes) HasAllowPrivilegedContainers() bool { + if o != nil && !IsNil(o.AllowPrivilegedContainers) { + return true + } + + return false +} + +// SetAllowPrivilegedContainers gets a reference to the given bool and assigns it to the AllowPrivilegedContainers field. +func (o *Kubernetes) SetAllowPrivilegedContainers(v *bool) { + o.AllowPrivilegedContainers = v +} + +// GetVersion returns the Version field value +func (o *Kubernetes) GetVersion() *string { + if o == nil { + var ret *string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Kubernetes) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version, true +} + +// SetVersion sets field value +func (o *Kubernetes) SetVersion(v *string) { + o.Version = v +} + +func (o Kubernetes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowPrivilegedContainers) { + toSerialize["allowPrivilegedContainers"] = o.AllowPrivilegedContainers + } + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullableKubernetes struct { + value *Kubernetes + isSet bool +} + +func (v NullableKubernetes) Get() *Kubernetes { + return v.value +} + +func (v *NullableKubernetes) Set(val *Kubernetes) { + v.value = val + v.isSet = true +} + +func (v NullableKubernetes) IsSet() bool { + return v.isSet +} + +func (v *NullableKubernetes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubernetes(val *Kubernetes) *NullableKubernetes { + return &NullableKubernetes{value: val, isSet: true} +} + +func (v NullableKubernetes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubernetes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_kubernetes_version.go b/services/ske/model_kubernetes_version.go index 0a678b176..281781e2f 100644 --- a/services/ske/model_kubernetes_version.go +++ b/services/ske/model_kubernetes_version.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the KubernetesVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KubernetesVersion{} + // KubernetesVersion struct for KubernetesVersion type KubernetesVersion struct { ExpirationDate *string `json:"expirationDate,omitempty"` @@ -17,3 +24,201 @@ type KubernetesVersion struct { State *string `json:"state,omitempty"` Version *string `json:"version,omitempty"` } + +// NewKubernetesVersion instantiates a new KubernetesVersion 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 NewKubernetesVersion() *KubernetesVersion { + this := KubernetesVersion{} + return &this +} + +// NewKubernetesVersionWithDefaults instantiates a new KubernetesVersion 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 NewKubernetesVersionWithDefaults() *KubernetesVersion { + this := KubernetesVersion{} + return &this +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *KubernetesVersion) GetExpirationDate() *string { + if o == nil || IsNil(o.ExpirationDate) { + var ret *string + return ret + } + return o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetExpirationDateOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *KubernetesVersion) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given string and assigns it to the ExpirationDate field. +func (o *KubernetesVersion) SetExpirationDate(v *string) { + o.ExpirationDate = v +} + +// GetFeatureGates returns the FeatureGates field value if set, zero value otherwise. +func (o *KubernetesVersion) GetFeatureGates() *map[string]string { + if o == nil || IsNil(o.FeatureGates) { + var ret *map[string]string + return ret + } + return o.FeatureGates +} + +// GetFeatureGatesOk returns a tuple with the FeatureGates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetFeatureGatesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.FeatureGates) { + return nil, false + } + return o.FeatureGates, true +} + +// HasFeatureGates returns a boolean if a field has been set. +func (o *KubernetesVersion) HasFeatureGates() bool { + if o != nil && !IsNil(o.FeatureGates) { + return true + } + + return false +} + +// SetFeatureGates gets a reference to the given map[string]string and assigns it to the FeatureGates field. +func (o *KubernetesVersion) SetFeatureGates(v *map[string]string) { + o.FeatureGates = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *KubernetesVersion) GetState() *string { + if o == nil || IsNil(o.State) { + var ret *string + return ret + } + return o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *KubernetesVersion) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *KubernetesVersion) SetState(v *string) { + o.State = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *KubernetesVersion) 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 *KubernetesVersion) 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 *KubernetesVersion) 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 *KubernetesVersion) SetVersion(v *string) { + o.Version = v +} + +func (o KubernetesVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationDate) { + toSerialize["expirationDate"] = o.ExpirationDate + } + if !IsNil(o.FeatureGates) { + toSerialize["featureGates"] = o.FeatureGates + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableKubernetesVersion struct { + value *KubernetesVersion + isSet bool +} + +func (v NullableKubernetesVersion) Get() *KubernetesVersion { + return v.value +} + +func (v *NullableKubernetesVersion) Set(val *KubernetesVersion) { + v.value = val + v.isSet = true +} + +func (v NullableKubernetesVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableKubernetesVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubernetesVersion(val *KubernetesVersion) *NullableKubernetesVersion { + return &NullableKubernetesVersion{value: val, isSet: true} +} + +func (v NullableKubernetesVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubernetesVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_list_clusters_response.go b/services/ske/model_list_clusters_response.go index 3da1bcc24..967540e75 100644 --- a/services/ske/model_list_clusters_response.go +++ b/services/ske/model_list_clusters_response.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the ListClustersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListClustersResponse{} + // ListClustersResponse struct for ListClustersResponse type ListClustersResponse struct { Items *[]Cluster `json:"items,omitempty"` } + +// NewListClustersResponse instantiates a new ListClustersResponse 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 NewListClustersResponse() *ListClustersResponse { + this := ListClustersResponse{} + return &this +} + +// NewListClustersResponseWithDefaults instantiates a new ListClustersResponse 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 NewListClustersResponseWithDefaults() *ListClustersResponse { + this := ListClustersResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListClustersResponse) GetItems() *[]Cluster { + if o == nil || IsNil(o.Items) { + var ret *[]Cluster + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListClustersResponse) GetItemsOk() (*[]Cluster, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListClustersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Cluster and assigns it to the Items field. +func (o *ListClustersResponse) SetItems(v *[]Cluster) { + o.Items = v +} + +func (o ListClustersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListClustersResponse struct { + value *ListClustersResponse + isSet bool +} + +func (v NullableListClustersResponse) Get() *ListClustersResponse { + return v.value +} + +func (v *NullableListClustersResponse) Set(val *ListClustersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListClustersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListClustersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListClustersResponse(val *ListClustersResponse) *NullableListClustersResponse { + return &NullableListClustersResponse{value: val, isSet: true} +} + +func (v NullableListClustersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListClustersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_login_kubeconfig.go b/services/ske/model_login_kubeconfig.go index 98adb790e..238bb7d42 100644 --- a/services/ske/model_login_kubeconfig.go +++ b/services/ske/model_login_kubeconfig.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the LoginKubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoginKubeconfig{} + // LoginKubeconfig struct for LoginKubeconfig type LoginKubeconfig struct { Kubeconfig *string `json:"kubeconfig,omitempty"` } + +// NewLoginKubeconfig instantiates a new LoginKubeconfig 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 NewLoginKubeconfig() *LoginKubeconfig { + this := LoginKubeconfig{} + return &this +} + +// NewLoginKubeconfigWithDefaults instantiates a new LoginKubeconfig 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 NewLoginKubeconfigWithDefaults() *LoginKubeconfig { + this := LoginKubeconfig{} + return &this +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *LoginKubeconfig) GetKubeconfig() *string { + if o == nil || IsNil(o.Kubeconfig) { + var ret *string + return ret + } + return o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoginKubeconfig) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *LoginKubeconfig) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *LoginKubeconfig) SetKubeconfig(v *string) { + o.Kubeconfig = v +} + +func (o LoginKubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + return toSerialize, nil +} + +type NullableLoginKubeconfig struct { + value *LoginKubeconfig + isSet bool +} + +func (v NullableLoginKubeconfig) Get() *LoginKubeconfig { + return v.value +} + +func (v *NullableLoginKubeconfig) Set(val *LoginKubeconfig) { + v.value = val + v.isSet = true +} + +func (v NullableLoginKubeconfig) IsSet() bool { + return v.isSet +} + +func (v *NullableLoginKubeconfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoginKubeconfig(val *LoginKubeconfig) *NullableLoginKubeconfig { + return &NullableLoginKubeconfig{value: val, isSet: true} +} + +func (v NullableLoginKubeconfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoginKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_machine.go b/services/ske/model_machine.go index 25e178693..76833af5f 100644 --- a/services/ske/model_machine.go +++ b/services/ske/model_machine.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Machine type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Machine{} + // Machine struct for Machine type Machine struct { // REQUIRED @@ -18,3 +25,115 @@ type Machine struct { // REQUIRED Type *string `json:"type"` } + +type _Machine Machine + +// NewMachine instantiates a new Machine 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 NewMachine(image *Image, type_ *string) *Machine { + this := Machine{} + this.Image = image + this.Type = type_ + return &this +} + +// NewMachineWithDefaults instantiates a new Machine 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 NewMachineWithDefaults() *Machine { + this := Machine{} + return &this +} + +// GetImage returns the Image field value +func (o *Machine) GetImage() *Image { + if o == nil { + var ret *Image + return ret + } + + return o.Image +} + +// GetImageOk returns a tuple with the Image field value +// and a boolean to check if the value has been set. +func (o *Machine) GetImageOk() (*Image, bool) { + if o == nil { + return nil, false + } + return o.Image, true +} + +// SetImage sets field value +func (o *Machine) SetImage(v *Image) { + o.Image = v +} + +// GetType returns the Type field value +func (o *Machine) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Machine) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *Machine) SetType(v *string) { + o.Type = v +} + +func (o Machine) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["image"] = o.Image + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableMachine struct { + value *Machine + isSet bool +} + +func (v NullableMachine) Get() *Machine { + return v.value +} + +func (v *NullableMachine) Set(val *Machine) { + v.value = val + v.isSet = true +} + +func (v NullableMachine) IsSet() bool { + return v.isSet +} + +func (v *NullableMachine) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachine(val *Machine) *NullableMachine { + return &NullableMachine{value: val, isSet: true} +} + +func (v NullableMachine) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachine) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_machine_image.go b/services/ske/model_machine_image.go index 13f26f9c6..a36194d6f 100644 --- a/services/ske/model_machine_image.go +++ b/services/ske/model_machine_image.go @@ -10,8 +10,143 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the MachineImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineImage{} + // MachineImage struct for MachineImage type MachineImage struct { Name *string `json:"name,omitempty"` Versions *[]MachineImageVersion `json:"versions,omitempty"` } + +// NewMachineImage instantiates a new MachineImage 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 NewMachineImage() *MachineImage { + this := MachineImage{} + return &this +} + +// NewMachineImageWithDefaults instantiates a new MachineImage 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 NewMachineImageWithDefaults() *MachineImage { + this := MachineImage{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineImage) 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 *MachineImage) 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 *MachineImage) 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 *MachineImage) SetName(v *string) { + o.Name = v +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *MachineImage) GetVersions() *[]MachineImageVersion { + if o == nil || IsNil(o.Versions) { + var ret *[]MachineImageVersion + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImage) GetVersionsOk() (*[]MachineImageVersion, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *MachineImage) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []MachineImageVersion and assigns it to the Versions field. +func (o *MachineImage) SetVersions(v *[]MachineImageVersion) { + o.Versions = v +} + +func (o MachineImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableMachineImage struct { + value *MachineImage + isSet bool +} + +func (v NullableMachineImage) Get() *MachineImage { + return v.value +} + +func (v *NullableMachineImage) Set(val *MachineImage) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImage) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImage(val *MachineImage) *NullableMachineImage { + return &NullableMachineImage{value: val, isSet: true} +} + +func (v NullableMachineImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_machine_image_version.go b/services/ske/model_machine_image_version.go index df052168c..3286333a7 100644 --- a/services/ske/model_machine_image_version.go +++ b/services/ske/model_machine_image_version.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the MachineImageVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineImageVersion{} + // MachineImageVersion struct for MachineImageVersion type MachineImageVersion struct { Cri *[]CRI `json:"cri,omitempty"` @@ -17,3 +24,201 @@ type MachineImageVersion struct { State *string `json:"state,omitempty"` Version *string `json:"version,omitempty"` } + +// NewMachineImageVersion instantiates a new MachineImageVersion 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 NewMachineImageVersion() *MachineImageVersion { + this := MachineImageVersion{} + return &this +} + +// NewMachineImageVersionWithDefaults instantiates a new MachineImageVersion 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 NewMachineImageVersionWithDefaults() *MachineImageVersion { + this := MachineImageVersion{} + return &this +} + +// GetCri returns the Cri field value if set, zero value otherwise. +func (o *MachineImageVersion) GetCri() *[]CRI { + if o == nil || IsNil(o.Cri) { + var ret *[]CRI + return ret + } + return o.Cri +} + +// GetCriOk returns a tuple with the Cri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetCriOk() (*[]CRI, bool) { + if o == nil || IsNil(o.Cri) { + return nil, false + } + return o.Cri, true +} + +// HasCri returns a boolean if a field has been set. +func (o *MachineImageVersion) HasCri() bool { + if o != nil && !IsNil(o.Cri) { + return true + } + + return false +} + +// SetCri gets a reference to the given []CRI and assigns it to the Cri field. +func (o *MachineImageVersion) SetCri(v *[]CRI) { + o.Cri = v +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *MachineImageVersion) GetExpirationDate() *string { + if o == nil || IsNil(o.ExpirationDate) { + var ret *string + return ret + } + return o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetExpirationDateOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *MachineImageVersion) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given string and assigns it to the ExpirationDate field. +func (o *MachineImageVersion) SetExpirationDate(v *string) { + o.ExpirationDate = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *MachineImageVersion) GetState() *string { + if o == nil || IsNil(o.State) { + var ret *string + return ret + } + return o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *MachineImageVersion) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *MachineImageVersion) SetState(v *string) { + o.State = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *MachineImageVersion) 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 *MachineImageVersion) 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 *MachineImageVersion) 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 *MachineImageVersion) SetVersion(v *string) { + o.Version = v +} + +func (o MachineImageVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cri) { + toSerialize["cri"] = o.Cri + } + if !IsNil(o.ExpirationDate) { + toSerialize["expirationDate"] = o.ExpirationDate + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableMachineImageVersion struct { + value *MachineImageVersion + isSet bool +} + +func (v NullableMachineImageVersion) Get() *MachineImageVersion { + return v.value +} + +func (v *NullableMachineImageVersion) Set(val *MachineImageVersion) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImageVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImageVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImageVersion(val *MachineImageVersion) *NullableMachineImageVersion { + return &NullableMachineImageVersion{value: val, isSet: true} +} + +func (v NullableMachineImageVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImageVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_machine_type.go b/services/ske/model_machine_type.go index 7b1223d6b..d96892935 100644 --- a/services/ske/model_machine_type.go +++ b/services/ske/model_machine_type.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the MachineType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineType{} + // MachineType struct for MachineType type MachineType struct { Architecture *string `json:"architecture,omitempty"` @@ -18,3 +25,236 @@ type MachineType struct { Memory *int64 `json:"memory,omitempty"` Name *string `json:"name,omitempty"` } + +// NewMachineType instantiates a new MachineType 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 NewMachineType() *MachineType { + this := MachineType{} + return &this +} + +// NewMachineTypeWithDefaults instantiates a new MachineType 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 NewMachineTypeWithDefaults() *MachineType { + this := MachineType{} + return &this +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *MachineType) GetArchitecture() *string { + if o == nil || IsNil(o.Architecture) { + var ret *string + return ret + } + return o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *MachineType) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *MachineType) SetArchitecture(v *string) { + o.Architecture = v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *MachineType) GetCpu() *int64 { + if o == nil || IsNil(o.Cpu) { + var ret *int64 + return ret + } + return o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetCpuOk() (*int64, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *MachineType) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +func (o *MachineType) SetCpu(v *int64) { + o.Cpu = v +} + +// GetGpu returns the Gpu field value if set, zero value otherwise. +func (o *MachineType) GetGpu() *int64 { + if o == nil || IsNil(o.Gpu) { + var ret *int64 + return ret + } + return o.Gpu +} + +// GetGpuOk returns a tuple with the Gpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetGpuOk() (*int64, bool) { + if o == nil || IsNil(o.Gpu) { + return nil, false + } + return o.Gpu, true +} + +// HasGpu returns a boolean if a field has been set. +func (o *MachineType) HasGpu() bool { + if o != nil && !IsNil(o.Gpu) { + return true + } + + return false +} + +// SetGpu gets a reference to the given int64 and assigns it to the Gpu field. +func (o *MachineType) SetGpu(v *int64) { + o.Gpu = v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *MachineType) GetMemory() *int64 { + if o == nil || IsNil(o.Memory) { + var ret *int64 + return ret + } + return o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetMemoryOk() (*int64, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *MachineType) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int64 and assigns it to the Memory field. +func (o *MachineType) SetMemory(v *int64) { + o.Memory = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineType) 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 *MachineType) 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 *MachineType) 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 *MachineType) SetName(v *string) { + o.Name = v +} + +func (o MachineType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Gpu) { + toSerialize["gpu"] = o.Gpu + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableMachineType struct { + value *MachineType + isSet bool +} + +func (v NullableMachineType) Get() *MachineType { + return v.value +} + +func (v *NullableMachineType) Set(val *MachineType) { + v.value = val + v.isSet = true +} + +func (v NullableMachineType) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineType(val *MachineType) *NullableMachineType { + return &NullableMachineType{value: val, isSet: true} +} + +func (v NullableMachineType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_maintenance.go b/services/ske/model_maintenance.go index 320269968..531236b44 100644 --- a/services/ske/model_maintenance.go +++ b/services/ske/model_maintenance.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Maintenance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Maintenance{} + // Maintenance struct for Maintenance type Maintenance struct { // REQUIRED @@ -17,3 +24,115 @@ type Maintenance struct { // REQUIRED TimeWindow *TimeWindow `json:"timeWindow"` } + +type _Maintenance Maintenance + +// NewMaintenance instantiates a new Maintenance 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 NewMaintenance(autoUpdate *MaintenanceAutoUpdate, timeWindow *TimeWindow) *Maintenance { + this := Maintenance{} + this.AutoUpdate = autoUpdate + this.TimeWindow = timeWindow + return &this +} + +// NewMaintenanceWithDefaults instantiates a new Maintenance 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 NewMaintenanceWithDefaults() *Maintenance { + this := Maintenance{} + return &this +} + +// GetAutoUpdate returns the AutoUpdate field value +func (o *Maintenance) GetAutoUpdate() *MaintenanceAutoUpdate { + if o == nil { + var ret *MaintenanceAutoUpdate + return ret + } + + return o.AutoUpdate +} + +// GetAutoUpdateOk returns a tuple with the AutoUpdate field value +// and a boolean to check if the value has been set. +func (o *Maintenance) GetAutoUpdateOk() (*MaintenanceAutoUpdate, bool) { + if o == nil { + return nil, false + } + return o.AutoUpdate, true +} + +// SetAutoUpdate sets field value +func (o *Maintenance) SetAutoUpdate(v *MaintenanceAutoUpdate) { + o.AutoUpdate = v +} + +// GetTimeWindow returns the TimeWindow field value +func (o *Maintenance) GetTimeWindow() *TimeWindow { + if o == nil { + var ret *TimeWindow + return ret + } + + return o.TimeWindow +} + +// GetTimeWindowOk returns a tuple with the TimeWindow field value +// and a boolean to check if the value has been set. +func (o *Maintenance) GetTimeWindowOk() (*TimeWindow, bool) { + if o == nil { + return nil, false + } + return o.TimeWindow, true +} + +// SetTimeWindow sets field value +func (o *Maintenance) SetTimeWindow(v *TimeWindow) { + o.TimeWindow = v +} + +func (o Maintenance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["autoUpdate"] = o.AutoUpdate + toSerialize["timeWindow"] = o.TimeWindow + return toSerialize, nil +} + +type NullableMaintenance struct { + value *Maintenance + isSet bool +} + +func (v NullableMaintenance) Get() *Maintenance { + return v.value +} + +func (v *NullableMaintenance) Set(val *Maintenance) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenance) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenance(val *Maintenance) *NullableMaintenance { + return &NullableMaintenance{value: val, isSet: true} +} + +func (v NullableMaintenance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_maintenance_auto_update.go b/services/ske/model_maintenance_auto_update.go index 35f8d39bf..d9d4dfc00 100644 --- a/services/ske/model_maintenance_auto_update.go +++ b/services/ske/model_maintenance_auto_update.go @@ -10,8 +10,143 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the MaintenanceAutoUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceAutoUpdate{} + // MaintenanceAutoUpdate struct for MaintenanceAutoUpdate type MaintenanceAutoUpdate struct { KubernetesVersion *bool `json:"kubernetesVersion,omitempty"` MachineImageVersion *bool `json:"machineImageVersion,omitempty"` } + +// NewMaintenanceAutoUpdate instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdate() *MaintenanceAutoUpdate { + this := MaintenanceAutoUpdate{} + return &this +} + +// NewMaintenanceAutoUpdateWithDefaults instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdateWithDefaults() *MaintenanceAutoUpdate { + this := MaintenanceAutoUpdate{} + return &this +} + +// GetKubernetesVersion returns the KubernetesVersion field value if set, zero value otherwise. +func (o *MaintenanceAutoUpdate) GetKubernetesVersion() *bool { + if o == nil || IsNil(o.KubernetesVersion) { + var ret *bool + return ret + } + return o.KubernetesVersion +} + +// GetKubernetesVersionOk returns a tuple with the KubernetesVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceAutoUpdate) GetKubernetesVersionOk() (*bool, bool) { + if o == nil || IsNil(o.KubernetesVersion) { + return nil, false + } + return o.KubernetesVersion, true +} + +// HasKubernetesVersion returns a boolean if a field has been set. +func (o *MaintenanceAutoUpdate) HasKubernetesVersion() bool { + if o != nil && !IsNil(o.KubernetesVersion) { + return true + } + + return false +} + +// SetKubernetesVersion gets a reference to the given bool and assigns it to the KubernetesVersion field. +func (o *MaintenanceAutoUpdate) SetKubernetesVersion(v *bool) { + o.KubernetesVersion = v +} + +// GetMachineImageVersion returns the MachineImageVersion field value if set, zero value otherwise. +func (o *MaintenanceAutoUpdate) GetMachineImageVersion() *bool { + if o == nil || IsNil(o.MachineImageVersion) { + var ret *bool + return ret + } + return o.MachineImageVersion +} + +// GetMachineImageVersionOk returns a tuple with the MachineImageVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceAutoUpdate) GetMachineImageVersionOk() (*bool, bool) { + if o == nil || IsNil(o.MachineImageVersion) { + return nil, false + } + return o.MachineImageVersion, true +} + +// HasMachineImageVersion returns a boolean if a field has been set. +func (o *MaintenanceAutoUpdate) HasMachineImageVersion() bool { + if o != nil && !IsNil(o.MachineImageVersion) { + return true + } + + return false +} + +// SetMachineImageVersion gets a reference to the given bool and assigns it to the MachineImageVersion field. +func (o *MaintenanceAutoUpdate) SetMachineImageVersion(v *bool) { + o.MachineImageVersion = v +} + +func (o MaintenanceAutoUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.KubernetesVersion) { + toSerialize["kubernetesVersion"] = o.KubernetesVersion + } + if !IsNil(o.MachineImageVersion) { + toSerialize["machineImageVersion"] = o.MachineImageVersion + } + return toSerialize, nil +} + +type NullableMaintenanceAutoUpdate struct { + value *MaintenanceAutoUpdate + isSet bool +} + +func (v NullableMaintenanceAutoUpdate) Get() *MaintenanceAutoUpdate { + return v.value +} + +func (v *NullableMaintenanceAutoUpdate) Set(val *MaintenanceAutoUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceAutoUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceAutoUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceAutoUpdate(val *MaintenanceAutoUpdate) *NullableMaintenanceAutoUpdate { + return &NullableMaintenanceAutoUpdate{value: val, isSet: true} +} + +func (v NullableMaintenanceAutoUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceAutoUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_network.go b/services/ske/model_network.go index 247bb1e60..e07afe096 100644 --- a/services/ske/model_network.go +++ b/services/ske/model_network.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +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 { Id *string `json:"id,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 +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Network) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Network) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Network) SetId(v *string) { + o.Id = v +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + 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/ske/model_nodepool.go b/services/ske/model_nodepool.go index 04c79cb93..8508e1f92 100644 --- a/services/ske/model_nodepool.go +++ b/services/ske/model_nodepool.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Nodepool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Nodepool{} + // Nodepool struct for Nodepool type Nodepool struct { // This needs to be true for at least one node pool. @@ -33,3 +40,429 @@ type Nodepool struct { // REQUIRED Volume *Volume `json:"volume"` } + +type _Nodepool Nodepool + +// NewNodepool instantiates a new Nodepool 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 NewNodepool(availabilityZones *[]string, machine *Machine, maximum *int64, minimum *int64, name *string, volume *Volume) *Nodepool { + this := Nodepool{} + this.AvailabilityZones = availabilityZones + this.Machine = machine + this.Maximum = maximum + this.Minimum = minimum + this.Name = name + this.Volume = volume + return &this +} + +// NewNodepoolWithDefaults instantiates a new Nodepool 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 NewNodepoolWithDefaults() *Nodepool { + this := Nodepool{} + return &this +} + +// GetAllowSystemComponents returns the AllowSystemComponents field value if set, zero value otherwise. +func (o *Nodepool) GetAllowSystemComponents() *bool { + if o == nil || IsNil(o.AllowSystemComponents) { + var ret *bool + return ret + } + return o.AllowSystemComponents +} + +// GetAllowSystemComponentsOk returns a tuple with the AllowSystemComponents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetAllowSystemComponentsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowSystemComponents) { + return nil, false + } + return o.AllowSystemComponents, true +} + +// HasAllowSystemComponents returns a boolean if a field has been set. +func (o *Nodepool) HasAllowSystemComponents() bool { + if o != nil && !IsNil(o.AllowSystemComponents) { + return true + } + + return false +} + +// SetAllowSystemComponents gets a reference to the given bool and assigns it to the AllowSystemComponents field. +func (o *Nodepool) SetAllowSystemComponents(v *bool) { + o.AllowSystemComponents = v +} + +// GetAvailabilityZones returns the AvailabilityZones field value +func (o *Nodepool) GetAvailabilityZones() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.AvailabilityZones +} + +// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetAvailabilityZonesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.AvailabilityZones, true +} + +// SetAvailabilityZones sets field value +func (o *Nodepool) SetAvailabilityZones(v *[]string) { + o.AvailabilityZones = v +} + +// GetCri returns the Cri field value if set, zero value otherwise. +func (o *Nodepool) GetCri() *CRI { + if o == nil || IsNil(o.Cri) { + var ret *CRI + return ret + } + return o.Cri +} + +// GetCriOk returns a tuple with the Cri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetCriOk() (*CRI, bool) { + if o == nil || IsNil(o.Cri) { + return nil, false + } + return o.Cri, true +} + +// HasCri returns a boolean if a field has been set. +func (o *Nodepool) HasCri() bool { + if o != nil && !IsNil(o.Cri) { + return true + } + + return false +} + +// SetCri gets a reference to the given CRI and assigns it to the Cri field. +func (o *Nodepool) SetCri(v *CRI) { + o.Cri = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Nodepool) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Nodepool) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Nodepool) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetMachine returns the Machine field value +func (o *Nodepool) GetMachine() *Machine { + if o == nil { + var ret *Machine + return ret + } + + return o.Machine +} + +// GetMachineOk returns a tuple with the Machine field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMachineOk() (*Machine, bool) { + if o == nil { + return nil, false + } + return o.Machine, true +} + +// SetMachine sets field value +func (o *Nodepool) SetMachine(v *Machine) { + o.Machine = v +} + +// GetMaxSurge returns the MaxSurge field value if set, zero value otherwise. +func (o *Nodepool) GetMaxSurge() *int64 { + if o == nil || IsNil(o.MaxSurge) { + var ret *int64 + return ret + } + return o.MaxSurge +} + +// GetMaxSurgeOk returns a tuple with the MaxSurge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaxSurgeOk() (*int64, bool) { + if o == nil || IsNil(o.MaxSurge) { + return nil, false + } + return o.MaxSurge, true +} + +// HasMaxSurge returns a boolean if a field has been set. +func (o *Nodepool) HasMaxSurge() bool { + if o != nil && !IsNil(o.MaxSurge) { + return true + } + + return false +} + +// SetMaxSurge gets a reference to the given int64 and assigns it to the MaxSurge field. +func (o *Nodepool) SetMaxSurge(v *int64) { + o.MaxSurge = v +} + +// GetMaxUnavailable returns the MaxUnavailable field value if set, zero value otherwise. +func (o *Nodepool) GetMaxUnavailable() *int64 { + if o == nil || IsNil(o.MaxUnavailable) { + var ret *int64 + return ret + } + return o.MaxUnavailable +} + +// GetMaxUnavailableOk returns a tuple with the MaxUnavailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaxUnavailableOk() (*int64, bool) { + if o == nil || IsNil(o.MaxUnavailable) { + return nil, false + } + return o.MaxUnavailable, true +} + +// HasMaxUnavailable returns a boolean if a field has been set. +func (o *Nodepool) HasMaxUnavailable() bool { + if o != nil && !IsNil(o.MaxUnavailable) { + return true + } + + return false +} + +// SetMaxUnavailable gets a reference to the given int64 and assigns it to the MaxUnavailable field. +func (o *Nodepool) SetMaxUnavailable(v *int64) { + o.MaxUnavailable = v +} + +// GetMaximum returns the Maximum field value +func (o *Nodepool) GetMaximum() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Maximum +} + +// GetMaximumOk returns a tuple with the Maximum field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaximumOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Maximum, true +} + +// SetMaximum sets field value +func (o *Nodepool) SetMaximum(v *int64) { + o.Maximum = v +} + +// GetMinimum returns the Minimum field value +func (o *Nodepool) GetMinimum() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Minimum +} + +// GetMinimumOk returns a tuple with the Minimum field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMinimumOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Minimum, true +} + +// SetMinimum sets field value +func (o *Nodepool) SetMinimum(v *int64) { + o.Minimum = v +} + +// GetName returns the Name field value +func (o *Nodepool) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Nodepool) SetName(v *string) { + o.Name = v +} + +// GetTaints returns the Taints field value if set, zero value otherwise. +func (o *Nodepool) GetTaints() *[]Taint { + if o == nil || IsNil(o.Taints) { + var ret *[]Taint + return ret + } + return o.Taints +} + +// GetTaintsOk returns a tuple with the Taints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetTaintsOk() (*[]Taint, bool) { + if o == nil || IsNil(o.Taints) { + return nil, false + } + return o.Taints, true +} + +// HasTaints returns a boolean if a field has been set. +func (o *Nodepool) HasTaints() bool { + if o != nil && !IsNil(o.Taints) { + return true + } + + return false +} + +// SetTaints gets a reference to the given []Taint and assigns it to the Taints field. +func (o *Nodepool) SetTaints(v *[]Taint) { + o.Taints = v +} + +// GetVolume returns the Volume field value +func (o *Nodepool) GetVolume() *Volume { + if o == nil { + var ret *Volume + return ret + } + + return o.Volume +} + +// GetVolumeOk returns a tuple with the Volume field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetVolumeOk() (*Volume, bool) { + if o == nil { + return nil, false + } + return o.Volume, true +} + +// SetVolume sets field value +func (o *Nodepool) SetVolume(v *Volume) { + o.Volume = v +} + +func (o Nodepool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowSystemComponents) { + toSerialize["allowSystemComponents"] = o.AllowSystemComponents + } + toSerialize["availabilityZones"] = o.AvailabilityZones + if !IsNil(o.Cri) { + toSerialize["cri"] = o.Cri + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["machine"] = o.Machine + if !IsNil(o.MaxSurge) { + toSerialize["maxSurge"] = o.MaxSurge + } + if !IsNil(o.MaxUnavailable) { + toSerialize["maxUnavailable"] = o.MaxUnavailable + } + toSerialize["maximum"] = o.Maximum + toSerialize["minimum"] = o.Minimum + toSerialize["name"] = o.Name + if !IsNil(o.Taints) { + toSerialize["taints"] = o.Taints + } + toSerialize["volume"] = o.Volume + return toSerialize, nil +} + +type NullableNodepool struct { + value *Nodepool + isSet bool +} + +func (v NullableNodepool) Get() *Nodepool { + return v.value +} + +func (v *NullableNodepool) Set(val *Nodepool) { + v.value = val + v.isSet = true +} + +func (v NullableNodepool) IsSet() bool { + return v.isSet +} + +func (v *NullableNodepool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodepool(val *Nodepool) *NullableNodepool { + return &NullableNodepool{value: val, isSet: true} +} + +func (v NullableNodepool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodepool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_project_response.go b/services/ske/model_project_response.go index a6d4fdd48..fd7276b79 100644 --- a/services/ske/model_project_response.go +++ b/services/ske/model_project_response.go @@ -10,8 +10,147 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the ProjectResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectResponse{} + // ProjectResponse struct for ProjectResponse type ProjectResponse struct { ProjectId *string `json:"projectId,omitempty"` State *ProjectState `json:"state,omitempty"` } + +// NewProjectResponse instantiates a new ProjectResponse 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 NewProjectResponse() *ProjectResponse { + this := ProjectResponse{} + var state ProjectState = PROJECTSTATE_UNSPECIFIED + this.State = &state + return &this +} + +// NewProjectResponseWithDefaults instantiates a new ProjectResponse 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 NewProjectResponseWithDefaults() *ProjectResponse { + this := ProjectResponse{} + var state ProjectState = PROJECTSTATE_UNSPECIFIED + this.State = &state + return &this +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *ProjectResponse) 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 *ProjectResponse) 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 *ProjectResponse) 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 *ProjectResponse) SetProjectId(v *string) { + o.ProjectId = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ProjectResponse) GetState() *ProjectState { + if o == nil || IsNil(o.State) { + var ret *ProjectState + return ret + } + return o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectResponse) GetStateOk() (*ProjectState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ProjectResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given ProjectState and assigns it to the State field. +func (o *ProjectResponse) SetState(v *ProjectState) { + o.State = v +} + +func (o ProjectResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectId) { + toSerialize["projectId"] = o.ProjectId + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableProjectResponse struct { + value *ProjectResponse + isSet bool +} + +func (v NullableProjectResponse) Get() *ProjectResponse { + return v.value +} + +func (v *NullableProjectResponse) Set(val *ProjectResponse) { + v.value = val + v.isSet = true +} + +func (v NullableProjectResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectResponse(val *ProjectResponse) *NullableProjectResponse { + return &NullableProjectResponse{value: val, isSet: true} +} + +func (v NullableProjectResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_provider_options.go b/services/ske/model_provider_options.go index d7fd2a690..a68522dc1 100644 --- a/services/ske/model_provider_options.go +++ b/services/ske/model_provider_options.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the ProviderOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderOptions{} + // ProviderOptions struct for ProviderOptions type ProviderOptions struct { AvailabilityZones *[]AvailabilityZone `json:"availabilityZones,omitempty"` @@ -18,3 +25,236 @@ type ProviderOptions struct { MachineTypes *[]MachineType `json:"machineTypes,omitempty"` VolumeTypes *[]VolumeType `json:"volumeTypes,omitempty"` } + +// NewProviderOptions instantiates a new ProviderOptions 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 NewProviderOptions() *ProviderOptions { + this := ProviderOptions{} + return &this +} + +// NewProviderOptionsWithDefaults instantiates a new ProviderOptions 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 NewProviderOptionsWithDefaults() *ProviderOptions { + this := ProviderOptions{} + return &this +} + +// GetAvailabilityZones returns the AvailabilityZones field value if set, zero value otherwise. +func (o *ProviderOptions) GetAvailabilityZones() *[]AvailabilityZone { + if o == nil || IsNil(o.AvailabilityZones) { + var ret *[]AvailabilityZone + return ret + } + return o.AvailabilityZones +} + +// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetAvailabilityZonesOk() (*[]AvailabilityZone, bool) { + if o == nil || IsNil(o.AvailabilityZones) { + return nil, false + } + return o.AvailabilityZones, true +} + +// HasAvailabilityZones returns a boolean if a field has been set. +func (o *ProviderOptions) HasAvailabilityZones() bool { + if o != nil && !IsNil(o.AvailabilityZones) { + return true + } + + return false +} + +// SetAvailabilityZones gets a reference to the given []AvailabilityZone and assigns it to the AvailabilityZones field. +func (o *ProviderOptions) SetAvailabilityZones(v *[]AvailabilityZone) { + o.AvailabilityZones = v +} + +// GetKubernetesVersions returns the KubernetesVersions field value if set, zero value otherwise. +func (o *ProviderOptions) GetKubernetesVersions() *[]KubernetesVersion { + if o == nil || IsNil(o.KubernetesVersions) { + var ret *[]KubernetesVersion + return ret + } + return o.KubernetesVersions +} + +// GetKubernetesVersionsOk returns a tuple with the KubernetesVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetKubernetesVersionsOk() (*[]KubernetesVersion, bool) { + if o == nil || IsNil(o.KubernetesVersions) { + return nil, false + } + return o.KubernetesVersions, true +} + +// HasKubernetesVersions returns a boolean if a field has been set. +func (o *ProviderOptions) HasKubernetesVersions() bool { + if o != nil && !IsNil(o.KubernetesVersions) { + return true + } + + return false +} + +// SetKubernetesVersions gets a reference to the given []KubernetesVersion and assigns it to the KubernetesVersions field. +func (o *ProviderOptions) SetKubernetesVersions(v *[]KubernetesVersion) { + o.KubernetesVersions = v +} + +// GetMachineImages returns the MachineImages field value if set, zero value otherwise. +func (o *ProviderOptions) GetMachineImages() *[]MachineImage { + if o == nil || IsNil(o.MachineImages) { + var ret *[]MachineImage + return ret + } + return o.MachineImages +} + +// GetMachineImagesOk returns a tuple with the MachineImages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetMachineImagesOk() (*[]MachineImage, bool) { + if o == nil || IsNil(o.MachineImages) { + return nil, false + } + return o.MachineImages, true +} + +// HasMachineImages returns a boolean if a field has been set. +func (o *ProviderOptions) HasMachineImages() bool { + if o != nil && !IsNil(o.MachineImages) { + return true + } + + return false +} + +// SetMachineImages gets a reference to the given []MachineImage and assigns it to the MachineImages field. +func (o *ProviderOptions) SetMachineImages(v *[]MachineImage) { + o.MachineImages = v +} + +// GetMachineTypes returns the MachineTypes field value if set, zero value otherwise. +func (o *ProviderOptions) GetMachineTypes() *[]MachineType { + if o == nil || IsNil(o.MachineTypes) { + var ret *[]MachineType + return ret + } + return o.MachineTypes +} + +// GetMachineTypesOk returns a tuple with the MachineTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetMachineTypesOk() (*[]MachineType, bool) { + if o == nil || IsNil(o.MachineTypes) { + return nil, false + } + return o.MachineTypes, true +} + +// HasMachineTypes returns a boolean if a field has been set. +func (o *ProviderOptions) HasMachineTypes() bool { + if o != nil && !IsNil(o.MachineTypes) { + return true + } + + return false +} + +// SetMachineTypes gets a reference to the given []MachineType and assigns it to the MachineTypes field. +func (o *ProviderOptions) SetMachineTypes(v *[]MachineType) { + o.MachineTypes = v +} + +// GetVolumeTypes returns the VolumeTypes field value if set, zero value otherwise. +func (o *ProviderOptions) GetVolumeTypes() *[]VolumeType { + if o == nil || IsNil(o.VolumeTypes) { + var ret *[]VolumeType + return ret + } + return o.VolumeTypes +} + +// GetVolumeTypesOk returns a tuple with the VolumeTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetVolumeTypesOk() (*[]VolumeType, bool) { + if o == nil || IsNil(o.VolumeTypes) { + return nil, false + } + return o.VolumeTypes, true +} + +// HasVolumeTypes returns a boolean if a field has been set. +func (o *ProviderOptions) HasVolumeTypes() bool { + if o != nil && !IsNil(o.VolumeTypes) { + return true + } + + return false +} + +// SetVolumeTypes gets a reference to the given []VolumeType and assigns it to the VolumeTypes field. +func (o *ProviderOptions) SetVolumeTypes(v *[]VolumeType) { + o.VolumeTypes = v +} + +func (o ProviderOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZones) { + toSerialize["availabilityZones"] = o.AvailabilityZones + } + if !IsNil(o.KubernetesVersions) { + toSerialize["kubernetesVersions"] = o.KubernetesVersions + } + if !IsNil(o.MachineImages) { + toSerialize["machineImages"] = o.MachineImages + } + if !IsNil(o.MachineTypes) { + toSerialize["machineTypes"] = o.MachineTypes + } + if !IsNil(o.VolumeTypes) { + toSerialize["volumeTypes"] = o.VolumeTypes + } + return toSerialize, nil +} + +type NullableProviderOptions struct { + value *ProviderOptions + isSet bool +} + +func (v NullableProviderOptions) Get() *ProviderOptions { + return v.value +} + +func (v *NullableProviderOptions) Set(val *ProviderOptions) { + v.value = val + v.isSet = true +} + +func (v NullableProviderOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderOptions(val *ProviderOptions) *NullableProviderOptions { + return &NullableProviderOptions{value: val, isSet: true} +} + +func (v NullableProviderOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_runtime_error.go b/services/ske/model_runtime_error.go index bdaa77252..4c63a7e71 100644 --- a/services/ske/model_runtime_error.go +++ b/services/ske/model_runtime_error.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the RuntimeError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuntimeError{} + // RuntimeError struct for RuntimeError type RuntimeError struct { // - Code: `SKE_UNSPECIFIED` Message: \"An error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_TMP_AUTH_ERROR` Message: \"Authentication failed. This is a temporary error. Please wait while the system recovers.\" - Code: `SKE_QUOTA_EXCEEDED` Message: \"Your project's resource quotas are exhausted. Please make sure your quota is sufficient for the ordered cluster.\" - Code: `SKE_ARGUS_INSTANCE_NOT_FOUND` Message: \"The provided Argus instance could not be found.\" - Code: `SKE_RATE_LIMITS` Message: \"While provisioning your cluster, request rate limits where incurred. Please wait while the system recovers.\" - Code: `SKE_INFRA_ERROR` Message: \"An error occurred with the underlying infrastructure. Please open a support ticket if this error persists.\" - Code: `SKE_REMAINING_RESOURCES` Message: \"There are remaining Kubernetes resources in your cluster that prevent deletion. Please make sure to remove them.\" - Code: `SKE_CONFIGURATION_PROBLEM` Message: \"A configuration error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_UNREADY_NODES` Message: \"Not all worker nodes are ready. Please open a support ticket if this error persists.\" - Code: `SKE_API_SERVER_ERROR` Message: \"The Kubernetes API server is not reporting readiness. Please open a support ticket if this error persists.\" - Code: `SKE_DNS_ZONE_NOT_FOUND` Message: \"The provided DNS zone for the STACKIT DNS extension could not be found. Please ensure you defined a valid domain that belongs to a STACKIT DNS zone.\" @@ -17,3 +24,166 @@ type RuntimeError struct { Details *string `json:"details,omitempty"` Message *string `json:"message,omitempty"` } + +// NewRuntimeError instantiates a new RuntimeError 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 NewRuntimeError() *RuntimeError { + this := RuntimeError{} + return &this +} + +// NewRuntimeErrorWithDefaults instantiates a new RuntimeError 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 NewRuntimeErrorWithDefaults() *RuntimeError { + this := RuntimeError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *RuntimeError) GetCode() *string { + if o == nil || IsNil(o.Code) { + var ret *string + 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 *RuntimeError) GetCodeOk() (*string, 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 *RuntimeError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *RuntimeError) SetCode(v *string) { + o.Code = v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *RuntimeError) GetDetails() *string { + if o == nil || IsNil(o.Details) { + var ret *string + 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 *RuntimeError) GetDetailsOk() (*string, 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 *RuntimeError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *RuntimeError) SetDetails(v *string) { + o.Details = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RuntimeError) 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 *RuntimeError) 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 *RuntimeError) 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 *RuntimeError) SetMessage(v *string) { + o.Message = v +} + +func (o RuntimeError) 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 NullableRuntimeError struct { + value *RuntimeError + isSet bool +} + +func (v NullableRuntimeError) Get() *RuntimeError { + return v.value +} + +func (v *NullableRuntimeError) Set(val *RuntimeError) { + v.value = val + v.isSet = true +} + +func (v NullableRuntimeError) IsSet() bool { + return v.isSet +} + +func (v *NullableRuntimeError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuntimeError(val *RuntimeError) *NullableRuntimeError { + return &NullableRuntimeError{value: val, isSet: true} +} + +func (v NullableRuntimeError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuntimeError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_taint.go b/services/ske/model_taint.go index b2414d8d5..29150df93 100644 --- a/services/ske/model_taint.go +++ b/services/ske/model_taint.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Taint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Taint{} + // Taint struct for Taint type Taint struct { // REQUIRED @@ -18,3 +25,150 @@ type Taint struct { Key *string `json:"key"` Value *string `json:"value,omitempty"` } + +type _Taint Taint + +// NewTaint instantiates a new Taint 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 NewTaint(effect *string, key *string) *Taint { + this := Taint{} + this.Effect = effect + this.Key = key + return &this +} + +// NewTaintWithDefaults instantiates a new Taint 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 NewTaintWithDefaults() *Taint { + this := Taint{} + return &this +} + +// GetEffect returns the Effect field value +func (o *Taint) GetEffect() *string { + if o == nil { + var ret *string + return ret + } + + return o.Effect +} + +// GetEffectOk returns a tuple with the Effect field value +// and a boolean to check if the value has been set. +func (o *Taint) GetEffectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Effect, true +} + +// SetEffect sets field value +func (o *Taint) SetEffect(v *string) { + o.Effect = v +} + +// GetKey returns the Key field value +func (o *Taint) GetKey() *string { + if o == nil { + var ret *string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *Taint) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key, true +} + +// SetKey sets field value +func (o *Taint) SetKey(v *string) { + o.Key = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Taint) GetValue() *string { + if o == nil || IsNil(o.Value) { + var ret *string + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Taint) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Taint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *Taint) SetValue(v *string) { + o.Value = v +} + +func (o Taint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["effect"] = o.Effect + toSerialize["key"] = o.Key + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableTaint struct { + value *Taint + isSet bool +} + +func (v NullableTaint) Get() *Taint { + return v.value +} + +func (v *NullableTaint) Set(val *Taint) { + v.value = val + v.isSet = true +} + +func (v NullableTaint) IsSet() bool { + return v.isSet +} + +func (v *NullableTaint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaint(val *Taint) *NullableTaint { + return &NullableTaint{value: val, isSet: true} +} + +func (v NullableTaint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_time_window.go b/services/ske/model_time_window.go index 7645c5335..4c5685af5 100644 --- a/services/ske/model_time_window.go +++ b/services/ske/model_time_window.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the TimeWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TimeWindow{} + // TimeWindow struct for TimeWindow type TimeWindow struct { // REQUIRED @@ -17,3 +24,115 @@ type TimeWindow struct { // REQUIRED Start *string `json:"start"` } + +type _TimeWindow TimeWindow + +// NewTimeWindow instantiates a new TimeWindow 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 NewTimeWindow(end *string, start *string) *TimeWindow { + this := TimeWindow{} + this.End = end + this.Start = start + return &this +} + +// NewTimeWindowWithDefaults instantiates a new TimeWindow 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 NewTimeWindowWithDefaults() *TimeWindow { + this := TimeWindow{} + return &this +} + +// GetEnd returns the End field value +func (o *TimeWindow) GetEnd() *string { + if o == nil { + var ret *string + return ret + } + + return o.End +} + +// GetEndOk returns a tuple with the End field value +// and a boolean to check if the value has been set. +func (o *TimeWindow) GetEndOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.End, true +} + +// SetEnd sets field value +func (o *TimeWindow) SetEnd(v *string) { + o.End = v +} + +// GetStart returns the Start field value +func (o *TimeWindow) GetStart() *string { + if o == nil { + var ret *string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *TimeWindow) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Start, true +} + +// SetStart sets field value +func (o *TimeWindow) SetStart(v *string) { + o.Start = v +} + +func (o TimeWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["end"] = o.End + toSerialize["start"] = o.Start + return toSerialize, nil +} + +type NullableTimeWindow struct { + value *TimeWindow + isSet bool +} + +func (v NullableTimeWindow) Get() *TimeWindow { + return v.value +} + +func (v *NullableTimeWindow) Set(val *TimeWindow) { + v.value = val + v.isSet = true +} + +func (v NullableTimeWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableTimeWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimeWindow(val *TimeWindow) *NullableTimeWindow { + return &NullableTimeWindow{value: val, isSet: true} +} + +func (v NullableTimeWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimeWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_volume.go b/services/ske/model_volume.go index 1956d2136..5f011c075 100644 --- a/services/ske/model_volume.go +++ b/services/ske/model_volume.go @@ -10,6 +10,13 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the Volume type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Volume{} + // Volume struct for Volume type Volume struct { // REQUIRED @@ -17,3 +24,124 @@ type Volume struct { // For valid values please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `volumeTypes`. Type *string `json:"type,omitempty"` } + +type _Volume Volume + +// NewVolume instantiates a new Volume 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 NewVolume(size *int64) *Volume { + this := Volume{} + this.Size = size + return &this +} + +// NewVolumeWithDefaults instantiates a new Volume 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 NewVolumeWithDefaults() *Volume { + this := Volume{} + return &this +} + +// GetSize returns the Size field value +func (o *Volume) GetSize() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *Volume) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Size, true +} + +// SetSize sets field value +func (o *Volume) SetSize(v *int64) { + o.Size = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Volume) 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 *Volume) 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 *Volume) 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 *Volume) SetType(v *string) { + o.Type = v +} + +func (o Volume) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["size"] = o.Size + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableVolume struct { + value *Volume + isSet bool +} + +func (v NullableVolume) Get() *Volume { + return v.value +} + +func (v *NullableVolume) Set(val *Volume) { + v.value = val + v.isSet = true +} + +func (v NullableVolume) IsSet() bool { + return v.isSet +} + +func (v *NullableVolume) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolume(val *Volume) *NullableVolume { + return &NullableVolume{value: val, isSet: true} +} + +func (v NullableVolume) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolume) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_volume_type.go b/services/ske/model_volume_type.go index 838837ccb..58b91721a 100644 --- a/services/ske/model_volume_type.go +++ b/services/ske/model_volume_type.go @@ -10,7 +10,107 @@ API version: 1.1 package ske +import ( + "encoding/json" +) + +// checks if the VolumeType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumeType{} + // VolumeType struct for VolumeType type VolumeType struct { Name *string `json:"name,omitempty"` } + +// NewVolumeType instantiates a new VolumeType 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 NewVolumeType() *VolumeType { + this := VolumeType{} + return &this +} + +// NewVolumeTypeWithDefaults instantiates a new VolumeType 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 NewVolumeTypeWithDefaults() *VolumeType { + this := VolumeType{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *VolumeType) 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 *VolumeType) 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 *VolumeType) 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 *VolumeType) SetName(v *string) { + o.Name = v +} + +func (o VolumeType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableVolumeType struct { + value *VolumeType + isSet bool +} + +func (v NullableVolumeType) Get() *VolumeType { + return v.value +} + +func (v *NullableVolumeType) Set(val *VolumeType) { + v.value = val + v.isSet = true +} + +func (v NullableVolumeType) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumeType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumeType(val *VolumeType) *NullableVolumeType { + return &NullableVolumeType{value: val, isSet: true} +} + +func (v NullableVolumeType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumeType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}