From a7633d2be178f69646f62cb6842d16ed4af23cfa Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 29 Jun 2026 10:09:06 +0000 Subject: [PATCH 1/2] Generate ske --- services/ske/api_default.go | 6 +- services/ske/model_audit.go | 150 ++++++++++++++++ services/ske/model_audit_test.go | 11 ++ services/ske/model_cluster.go | 63 ++++++- .../model_create_or_update_cluster_payload.go | 58 ++++++ services/ske/oas_commit | 2 +- services/ske/v1api/api_default.go | 4 +- services/ske/v1api/model_cluster.go | 11 +- services/ske/v2api/api_default.go | 4 +- services/ske/v2api/model_audit.go | 167 ++++++++++++++++++ services/ske/v2api/model_cluster.go | 50 +++++- .../model_create_or_update_cluster_payload.go | 37 ++++ 12 files changed, 542 insertions(+), 21 deletions(-) create mode 100644 services/ske/model_audit.go create mode 100644 services/ske/model_audit_test.go create mode 100644 services/ske/v2api/model_audit.go diff --git a/services/ske/api_default.go b/services/ske/api_default.go index b11c1527b..9c8873fcf 100644 --- a/services/ske/api_default.go +++ b/services/ske/api_default.go @@ -83,7 +83,7 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @param region - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return ApiCreateOrUpdateClusterRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -95,7 +95,7 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @param region - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return Cluster // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -963,7 +963,7 @@ Deprecated: Will be removed after 2026-09-30. Move to the packages generated for @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @param region - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return ApiCreateOrUpdateClusterRequest */ func (a *APIClient) CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest { diff --git a/services/ske/model_audit.go b/services/ske/model_audit.go new file mode 100644 index 000000000..012fc7ed7 --- /dev/null +++ b/services/ske/model_audit.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 Audit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Audit{} + +/* + 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 AuditgetEnabledAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AuditgetEnabledArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AuditgetEnabledRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getAuditgetEnabledAttributeTypeOk(arg AuditgetEnabledAttributeType) (ret AuditgetEnabledRetType, 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 setAuditgetEnabledAttributeType(arg *AuditgetEnabledAttributeType, val AuditgetEnabledRetType) { + *arg = &val +} + +// Audit struct for Audit +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Audit struct { + // Enable cluster audit log forwarding to a Telemetry Router. ⚠️ Note: This feature is in private preview. Enabling audit logging is only possible for enabled accounts. Otherwise the request will be rejected. + // REQUIRED + Enabled AuditgetEnabledAttributeType `json:"enabled" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _Audit Audit + +// NewAudit instantiates a new Audit 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 NewAudit(enabled AuditgetEnabledArgType) *Audit { + this := Audit{} + setAuditgetEnabledAttributeType(&this.Enabled, enabled) + return &this +} + +// NewAuditWithDefaults instantiates a new Audit 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 NewAuditWithDefaults() *Audit { + this := Audit{} + 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 *Audit) GetEnabled() (ret AuditgetEnabledRetType) { + 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 *Audit) GetEnabledOk() (ret AuditgetEnabledRetType, ok bool) { + return getAuditgetEnabledAttributeTypeOk(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 *Audit) SetEnabled(v AuditgetEnabledRetType) { + setAuditgetEnabledAttributeType(&o.Enabled, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Audit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getAuditgetEnabledAttributeTypeOk(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 NullableAudit struct { + value *Audit + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableAudit) Get() *Audit { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableAudit) Set(val *Audit) { + 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 NullableAudit) 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 *NullableAudit) 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 NewNullableAudit(val *Audit) *NullableAudit { + return &NullableAudit{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 NullableAudit) 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 *NullableAudit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_audit_test.go b/services/ske/model_audit_test.go new file mode 100644 index 000000000..be50da75a --- /dev/null +++ b/services/ske/model_audit_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 a46ee1e14..27ada03bd 100644 --- a/services/ske/model_cluster.go +++ b/services/ske/model_cluster.go @@ -45,6 +45,33 @@ func setClusterGetAccessAttributeType(arg *ClusterGetAccessAttributeType, val Cl *arg = &val } +/* + types and functions for audit +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetAuditAttributeType = *Audit + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetAuditArgType = Audit + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetAuditRetType = Audit + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getClusterGetAuditAttributeTypeOk(arg ClusterGetAuditAttributeType) (ret ClusterGetAuditRetType, 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 setClusterGetAuditAttributeType(arg *ClusterGetAuditAttributeType, val ClusterGetAuditRetType) { + *arg = &val +} + /* types and functions for extensions */ @@ -265,13 +292,15 @@ func setClusterGetStatusAttributeType(arg *ClusterGetStatusAttributeType, val Cl // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Cluster struct { Access ClusterGetAccessAttributeType `json:"access,omitempty"` + Audit ClusterGetAuditAttributeType `json:"audit,omitempty"` Extensions ClusterGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation ClusterGetHibernationAttributeType `json:"hibernation,omitempty"` // REQUIRED Kubernetes ClusterGetKubernetesAttributeType `json:"kubernetes" required:"true"` Maintenance ClusterGetMaintenanceAttributeType `json:"maintenance,omitempty"` - Name ClusterGetNameAttributeType `json:"name,omitempty"` - Network ClusterGetNetworkAttributeType `json:"network,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"` + Network ClusterGetNetworkAttributeType `json:"network,omitempty"` // REQUIRED Nodepools ClusterGetNodepoolsAttributeType `json:"nodepools" required:"true"` Status ClusterGetStatusAttributeType `json:"status,omitempty"` @@ -328,6 +357,33 @@ func (o *Cluster) SetAccess(v ClusterGetAccessRetType) { setClusterGetAccessAttributeType(&o.Access, v) } +// GetAudit returns the Audit 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) GetAudit() (res ClusterGetAuditRetType) { + res, _ = o.GetAuditOk() + return +} + +// GetAuditOk returns a tuple with the Audit 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) GetAuditOk() (ret ClusterGetAuditRetType, ok bool) { + return getClusterGetAuditAttributeTypeOk(o.Audit) +} + +// HasAudit 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) HasAudit() bool { + _, ok := o.GetAuditOk() + return ok +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Cluster) SetAudit(v ClusterGetAuditRetType) { + setClusterGetAuditAttributeType(&o.Audit, v) +} + // GetExtensions returns the Extensions 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) GetExtensions() (res ClusterGetExtensionsRetType) { @@ -536,6 +592,9 @@ func (o Cluster) ToMap() (map[string]interface{}, error) { if val, ok := getClusterGetAccessAttributeTypeOk(o.Access); ok { toSerialize["Access"] = val } + if val, ok := getClusterGetAuditAttributeTypeOk(o.Audit); ok { + toSerialize["Audit"] = val + } if val, ok := getClusterGetExtensionsAttributeTypeOk(o.Extensions); ok { toSerialize["Extensions"] = val } diff --git a/services/ske/model_create_or_update_cluster_payload.go b/services/ske/model_create_or_update_cluster_payload.go index 55164b44d..0f6d794b4 100644 --- a/services/ske/model_create_or_update_cluster_payload.go +++ b/services/ske/model_create_or_update_cluster_payload.go @@ -45,6 +45,33 @@ func setCreateOrUpdateClusterPayloadGetAccessAttributeType(arg *CreateOrUpdateCl *arg = &val } +/* + types and functions for audit +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetAuditAttributeType = *Audit + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetAuditArgType = Audit + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetAuditRetType = Audit + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateOrUpdateClusterPayloadGetAuditAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetAuditAttributeType) (ret CreateOrUpdateClusterPayloadGetAuditRetType, 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 setCreateOrUpdateClusterPayloadGetAuditAttributeType(arg *CreateOrUpdateClusterPayloadGetAuditAttributeType, val CreateOrUpdateClusterPayloadGetAuditRetType) { + *arg = &val +} + /* types and functions for extensions */ @@ -238,6 +265,7 @@ func setCreateOrUpdateClusterPayloadGetStatusAttributeType(arg *CreateOrUpdateCl // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayload struct { Access CreateOrUpdateClusterPayloadGetAccessAttributeType `json:"access,omitempty"` + Audit CreateOrUpdateClusterPayloadGetAuditAttributeType `json:"audit,omitempty"` Extensions CreateOrUpdateClusterPayloadGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation CreateOrUpdateClusterPayloadGetHibernationAttributeType `json:"hibernation,omitempty"` // REQUIRED @@ -300,6 +328,33 @@ func (o *CreateOrUpdateClusterPayload) SetAccess(v CreateOrUpdateClusterPayloadG setCreateOrUpdateClusterPayloadGetAccessAttributeType(&o.Access, v) } +// GetAudit returns the Audit 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) GetAudit() (res CreateOrUpdateClusterPayloadGetAuditRetType) { + res, _ = o.GetAuditOk() + return +} + +// GetAuditOk returns a tuple with the Audit 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) GetAuditOk() (ret CreateOrUpdateClusterPayloadGetAuditRetType, ok bool) { + return getCreateOrUpdateClusterPayloadGetAuditAttributeTypeOk(o.Audit) +} + +// HasAudit 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) HasAudit() bool { + _, ok := o.GetAuditOk() + return ok +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateOrUpdateClusterPayload) SetAudit(v CreateOrUpdateClusterPayloadGetAuditRetType) { + setCreateOrUpdateClusterPayloadGetAuditAttributeType(&o.Audit, v) +} + // GetExtensions returns the Extensions 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) GetExtensions() (res CreateOrUpdateClusterPayloadGetExtensionsRetType) { @@ -481,6 +536,9 @@ func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateOrUpdateClusterPayloadGetAccessAttributeTypeOk(o.Access); ok { toSerialize["Access"] = val } + if val, ok := getCreateOrUpdateClusterPayloadGetAuditAttributeTypeOk(o.Audit); ok { + toSerialize["Audit"] = val + } if val, ok := getCreateOrUpdateClusterPayloadGetExtensionsAttributeTypeOk(o.Extensions); ok { toSerialize["Extensions"] = val } diff --git a/services/ske/oas_commit b/services/ske/oas_commit index 6ba71f50d..a886b4d4a 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -d2755fb2bda0e2105f920af64d7176d184b2bcb7 +ea0931a6f93703c990517136e0d4c7a88455b282 diff --git a/services/ske/v1api/api_default.go b/services/ske/v1api/api_default.go index cfacdd905..10fbe076f 100644 --- a/services/ske/v1api/api_default.go +++ b/services/ske/v1api/api_default.go @@ -62,7 +62,7 @@ type DefaultAPI interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return ApiCreateOrUpdateClusterRequest */ CreateOrUpdateCluster(ctx context.Context, projectId string, clusterName string) ApiCreateOrUpdateClusterRequest @@ -569,7 +569,7 @@ Create a new cluster in your project or modify an existing one. To get valid val @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return ApiCreateOrUpdateClusterRequest */ func (a *DefaultAPIService) CreateOrUpdateCluster(ctx context.Context, projectId string, clusterName string) ApiCreateOrUpdateClusterRequest { diff --git a/services/ske/v1api/model_cluster.go b/services/ske/v1api/model_cluster.go index 3c10f343e..cbb937db8 100644 --- a/services/ske/v1api/model_cluster.go +++ b/services/ske/v1api/model_cluster.go @@ -20,11 +20,12 @@ var _ MappedNullable = &Cluster{} // Cluster struct for Cluster type Cluster struct { - Extensions *Extension `json:"extensions,omitempty"` - Hibernation *Hibernation `json:"hibernation,omitempty"` - Kubernetes Kubernetes `json:"kubernetes"` - Maintenance *Maintenance `json:"maintenance,omitempty"` - Name *string `json:"name,omitempty"` + Extensions *Extension `json:"extensions,omitempty"` + Hibernation *Hibernation `json:"hibernation,omitempty"` + Kubernetes Kubernetes `json:"kubernetes"` + 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"` Nodepools []Nodepool `json:"nodepools"` Status *ClusterStatus `json:"status,omitempty"` diff --git a/services/ske/v2api/api_default.go b/services/ske/v2api/api_default.go index a86b47e70..b6686ff04 100644 --- a/services/ske/v2api/api_default.go +++ b/services/ske/v2api/api_default.go @@ -65,7 +65,7 @@ type DefaultAPI interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @param region - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return ApiCreateOrUpdateClusterRequest */ CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest @@ -609,7 +609,7 @@ Create a new cluster in your project or modify an existing one. To get valid val @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @param region - @param clusterName + @param clusterName Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. @return ApiCreateOrUpdateClusterRequest */ func (a *DefaultAPIService) CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest { diff --git a/services/ske/v2api/model_audit.go b/services/ske/v2api/model_audit.go new file mode 100644 index 000000000..bfc197763 --- /dev/null +++ b/services/ske/v2api/model_audit.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 Audit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Audit{} + +// Audit struct for Audit +type Audit struct { + // Enable cluster audit log forwarding to a Telemetry Router. ⚠️ Note: This feature is in private preview. Enabling audit logging is only possible for enabled accounts. Otherwise the request will be rejected. + Enabled bool `json:"enabled"` + AdditionalProperties map[string]interface{} +} + +type _Audit Audit + +// NewAudit instantiates a new Audit 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 NewAudit(enabled bool) *Audit { + this := Audit{} + this.Enabled = enabled + return &this +} + +// NewAuditWithDefaults instantiates a new Audit 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 NewAuditWithDefaults() *Audit { + this := Audit{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *Audit) 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 *Audit) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *Audit) SetEnabled(v bool) { + o.Enabled = v +} + +func (o Audit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Audit) 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 *Audit) 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) + } + } + + varAudit := _Audit{} + + err = json.Unmarshal(data, &varAudit) + + if err != nil { + return err + } + + *o = Audit(varAudit) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAudit struct { + value *Audit + isSet bool +} + +func (v NullableAudit) Get() *Audit { + return v.value +} + +func (v *NullableAudit) Set(val *Audit) { + v.value = val + v.isSet = true +} + +func (v NullableAudit) IsSet() bool { + return v.isSet +} + +func (v *NullableAudit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAudit(val *Audit) *NullableAudit { + return &NullableAudit{value: val, isSet: true} +} + +func (v NullableAudit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAudit) 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 7f86f54aa..00bcf7cda 100644 --- a/services/ske/v2api/model_cluster.go +++ b/services/ske/v2api/model_cluster.go @@ -20,12 +20,14 @@ var _ MappedNullable = &Cluster{} // Cluster struct for Cluster type Cluster struct { - Access *Access `json:"access,omitempty"` - Extensions *Extension `json:"extensions,omitempty"` - Hibernation *Hibernation `json:"hibernation,omitempty"` - Kubernetes Kubernetes `json:"kubernetes"` - Maintenance *Maintenance `json:"maintenance,omitempty"` - Name *string `json:"name,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"` + 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"` Nodepools []Nodepool `json:"nodepools"` Status *ClusterStatus `json:"status,omitempty"` @@ -85,6 +87,38 @@ func (o *Cluster) SetAccess(v Access) { o.Access = &v } +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *Cluster) GetAudit() Audit { + if o == nil || IsNil(o.Audit) { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetAuditOk() (*Audit, bool) { + if o == nil || IsNil(o.Audit) { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *Cluster) HasAudit() bool { + if o != nil && !IsNil(o.Audit) { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *Cluster) SetAudit(v Audit) { + o.Audit = &v +} + // GetExtensions returns the Extensions field value if set, zero value otherwise. func (o *Cluster) GetExtensions() Extension { if o == nil || IsNil(o.Extensions) { @@ -338,6 +372,9 @@ func (o Cluster) ToMap() (map[string]interface{}, error) { if !IsNil(o.Access) { toSerialize["access"] = o.Access } + if !IsNil(o.Audit) { + toSerialize["audit"] = o.Audit + } if !IsNil(o.Extensions) { toSerialize["extensions"] = o.Extensions } @@ -403,6 +440,7 @@ func (o *Cluster) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "access") + delete(additionalProperties, "audit") delete(additionalProperties, "extensions") delete(additionalProperties, "hibernation") delete(additionalProperties, "kubernetes") 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 5b7705299..31a7c3292 100644 --- a/services/ske/v2api/model_create_or_update_cluster_payload.go +++ b/services/ske/v2api/model_create_or_update_cluster_payload.go @@ -21,6 +21,7 @@ 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"` @@ -84,6 +85,38 @@ func (o *CreateOrUpdateClusterPayload) SetAccess(v Access) { o.Access = &v } +// GetAudit returns the Audit field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetAudit() Audit { + if o == nil || IsNil(o.Audit) { + var ret Audit + return ret + } + return *o.Audit +} + +// GetAuditOk returns a tuple with the Audit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetAuditOk() (*Audit, bool) { + if o == nil || IsNil(o.Audit) { + return nil, false + } + return o.Audit, true +} + +// HasAudit returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasAudit() bool { + if o != nil && !IsNil(o.Audit) { + return true + } + + return false +} + +// SetAudit gets a reference to the given Audit and assigns it to the Audit field. +func (o *CreateOrUpdateClusterPayload) SetAudit(v Audit) { + o.Audit = &v +} + // GetExtensions returns the Extensions field value if set, zero value otherwise. func (o *CreateOrUpdateClusterPayload) GetExtensions() Extension { if o == nil || IsNil(o.Extensions) { @@ -305,6 +338,9 @@ func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Access) { toSerialize["access"] = o.Access } + if !IsNil(o.Audit) { + toSerialize["audit"] = o.Audit + } if !IsNil(o.Extensions) { toSerialize["extensions"] = o.Extensions } @@ -367,6 +403,7 @@ func (o *CreateOrUpdateClusterPayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "access") + delete(additionalProperties, "audit") delete(additionalProperties, "extensions") delete(additionalProperties, "hibernation") delete(additionalProperties, "kubernetes") From d653d8f4e9b7ea299d944f0c08e699ef410b1aca Mon Sep 17 00:00:00 2001 From: Manuel Vaas Date: Tue, 30 Jun 2026 11:11:42 +0200 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 14 +++++++++++++- services/ske/CHANGELOG.md | 12 ++++++++++++ services/ske/VERSION | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc1ba53d..f702d751f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,9 +20,21 @@ - [v0.2.0](services/modelexperiments/CHANGELOG.md#v020) - **New**: STACKIT Model Experiments module wait handler added. - `rabbitmq`: - - [v1.1.0](/services/rabbitmq/CHANGELOG.md#v110) + - [v1.1.0](services/rabbitmq/CHANGELOG.md#v110) - `v2api`: - **Feature**: Added wait handlers +- `ske` + - [v1.19.0](services/ske/CHANGELOG.md#v1190) + - Package `v1api`: + - **Improvement:** Add validation to Name field of model struct `Cluster` + - Package `v2api`: + - **Improvement:** Add validation to Name field of model struct `Cluster` + - **Feature:** New model struct `Audit` + - **Feature:** Add Audit (type Audit) field to model struct `CreateOrUpdateClusterPayload` + - Deprecated SDK layer in root of the module: + - **Improvement:** Add validation to Name field of model struct `Cluster` + - **Feature:** New model struct `Audit` + - **Feature:** Add Audit (type Audit) field to model struct `CreateOrUpdateClusterPayload` ## Release (2026-06-18) - `core`: diff --git a/services/ske/CHANGELOG.md b/services/ske/CHANGELOG.md index 9f87203cb..f2f5b9083 100644 --- a/services/ske/CHANGELOG.md +++ b/services/ske/CHANGELOG.md @@ -1,3 +1,15 @@ +## v1.19.0 +- Package `v1api`: + - **Improvement:** Add validation to Name field of model struct `Cluster` +- Package `v2api`: + - **Improvement:** Add validation to Name field of model struct `Cluster` + - **Feature:** New model struct `Audit` + - **Feature:** Add Audit (type Audit) field to model struct `CreateOrUpdateClusterPayload` +- Deprecated SDK layer in root of the module: + - **Improvement:** Add validation to Name field of model struct `Cluster` + - **Feature:** New model struct `Audit` + - **Feature:** Add Audit (type Audit) field to model struct `CreateOrUpdateClusterPayload` + ## v1.18.0 - **Improvement:** Use new WaiterHelper for ske waiters - **Deprecation:** `CreateOrUpdateClusterWaitHandler` will be removed after 2026-12-08. Use the `CreateClusterWaitHandler` or `UpdateClusterWaitHandler` instead. diff --git a/services/ske/VERSION b/services/ske/VERSION index f72019128..40a06c501 100644 --- a/services/ske/VERSION +++ b/services/ske/VERSION @@ -1 +1 @@ -v1.18.0 +v1.19.0