diff --git a/services/ske/model_cluster_error.go b/services/ske/model_cluster_error.go new file mode 100644 index 000000000..39567e727 --- /dev/null +++ b/services/ske/model_cluster_error.go @@ -0,0 +1,175 @@ +/* +SKE-API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ske + +import ( + "encoding/json" +) + +// checks if the ClusterError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterError{} + +/* + types and functions for code +*/ + +// isEnumRef +type ClusterErrorGetCodeAttributeType = *string +type ClusterErrorGetCodeArgType = string +type ClusterErrorGetCodeRetType = string + +func getClusterErrorGetCodeAttributeTypeOk(arg ClusterErrorGetCodeAttributeType) (ret ClusterErrorGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setClusterErrorGetCodeAttributeType(arg *ClusterErrorGetCodeAttributeType, val ClusterErrorGetCodeRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ClusterErrorGetMessageAttributeType = *string + +func getClusterErrorGetMessageAttributeTypeOk(arg ClusterErrorGetMessageAttributeType) (ret ClusterErrorGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setClusterErrorGetMessageAttributeType(arg *ClusterErrorGetMessageAttributeType, val ClusterErrorGetMessageRetType) { + *arg = &val +} + +type ClusterErrorGetMessageArgType = string +type ClusterErrorGetMessageRetType = string + +// ClusterError struct for ClusterError +type ClusterError struct { + Code ClusterErrorGetCodeAttributeType `json:"code,omitempty"` + Message ClusterErrorGetMessageAttributeType `json:"message,omitempty"` +} + +// NewClusterError instantiates a new ClusterError 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 NewClusterError() *ClusterError { + this := ClusterError{} + return &this +} + +// NewClusterErrorWithDefaults instantiates a new ClusterError 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 NewClusterErrorWithDefaults() *ClusterError { + this := ClusterError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ClusterError) GetCode() (res ClusterErrorGetCodeRetType) { + res, _ = o.GetCodeOk() + return +} + +// 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 *ClusterError) GetCodeOk() (ret ClusterErrorGetCodeRetType, ok bool) { + return getClusterErrorGetCodeAttributeTypeOk(o.Code) +} + +// HasCode returns a boolean if a field has been set. +func (o *ClusterError) HasCode() bool { + _, ok := o.GetCodeOk() + return ok +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ClusterError) SetCode(v ClusterErrorGetCodeRetType) { + setClusterErrorGetCodeAttributeType(&o.Code, v) +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ClusterError) GetMessage() (res ClusterErrorGetMessageRetType) { + res, _ = o.GetMessageOk() + return +} + +// 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 *ClusterError) GetMessageOk() (ret ClusterErrorGetMessageRetType, ok bool) { + return getClusterErrorGetMessageAttributeTypeOk(o.Message) +} + +// HasMessage returns a boolean if a field has been set. +func (o *ClusterError) HasMessage() bool { + _, ok := o.GetMessageOk() + return ok +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ClusterError) SetMessage(v ClusterErrorGetMessageRetType) { + setClusterErrorGetMessageAttributeType(&o.Message, v) +} + +func (o ClusterError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getClusterErrorGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getClusterErrorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableClusterError struct { + value *ClusterError + isSet bool +} + +func (v NullableClusterError) Get() *ClusterError { + return v.value +} + +func (v *NullableClusterError) Set(val *ClusterError) { + v.value = val + v.isSet = true +} + +func (v NullableClusterError) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterError(val *ClusterError) *NullableClusterError { + return &NullableClusterError{value: val, isSet: true} +} + +func (v NullableClusterError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterError) 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 18638528d..c1d263807 100644 --- a/services/ske/model_cluster_status.go +++ b/services/ske/model_cluster_status.go @@ -118,6 +118,26 @@ func setClusterStatusGetErrorAttributeType(arg *ClusterStatusGetErrorAttributeTy *arg = &val } +/* + types and functions for errors +*/ + +// isArray +type ClusterStatusGetErrorsAttributeType = *[]ClusterError +type ClusterStatusGetErrorsArgType = []ClusterError +type ClusterStatusGetErrorsRetType = []ClusterError + +func getClusterStatusGetErrorsAttributeTypeOk(arg ClusterStatusGetErrorsAttributeType) (ret ClusterStatusGetErrorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setClusterStatusGetErrorsAttributeType(arg *ClusterStatusGetErrorsAttributeType, val ClusterStatusGetErrorsRetType) { + *arg = &val +} + /* types and functions for hibernated */ @@ -147,6 +167,7 @@ type ClusterStatus struct { // The outgoing network ranges (in CIDR notation) of traffic originating from workload on the cluster. EgressAddressRanges ClusterStatusGetEgressAddressRangesAttributeType `json:"egressAddressRanges,omitempty"` Error ClusterStatusGetErrorAttributeType `json:"error,omitempty"` + Errors ClusterStatusGetErrorsAttributeType `json:"errors,omitempty"` Hibernated ClusterStatusgetHibernatedAttributeType `json:"hibernated,omitempty"` } @@ -284,6 +305,29 @@ func (o *ClusterStatus) SetError(v ClusterStatusGetErrorRetType) { setClusterStatusGetErrorAttributeType(&o.Error, v) } +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ClusterStatus) GetErrors() (res ClusterStatusGetErrorsRetType) { + res, _ = o.GetErrorsOk() + return +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorsOk() (ret ClusterStatusGetErrorsRetType, ok bool) { + return getClusterStatusGetErrorsAttributeTypeOk(o.Errors) +} + +// HasErrors returns a boolean if a field has been set. +func (o *ClusterStatus) HasErrors() bool { + _, ok := o.GetErrorsOk() + return ok +} + +// SetErrors gets a reference to the given []ClusterError and assigns it to the Errors field. +func (o *ClusterStatus) SetErrors(v ClusterStatusGetErrorsRetType) { + setClusterStatusGetErrorsAttributeType(&o.Errors, v) +} + // GetHibernated returns the Hibernated field value if set, zero value otherwise. func (o *ClusterStatus) GetHibernated() (res ClusterStatusgetHibernatedRetType) { res, _ = o.GetHibernatedOk() @@ -324,6 +368,9 @@ func (o ClusterStatus) ToMap() (map[string]interface{}, error) { if val, ok := getClusterStatusGetErrorAttributeTypeOk(o.Error); ok { toSerialize["Error"] = val } + if val, ok := getClusterStatusGetErrorsAttributeTypeOk(o.Errors); ok { + toSerialize["Errors"] = val + } if val, ok := getClusterStatusgetHibernatedAttributeTypeOk(o.Hibernated); ok { toSerialize["Hibernated"] = val }