diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed5ca5ae..9c0b2fe6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,21 @@ - `v3api`: **New:** New package which can be used for communication with the postgresflex v3 API - `v2api`: **Deprecated:** `v2api` is deprecated, use instead `v3api` - `v3beta1api`: **Deprecated:** `v3beta1api` is deprecated, use instead `v3api` +- `ske`: + - [v1.21.0](services/ske/CHANGELOG.md#v1210) + - **Fix:** Update regular expression for `Start` and `End` field of the `HibernationSchedule` + - Package `v2api`: + - **Fix:** Update regular expression for `Version` field of the `MachineImageVersion` + - **Feature:** Add model struct for `ApplicationLoadBalancer` and `CNI` + - **Feature:** Add fields `Labels` and `Maintenance` to model struct `Cluster` and `CreateOrUpdateClusterPayload` + - **Feature:** Add field `ApplicationLoadBalancer` to model struct `Extension` + - **Feature:** Add field `Cni` to model struct `Network` + - Deprecated SDK layer in root of the module: + - **Fix:** Update regular expression for `Version` field of the `MachineImageVersion` + - **Feature:** Add model struct for `ApplicationLoadBalancer` and `CNI` + - **Feature:** Add fields `Labels` and `Maintenance` to model struct `Cluster` and `CreateOrUpdateClusterPayload` + - **Feature:** Add field `ApplicationLoadBalancer` to model struct `Extension` + - **Feature:** Add field `Cni` to model struct `Network` - `telemetrylink`: - [v0.5.0](services/telemetrylink/CHANGELOG.md#v050) - **Improvement:** Add validation for `Description` field diff --git a/services/ske/CHANGELOG.md b/services/ske/CHANGELOG.md index 41c14d016..68df44c9a 100644 --- a/services/ske/CHANGELOG.md +++ b/services/ske/CHANGELOG.md @@ -1,3 +1,21 @@ +## v1.21.0 +- Package `v1api`: + - **Fix:** Update regular expression for `Start` and `End` field of the `HibernationSchedule` +- Package `v2api`: + - **Fix:** Update regular expression for `Start` and `End` field of the `HibernationSchedule` + - **Fix:** Update regular expression for the `Version` field of the `MachineImageVersion` + - **Feature:** Add model struct for `ApplicationLoadBalancer` and `CNI` + - **Feature:** Add fields `Labels` and `Maintenance` to model struct `Cluster` and `CreateOrUpdateClusterPayload` + - **Feature:** Add field `ApplicationLoadBalancer` to model struct `Extension` + - **Feature:** Add field `Cni` to model struct `Network` +- Deprecated SDK layer in root of the module: + - **Fix:** Update regular expression for `Start` and `End` field of the `HibernationSchedule` + - **Fix:** Update regular expression for the `Version` field of the `MachineImageVersion` + - **Feature:** Add model struct for `ApplicationLoadBalancer` and `CNI` + - **Feature:** Add fields `Labels` and `Maintenance` to model struct `Cluster` and `CreateOrUpdateClusterPayload` + - **Feature:** Add field `ApplicationLoadBalancer` to model struct `Extension` + - **Feature:** Add field `Cni` to model struct `Network` + ## v1.20.0 - Package `v2api`: - **Fix:** Increased timeout in `DeleteClusterWaitHandler` to 90 min diff --git a/services/ske/VERSION b/services/ske/VERSION index c858d1e14..a68c29a5c 100644 --- a/services/ske/VERSION +++ b/services/ske/VERSION @@ -1 +1 @@ -v1.20.0 +v1.21.0 diff --git a/services/ske/model_application_load_balancer.go b/services/ske/model_application_load_balancer.go new file mode 100644 index 000000000..41e5e9556 --- /dev/null +++ b/services/ske/model_application_load_balancer.go @@ -0,0 +1,150 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package ske + +import ( + "encoding/json" +) + +// checks if the ApplicationLoadBalancer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationLoadBalancer{} + +/* + types and functions for enabled +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApplicationLoadBalancergetEnabledAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApplicationLoadBalancergetEnabledArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApplicationLoadBalancergetEnabledRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getApplicationLoadBalancergetEnabledAttributeTypeOk(arg ApplicationLoadBalancergetEnabledAttributeType) (ret ApplicationLoadBalancergetEnabledRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setApplicationLoadBalancergetEnabledAttributeType(arg *ApplicationLoadBalancergetEnabledAttributeType, val ApplicationLoadBalancergetEnabledRetType) { + *arg = &val +} + +// ApplicationLoadBalancer struct for ApplicationLoadBalancer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApplicationLoadBalancer struct { + // Enables the application load balancer extension. ⚠️ Note: This feature is in private preview. Enabling application load balancer extension is only possible for enabled accounts. Otherwise the request will be rejected. + // REQUIRED + Enabled ApplicationLoadBalancergetEnabledAttributeType `json:"enabled" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ApplicationLoadBalancer ApplicationLoadBalancer + +// NewApplicationLoadBalancer instantiates a new ApplicationLoadBalancer 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewApplicationLoadBalancer(enabled ApplicationLoadBalancergetEnabledArgType) *ApplicationLoadBalancer { + this := ApplicationLoadBalancer{} + setApplicationLoadBalancergetEnabledAttributeType(&this.Enabled, enabled) + return &this +} + +// NewApplicationLoadBalancerWithDefaults instantiates a new ApplicationLoadBalancer 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewApplicationLoadBalancerWithDefaults() *ApplicationLoadBalancer { + this := ApplicationLoadBalancer{} + return &this +} + +// GetEnabled returns the Enabled field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ApplicationLoadBalancer) GetEnabled() (ret ApplicationLoadBalancergetEnabledRetType) { + ret, _ = o.GetEnabledOk() + return ret +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ApplicationLoadBalancer) GetEnabledOk() (ret ApplicationLoadBalancergetEnabledRetType, ok bool) { + return getApplicationLoadBalancergetEnabledAttributeTypeOk(o.Enabled) +} + +// SetEnabled sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ApplicationLoadBalancer) SetEnabled(v ApplicationLoadBalancergetEnabledRetType) { + setApplicationLoadBalancergetEnabledAttributeType(&o.Enabled, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ApplicationLoadBalancer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getApplicationLoadBalancergetEnabledAttributeTypeOk(o.Enabled); ok { + toSerialize["Enabled"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableApplicationLoadBalancer struct { + value *ApplicationLoadBalancer + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableApplicationLoadBalancer) Get() *ApplicationLoadBalancer { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableApplicationLoadBalancer) Set(val *ApplicationLoadBalancer) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableApplicationLoadBalancer) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableApplicationLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableApplicationLoadBalancer(val *ApplicationLoadBalancer) *NullableApplicationLoadBalancer { + return &NullableApplicationLoadBalancer{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableApplicationLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableApplicationLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_application_load_balancer_test.go b/services/ske/model_application_load_balancer_test.go new file mode 100644 index 000000000..be50da75a --- /dev/null +++ b/services/ske/model_application_load_balancer_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ske diff --git a/services/ske/model_cluster.go b/services/ske/model_cluster.go index 27ada03bd..18a04772b 100644 --- a/services/ske/model_cluster.go +++ b/services/ske/model_cluster.go @@ -153,6 +153,33 @@ func setClusterGetKubernetesAttributeType(arg *ClusterGetKubernetesAttributeType *arg = &val } +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getClusterGetLabelsAttributeTypeOk(arg ClusterGetLabelsAttributeType) (ret ClusterGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setClusterGetLabelsAttributeType(arg *ClusterGetLabelsAttributeType, val ClusterGetLabelsRetType) { + *arg = &val +} + /* types and functions for maintenance */ @@ -296,7 +323,9 @@ type Cluster struct { Extensions ClusterGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation ClusterGetHibernationAttributeType `json:"hibernation,omitempty"` // REQUIRED - Kubernetes ClusterGetKubernetesAttributeType `json:"kubernetes" required:"true"` + Kubernetes ClusterGetKubernetesAttributeType `json:"kubernetes" required:"true"` + // Labels are key-value pairs. Keys may contain domain prefix separated by a slash(/) and must begin with an alphanumerical character. Values may be empty and if not empty, they must begin and end with an alphanumerical character. Keys can be between 1-314 characters long, whereas values can be 0-63 characters long. + Labels ClusterGetLabelsAttributeType `json:"labels,omitempty"` Maintenance ClusterGetMaintenanceAttributeType `json:"maintenance,omitempty"` // Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. Name ClusterGetNameAttributeType `json:"name,omitempty"` @@ -458,6 +487,33 @@ func (o *Cluster) SetKubernetes(v ClusterGetKubernetesRetType) { setClusterGetKubernetesAttributeType(&o.Kubernetes, v) } +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Cluster) GetLabels() (res ClusterGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Cluster) GetLabelsOk() (ret ClusterGetLabelsRetType, ok bool) { + return getClusterGetLabelsAttributeTypeOk(o.Labels) +} + +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Cluster) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Cluster) SetLabels(v ClusterGetLabelsRetType) { + setClusterGetLabelsAttributeType(&o.Labels, v) +} + // GetMaintenance returns the Maintenance field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) GetMaintenance() (res ClusterGetMaintenanceRetType) { @@ -604,6 +660,9 @@ func (o Cluster) ToMap() (map[string]interface{}, error) { if val, ok := getClusterGetKubernetesAttributeTypeOk(o.Kubernetes); ok { toSerialize["Kubernetes"] = val } + if val, ok := getClusterGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getClusterGetMaintenanceAttributeTypeOk(o.Maintenance); ok { toSerialize["Maintenance"] = val } diff --git a/services/ske/model_cni.go b/services/ske/model_cni.go new file mode 100644 index 000000000..3b09bc772 --- /dev/null +++ b/services/ske/model_cni.go @@ -0,0 +1,152 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package ske + +import ( + "encoding/json" +) + +// checks if the CNI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CNI{} + +/* + types and functions for calico +*/ + +// isFreeform +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CNIGetCalicoAttributeType = *map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CNIGetCalicoArgType = map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CNIGetCalicoRetType = map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCNIGetCalicoAttributeTypeOk(arg CNIGetCalicoAttributeType) (ret CNIGetCalicoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCNIGetCalicoAttributeType(arg *CNIGetCalicoAttributeType, val CNIGetCalicoRetType) { + *arg = &val +} + +// CNI CNI to use for the cluster. Only one type of CNI can be used. The type of CNI is immutable after creation. Defaults to calico +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CNI struct { + // configuration options for the Calico CNI + Calico CNIGetCalicoAttributeType `json:"calico,omitempty"` +} + +// NewCNI instantiates a new CNI 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewCNI() *CNI { + this := CNI{} + return &this +} + +// NewCNIWithDefaults instantiates a new CNI 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewCNIWithDefaults() *CNI { + this := CNI{} + return &this +} + +// GetCalico returns the Calico field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CNI) GetCalico() (res CNIGetCalicoRetType) { + res, _ = o.GetCalicoOk() + return +} + +// GetCalicoOk returns a tuple with the Calico field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CNI) GetCalicoOk() (ret CNIGetCalicoRetType, ok bool) { + return getCNIGetCalicoAttributeTypeOk(o.Calico) +} + +// HasCalico returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CNI) HasCalico() bool { + _, ok := o.GetCalicoOk() + return ok +} + +// SetCalico gets a reference to the given map[string]interface{} and assigns it to the Calico field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CNI) SetCalico(v CNIGetCalicoRetType) { + setCNIGetCalicoAttributeType(&o.Calico, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o CNI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCNIGetCalicoAttributeTypeOk(o.Calico); ok { + toSerialize["Calico"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableCNI struct { + value *CNI + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCNI) Get() *CNI { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCNI) Set(val *CNI) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCNI) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCNI) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableCNI(val *CNI) *NullableCNI { + return &NullableCNI{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCNI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCNI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_cni_test.go b/services/ske/model_cni_test.go new file mode 100644 index 000000000..be50da75a --- /dev/null +++ b/services/ske/model_cni_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ske diff --git a/services/ske/model_create_or_update_cluster_payload.go b/services/ske/model_create_or_update_cluster_payload.go index 0f6d794b4..d9a2489c3 100644 --- a/services/ske/model_create_or_update_cluster_payload.go +++ b/services/ske/model_create_or_update_cluster_payload.go @@ -153,6 +153,33 @@ func setCreateOrUpdateClusterPayloadGetKubernetesAttributeType(arg *CreateOrUpda *arg = &val } +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateOrUpdateClusterPayloadGetLabelsAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetLabelsAttributeType) (ret CreateOrUpdateClusterPayloadGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateOrUpdateClusterPayloadGetLabelsAttributeType(arg *CreateOrUpdateClusterPayloadGetLabelsAttributeType, val CreateOrUpdateClusterPayloadGetLabelsRetType) { + *arg = &val +} + /* types and functions for maintenance */ @@ -269,7 +296,9 @@ type CreateOrUpdateClusterPayload struct { Extensions CreateOrUpdateClusterPayloadGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation CreateOrUpdateClusterPayloadGetHibernationAttributeType `json:"hibernation,omitempty"` // REQUIRED - Kubernetes CreateOrUpdateClusterPayloadGetKubernetesAttributeType `json:"kubernetes" required:"true"` + Kubernetes CreateOrUpdateClusterPayloadGetKubernetesAttributeType `json:"kubernetes" required:"true"` + // Labels are key-value pairs. Keys may contain domain prefix separated by a slash(/) and must begin with an alphanumerical character. Values may be empty and if not empty, they must begin and end with an alphanumerical character. Keys can be between 1-314 characters long, whereas values can be 0-63 characters long. + Labels CreateOrUpdateClusterPayloadGetLabelsAttributeType `json:"labels,omitempty"` Maintenance CreateOrUpdateClusterPayloadGetMaintenanceAttributeType `json:"maintenance,omitempty"` Network CreateOrUpdateClusterPayloadGetNetworkAttributeType `json:"network,omitempty"` // REQUIRED @@ -429,6 +458,33 @@ func (o *CreateOrUpdateClusterPayload) SetKubernetes(v CreateOrUpdateClusterPayl setCreateOrUpdateClusterPayloadGetKubernetesAttributeType(&o.Kubernetes, v) } +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateOrUpdateClusterPayload) GetLabels() (res CreateOrUpdateClusterPayloadGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateOrUpdateClusterPayload) GetLabelsOk() (ret CreateOrUpdateClusterPayloadGetLabelsRetType, ok bool) { + return getCreateOrUpdateClusterPayloadGetLabelsAttributeTypeOk(o.Labels) +} + +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateOrUpdateClusterPayload) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateOrUpdateClusterPayload) SetLabels(v CreateOrUpdateClusterPayloadGetLabelsRetType) { + setCreateOrUpdateClusterPayloadGetLabelsAttributeType(&o.Labels, v) +} + // GetMaintenance returns the Maintenance field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) GetMaintenance() (res CreateOrUpdateClusterPayloadGetMaintenanceRetType) { @@ -548,6 +604,9 @@ func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateOrUpdateClusterPayloadGetKubernetesAttributeTypeOk(o.Kubernetes); ok { toSerialize["Kubernetes"] = val } + if val, ok := getCreateOrUpdateClusterPayloadGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } if val, ok := getCreateOrUpdateClusterPayloadGetMaintenanceAttributeTypeOk(o.Maintenance); ok { toSerialize["Maintenance"] = val } diff --git a/services/ske/model_extension.go b/services/ske/model_extension.go index 55a97b3af..d8f34258d 100644 --- a/services/ske/model_extension.go +++ b/services/ske/model_extension.go @@ -45,6 +45,33 @@ func setExtensionGetAclAttributeType(arg *ExtensionGetAclAttributeType, val Exte *arg = &val } +/* + types and functions for applicationLoadBalancer +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExtensionGetApplicationLoadBalancerAttributeType = *ApplicationLoadBalancer + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExtensionGetApplicationLoadBalancerArgType = ApplicationLoadBalancer + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExtensionGetApplicationLoadBalancerRetType = ApplicationLoadBalancer + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getExtensionGetApplicationLoadBalancerAttributeTypeOk(arg ExtensionGetApplicationLoadBalancerAttributeType) (ret ExtensionGetApplicationLoadBalancerRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setExtensionGetApplicationLoadBalancerAttributeType(arg *ExtensionGetApplicationLoadBalancerAttributeType, val ExtensionGetApplicationLoadBalancerRetType) { + *arg = &val +} + /* types and functions for dns */ @@ -102,9 +129,10 @@ func setExtensionGetObservabilityAttributeType(arg *ExtensionGetObservabilityAtt // Extension struct for Extension // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Extension struct { - Acl ExtensionGetAclAttributeType `json:"acl,omitempty"` - Dns ExtensionGetDnsAttributeType `json:"dns,omitempty"` - Observability ExtensionGetObservabilityAttributeType `json:"observability,omitempty"` + Acl ExtensionGetAclAttributeType `json:"acl,omitempty"` + ApplicationLoadBalancer ExtensionGetApplicationLoadBalancerAttributeType `json:"applicationLoadBalancer,omitempty"` + Dns ExtensionGetDnsAttributeType `json:"dns,omitempty"` + Observability ExtensionGetObservabilityAttributeType `json:"observability,omitempty"` } // NewExtension instantiates a new Extension object @@ -153,6 +181,33 @@ func (o *Extension) SetAcl(v ExtensionGetAclRetType) { setExtensionGetAclAttributeType(&o.Acl, v) } +// GetApplicationLoadBalancer returns the ApplicationLoadBalancer field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Extension) GetApplicationLoadBalancer() (res ExtensionGetApplicationLoadBalancerRetType) { + res, _ = o.GetApplicationLoadBalancerOk() + return +} + +// GetApplicationLoadBalancerOk returns a tuple with the ApplicationLoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Extension) GetApplicationLoadBalancerOk() (ret ExtensionGetApplicationLoadBalancerRetType, ok bool) { + return getExtensionGetApplicationLoadBalancerAttributeTypeOk(o.ApplicationLoadBalancer) +} + +// HasApplicationLoadBalancer returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Extension) HasApplicationLoadBalancer() bool { + _, ok := o.GetApplicationLoadBalancerOk() + return ok +} + +// SetApplicationLoadBalancer gets a reference to the given ApplicationLoadBalancer and assigns it to the ApplicationLoadBalancer field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Extension) SetApplicationLoadBalancer(v ExtensionGetApplicationLoadBalancerRetType) { + setExtensionGetApplicationLoadBalancerAttributeType(&o.ApplicationLoadBalancer, v) +} + // GetDns returns the Dns field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Extension) GetDns() (res ExtensionGetDnsRetType) { @@ -213,6 +268,9 @@ func (o Extension) ToMap() (map[string]interface{}, error) { if val, ok := getExtensionGetAclAttributeTypeOk(o.Acl); ok { toSerialize["Acl"] = val } + if val, ok := getExtensionGetApplicationLoadBalancerAttributeTypeOk(o.ApplicationLoadBalancer); ok { + toSerialize["ApplicationLoadBalancer"] = val + } if val, ok := getExtensionGetDnsAttributeTypeOk(o.Dns); ok { toSerialize["Dns"] = val } diff --git a/services/ske/model_network.go b/services/ske/model_network.go index 91b96b360..f2d660dba 100644 --- a/services/ske/model_network.go +++ b/services/ske/model_network.go @@ -18,6 +18,33 @@ import ( // checks if the Network type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Network{} +/* + types and functions for cni +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NetworkGetCniAttributeType = *CNI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NetworkGetCniArgType = CNI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NetworkGetCniRetType = CNI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getNetworkGetCniAttributeTypeOk(arg NetworkGetCniAttributeType) (ret NetworkGetCniRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setNetworkGetCniAttributeType(arg *NetworkGetCniAttributeType, val NetworkGetCniRetType) { + *arg = &val +} + /* types and functions for controlPlane */ @@ -75,6 +102,7 @@ type NetworkGetIdRetType = string // Network struct for Network // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Network struct { + Cni NetworkGetCniAttributeType `json:"cni,omitempty"` ControlPlane NetworkGetControlPlaneAttributeType `json:"controlPlane,omitempty"` Id NetworkGetIdAttributeType `json:"id,omitempty"` } @@ -98,6 +126,33 @@ func NewNetworkWithDefaults() *Network { return &this } +// GetCni returns the Cni field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Network) GetCni() (res NetworkGetCniRetType) { + res, _ = o.GetCniOk() + return +} + +// GetCniOk returns a tuple with the Cni field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Network) GetCniOk() (ret NetworkGetCniRetType, ok bool) { + return getNetworkGetCniAttributeTypeOk(o.Cni) +} + +// HasCni returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Network) HasCni() bool { + _, ok := o.GetCniOk() + return ok +} + +// SetCni gets a reference to the given CNI and assigns it to the Cni field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Network) SetCni(v NetworkGetCniRetType) { + setNetworkGetCniAttributeType(&o.Cni, v) +} + // GetControlPlane returns the ControlPlane field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Network) GetControlPlane() (res NetworkGetControlPlaneRetType) { @@ -155,6 +210,9 @@ func (o *Network) SetId(v NetworkGetIdRetType) { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Network) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getNetworkGetCniAttributeTypeOk(o.Cni); ok { + toSerialize["Cni"] = val + } if val, ok := getNetworkGetControlPlaneAttributeTypeOk(o.ControlPlane); ok { toSerialize["ControlPlane"] = val } diff --git a/services/ske/oas_commit b/services/ske/oas_commit index a886b4d4a..abd8d51b0 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -ea0931a6f93703c990517136e0d4c7a88455b282 +46f03c1468dd453695c05e72c088a6bfb5a4bbab diff --git a/services/ske/v1api/model_hibernation_schedule.go b/services/ske/v1api/model_hibernation_schedule.go index ad4da3f19..3c5aa7846 100644 --- a/services/ske/v1api/model_hibernation_schedule.go +++ b/services/ske/v1api/model_hibernation_schedule.go @@ -20,8 +20,8 @@ var _ MappedNullable = &HibernationSchedule{} // HibernationSchedule struct for HibernationSchedule type HibernationSchedule struct { - End string `json:"end" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` - Start string `json:"start" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` + End string `json:"end" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\d+,)+\\\\d+|(\\\\d+(\\/|-)\\\\d+)|\\\\d+|\\\\*) ?){5,7})"` + Start string `json:"start" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\d+,)+\\\\d+|(\\\\d+(\\/|-)\\\\d+)|\\\\d+|\\\\*) ?){5,7})"` Timezone *string `json:"timezone,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/ske/v2api/model_application_load_balancer.go b/services/ske/v2api/model_application_load_balancer.go new file mode 100644 index 000000000..de05c3111 --- /dev/null +++ b/services/ske/v2api/model_application_load_balancer.go @@ -0,0 +1,167 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ApplicationLoadBalancer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationLoadBalancer{} + +// ApplicationLoadBalancer struct for ApplicationLoadBalancer +type ApplicationLoadBalancer struct { + // Enables the application load balancer extension. ⚠️ Note: This feature is in private preview. Enabling application load balancer extension is only possible for enabled accounts. Otherwise the request will be rejected. + Enabled bool `json:"enabled"` + AdditionalProperties map[string]interface{} +} + +type _ApplicationLoadBalancer ApplicationLoadBalancer + +// NewApplicationLoadBalancer instantiates a new ApplicationLoadBalancer 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 NewApplicationLoadBalancer(enabled bool) *ApplicationLoadBalancer { + this := ApplicationLoadBalancer{} + this.Enabled = enabled + return &this +} + +// NewApplicationLoadBalancerWithDefaults instantiates a new ApplicationLoadBalancer 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 NewApplicationLoadBalancerWithDefaults() *ApplicationLoadBalancer { + this := ApplicationLoadBalancer{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *ApplicationLoadBalancer) 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 *ApplicationLoadBalancer) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *ApplicationLoadBalancer) SetEnabled(v bool) { + o.Enabled = v +} + +func (o ApplicationLoadBalancer) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationLoadBalancer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ApplicationLoadBalancer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationLoadBalancer := _ApplicationLoadBalancer{} + + err = json.Unmarshal(data, &varApplicationLoadBalancer) + + if err != nil { + return err + } + + *o = ApplicationLoadBalancer(varApplicationLoadBalancer) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableApplicationLoadBalancer struct { + value *ApplicationLoadBalancer + isSet bool +} + +func (v NullableApplicationLoadBalancer) Get() *ApplicationLoadBalancer { + return v.value +} + +func (v *NullableApplicationLoadBalancer) Set(val *ApplicationLoadBalancer) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancer) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancer(val *ApplicationLoadBalancer) *NullableApplicationLoadBalancer { + return &NullableApplicationLoadBalancer{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cluster.go b/services/ske/v2api/model_cluster.go index 00bcf7cda..9641e11d1 100644 --- a/services/ske/v2api/model_cluster.go +++ b/services/ske/v2api/model_cluster.go @@ -25,7 +25,9 @@ type Cluster struct { Extensions *Extension `json:"extensions,omitempty"` Hibernation *Hibernation `json:"hibernation,omitempty"` Kubernetes Kubernetes `json:"kubernetes"` - Maintenance *Maintenance `json:"maintenance,omitempty"` + // Labels are key-value pairs. Keys may contain domain prefix separated by a slash(/) and must begin with an alphanumerical character. Values may be empty and if not empty, they must begin and end with an alphanumerical character. Keys can be between 1-314 characters long, whereas values can be 0-63 characters long. + Labels *map[string]string `json:"labels,omitempty"` + Maintenance *Maintenance `json:"maintenance,omitempty"` // Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. Name *string `json:"name,omitempty" validate:"regexp=^[a-z0-9]([a-z0-9-]{0,9}[a-z0-9])?$"` Network *Network `json:"network,omitempty"` @@ -207,6 +209,38 @@ func (o *Cluster) SetKubernetes(v Kubernetes) { o.Kubernetes = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Cluster) 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 *Cluster) 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 *Cluster) 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 *Cluster) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetMaintenance returns the Maintenance field value if set, zero value otherwise. func (o *Cluster) GetMaintenance() Maintenance { if o == nil || IsNil(o.Maintenance) { @@ -382,6 +416,9 @@ func (o Cluster) ToMap() (map[string]interface{}, error) { toSerialize["hibernation"] = o.Hibernation } toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } if !IsNil(o.Maintenance) { toSerialize["maintenance"] = o.Maintenance } @@ -444,6 +481,7 @@ func (o *Cluster) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "extensions") delete(additionalProperties, "hibernation") delete(additionalProperties, "kubernetes") + delete(additionalProperties, "labels") delete(additionalProperties, "maintenance") delete(additionalProperties, "name") delete(additionalProperties, "network") diff --git a/services/ske/v2api/model_cni.go b/services/ske/v2api/model_cni.go new file mode 100644 index 000000000..469420e6c --- /dev/null +++ b/services/ske/v2api/model_cni.go @@ -0,0 +1,154 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the CNI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CNI{} + +// CNI CNI to use for the cluster. Only one type of CNI can be used. The type of CNI is immutable after creation. Defaults to calico +type CNI struct { + // configuration options for the Calico CNI + Calico map[string]interface{} `json:"calico,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CNI CNI + +// NewCNI instantiates a new CNI 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 NewCNI() *CNI { + this := CNI{} + return &this +} + +// NewCNIWithDefaults instantiates a new CNI 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 NewCNIWithDefaults() *CNI { + this := CNI{} + return &this +} + +// GetCalico returns the Calico field value if set, zero value otherwise. +func (o *CNI) GetCalico() map[string]interface{} { + if o == nil || IsNil(o.Calico) { + var ret map[string]interface{} + return ret + } + return o.Calico +} + +// GetCalicoOk returns a tuple with the Calico field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNI) GetCalicoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Calico) { + return map[string]interface{}{}, false + } + return o.Calico, true +} + +// HasCalico returns a boolean if a field has been set. +func (o *CNI) HasCalico() bool { + if o != nil && !IsNil(o.Calico) { + return true + } + + return false +} + +// SetCalico gets a reference to the given map[string]interface{} and assigns it to the Calico field. +func (o *CNI) SetCalico(v map[string]interface{}) { + o.Calico = v +} + +func (o CNI) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CNI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Calico) { + toSerialize["calico"] = o.Calico + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CNI) UnmarshalJSON(data []byte) (err error) { + varCNI := _CNI{} + + err = json.Unmarshal(data, &varCNI) + + if err != nil { + return err + } + + *o = CNI(varCNI) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "calico") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCNI struct { + value *CNI + isSet bool +} + +func (v NullableCNI) Get() *CNI { + return v.value +} + +func (v *NullableCNI) Set(val *CNI) { + v.value = val + v.isSet = true +} + +func (v NullableCNI) IsSet() bool { + return v.isSet +} + +func (v *NullableCNI) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCNI(val *CNI) *NullableCNI { + return &NullableCNI{value: val, isSet: true} +} + +func (v NullableCNI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCNI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_create_or_update_cluster_payload.go b/services/ske/v2api/model_create_or_update_cluster_payload.go index 31a7c3292..31376b547 100644 --- a/services/ske/v2api/model_create_or_update_cluster_payload.go +++ b/services/ske/v2api/model_create_or_update_cluster_payload.go @@ -20,15 +20,17 @@ var _ MappedNullable = &CreateOrUpdateClusterPayload{} // CreateOrUpdateClusterPayload struct for CreateOrUpdateClusterPayload type CreateOrUpdateClusterPayload struct { - Access *Access `json:"access,omitempty"` - Audit *Audit `json:"audit,omitempty"` - Extensions *Extension `json:"extensions,omitempty"` - Hibernation *Hibernation `json:"hibernation,omitempty"` - Kubernetes Kubernetes `json:"kubernetes"` - Maintenance *Maintenance `json:"maintenance,omitempty"` - Network *Network `json:"network,omitempty"` - Nodepools []Nodepool `json:"nodepools"` - Status *ClusterStatus `json:"status,omitempty"` + Access *Access `json:"access,omitempty"` + Audit *Audit `json:"audit,omitempty"` + Extensions *Extension `json:"extensions,omitempty"` + Hibernation *Hibernation `json:"hibernation,omitempty"` + Kubernetes Kubernetes `json:"kubernetes"` + // Labels are key-value pairs. Keys may contain domain prefix separated by a slash(/) and must begin with an alphanumerical character. Values may be empty and if not empty, they must begin and end with an alphanumerical character. Keys can be between 1-314 characters long, whereas values can be 0-63 characters long. + Labels *map[string]string `json:"labels,omitempty"` + Maintenance *Maintenance `json:"maintenance,omitempty"` + Network *Network `json:"network,omitempty"` + Nodepools []Nodepool `json:"nodepools"` + Status *ClusterStatus `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -205,6 +207,38 @@ func (o *CreateOrUpdateClusterPayload) SetKubernetes(v Kubernetes) { o.Kubernetes = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) 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 *CreateOrUpdateClusterPayload) 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 *CreateOrUpdateClusterPayload) 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 *CreateOrUpdateClusterPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetMaintenance returns the Maintenance field value if set, zero value otherwise. func (o *CreateOrUpdateClusterPayload) GetMaintenance() Maintenance { if o == nil || IsNil(o.Maintenance) { @@ -348,6 +382,9 @@ func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { toSerialize["hibernation"] = o.Hibernation } toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } if !IsNil(o.Maintenance) { toSerialize["maintenance"] = o.Maintenance } @@ -407,6 +444,7 @@ func (o *CreateOrUpdateClusterPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "extensions") delete(additionalProperties, "hibernation") delete(additionalProperties, "kubernetes") + delete(additionalProperties, "labels") delete(additionalProperties, "maintenance") delete(additionalProperties, "network") delete(additionalProperties, "nodepools") diff --git a/services/ske/v2api/model_extension.go b/services/ske/v2api/model_extension.go index 58f3a082d..7b4f5cc61 100644 --- a/services/ske/v2api/model_extension.go +++ b/services/ske/v2api/model_extension.go @@ -19,10 +19,11 @@ var _ MappedNullable = &Extension{} // Extension struct for Extension type Extension struct { - Acl *ACL `json:"acl,omitempty"` - Dns *DNS `json:"dns,omitempty"` - Observability *Observability `json:"observability,omitempty"` - AdditionalProperties map[string]interface{} + Acl *ACL `json:"acl,omitempty"` + ApplicationLoadBalancer *ApplicationLoadBalancer `json:"applicationLoadBalancer,omitempty"` + Dns *DNS `json:"dns,omitempty"` + Observability *Observability `json:"observability,omitempty"` + AdditionalProperties map[string]interface{} } type _Extension Extension @@ -76,6 +77,38 @@ func (o *Extension) SetAcl(v ACL) { o.Acl = &v } +// GetApplicationLoadBalancer returns the ApplicationLoadBalancer field value if set, zero value otherwise. +func (o *Extension) GetApplicationLoadBalancer() ApplicationLoadBalancer { + if o == nil || IsNil(o.ApplicationLoadBalancer) { + var ret ApplicationLoadBalancer + return ret + } + return *o.ApplicationLoadBalancer +} + +// GetApplicationLoadBalancerOk returns a tuple with the ApplicationLoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetApplicationLoadBalancerOk() (*ApplicationLoadBalancer, bool) { + if o == nil || IsNil(o.ApplicationLoadBalancer) { + return nil, false + } + return o.ApplicationLoadBalancer, true +} + +// HasApplicationLoadBalancer returns a boolean if a field has been set. +func (o *Extension) HasApplicationLoadBalancer() bool { + if o != nil && !IsNil(o.ApplicationLoadBalancer) { + return true + } + + return false +} + +// SetApplicationLoadBalancer gets a reference to the given ApplicationLoadBalancer and assigns it to the ApplicationLoadBalancer field. +func (o *Extension) SetApplicationLoadBalancer(v ApplicationLoadBalancer) { + o.ApplicationLoadBalancer = &v +} + // GetDns returns the Dns field value if set, zero value otherwise. func (o *Extension) GetDns() DNS { if o == nil || IsNil(o.Dns) { @@ -153,6 +186,9 @@ func (o Extension) ToMap() (map[string]interface{}, error) { if !IsNil(o.Acl) { toSerialize["acl"] = o.Acl } + if !IsNil(o.ApplicationLoadBalancer) { + toSerialize["applicationLoadBalancer"] = o.ApplicationLoadBalancer + } if !IsNil(o.Dns) { toSerialize["dns"] = o.Dns } @@ -182,6 +218,7 @@ func (o *Extension) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "acl") + delete(additionalProperties, "applicationLoadBalancer") delete(additionalProperties, "dns") delete(additionalProperties, "observability") o.AdditionalProperties = additionalProperties diff --git a/services/ske/v2api/model_hibernation_schedule.go b/services/ske/v2api/model_hibernation_schedule.go index c3cf0b969..7b38cc075 100644 --- a/services/ske/v2api/model_hibernation_schedule.go +++ b/services/ske/v2api/model_hibernation_schedule.go @@ -20,8 +20,8 @@ var _ MappedNullable = &HibernationSchedule{} // HibernationSchedule struct for HibernationSchedule type HibernationSchedule struct { - End string `json:"end" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` - Start string `json:"start" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` + End string `json:"end" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\d+,)+\\\\d+|(\\\\d+(\\/|-)\\\\d+)|\\\\d+|\\\\*) ?){5,7})"` + Start string `json:"start" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\d+,)+\\\\d+|(\\\\d+(\\/|-)\\\\d+)|\\\\d+|\\\\*) ?){5,7})"` Timezone *string `json:"timezone,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/ske/v2api/model_machine_image_version.go b/services/ske/v2api/model_machine_image_version.go index 8f4f6d17d..f1f384035 100644 --- a/services/ske/v2api/model_machine_image_version.go +++ b/services/ske/v2api/model_machine_image_version.go @@ -23,7 +23,7 @@ type MachineImageVersion struct { Cri []CRI `json:"cri,omitempty"` ExpirationDate *time.Time `json:"expirationDate,omitempty"` State *string `json:"state,omitempty"` - Version *string `json:"version,omitempty" validate:"regexp=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` + Version *string `json:"version,omitempty" validate:"regexp=^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\\\+([0-9a-zA-Z-]+(?:\\\\.[0-9a-zA-Z-]+)*))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/ske/v2api/model_network.go b/services/ske/v2api/model_network.go index 2493ef5ca..19edd35f4 100644 --- a/services/ske/v2api/model_network.go +++ b/services/ske/v2api/model_network.go @@ -19,6 +19,7 @@ var _ MappedNullable = &Network{} // Network struct for Network type Network struct { + Cni *CNI `json:"cni,omitempty"` ControlPlane *V2ControlPlaneNetwork `json:"controlPlane,omitempty"` Id *string `json:"id,omitempty"` AdditionalProperties map[string]interface{} @@ -43,6 +44,38 @@ func NewNetworkWithDefaults() *Network { return &this } +// GetCni returns the Cni field value if set, zero value otherwise. +func (o *Network) GetCni() CNI { + if o == nil || IsNil(o.Cni) { + var ret CNI + return ret + } + return *o.Cni +} + +// GetCniOk returns a tuple with the Cni field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetCniOk() (*CNI, bool) { + if o == nil || IsNil(o.Cni) { + return nil, false + } + return o.Cni, true +} + +// HasCni returns a boolean if a field has been set. +func (o *Network) HasCni() bool { + if o != nil && !IsNil(o.Cni) { + return true + } + + return false +} + +// SetCni gets a reference to the given CNI and assigns it to the Cni field. +func (o *Network) SetCni(v CNI) { + o.Cni = &v +} + // GetControlPlane returns the ControlPlane field value if set, zero value otherwise. func (o *Network) GetControlPlane() V2ControlPlaneNetwork { if o == nil || IsNil(o.ControlPlane) { @@ -117,6 +150,9 @@ func (o Network) MarshalJSON() ([]byte, error) { func (o Network) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Cni) { + toSerialize["cni"] = o.Cni + } if !IsNil(o.ControlPlane) { toSerialize["controlPlane"] = o.ControlPlane } @@ -145,6 +181,7 @@ func (o *Network) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cni") delete(additionalProperties, "controlPlane") delete(additionalProperties, "id") o.AdditionalProperties = additionalProperties