diff --git a/services/ske/go.mod b/services/ske/go.mod index 2e7e4e629..2588a6f72 100644 --- a/services/ske/go.mod +++ b/services/ske/go.mod @@ -4,7 +4,7 @@ go 1.25 require ( github.com/google/go-cmp v0.7.0 - github.com/stackitcloud/stackit-sdk-go/core v0.26.0 + github.com/stackitcloud/stackit-sdk-go/core v0.27.0 ) require ( diff --git a/services/ske/go.sum b/services/ske/go.sum index 3712a0c87..042f4a71a 100644 --- a/services/ske/go.sum +++ b/services/ske/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0 h1:jQEb9gkehfp6VCP6TcYk7BI10cz4l0KM2L6hqYBH2QA= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= +github.com/stackitcloud/stackit-sdk-go/core v0.27.0 h1:7lc6qStcFDFf8zHP4ORPa9joybw+Sa2LtB6BVjKQ+ek= +github.com/stackitcloud/stackit-sdk-go/core v0.27.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= diff --git a/services/ske/model_access_scope.go b/services/ske/model_access_scope.go index b075ae868..797407b1a 100644 --- a/services/ske/model_access_scope.go +++ b/services/ske/model_access_scope.go @@ -16,7 +16,7 @@ import ( "fmt" ) -// AccessScope The access scope of the Control Plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. This field is immutable. ⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. +// AccessScope The access scope of the Control Plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. ⚠️ Warning: Changing the access scope on an existing cluster directly impacts its network exposure (e.g., making a private cluster publicly accessible) ⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessScope string diff --git a/services/ske/model_cluster_status_state.go b/services/ske/model_cluster_status_state.go index 5ec3af0bd..89af29e0d 100644 --- a/services/ske/model_cluster_status_state.go +++ b/services/ske/model_cluster_status_state.go @@ -16,7 +16,7 @@ import ( "fmt" ) -// ClusterStatusState the model 'ClusterStatusState' +// ClusterStatusState ClusterStatusState holds information about the current state of the Cluster // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusState string diff --git a/services/ske/model_maintenance.go b/services/ske/model_maintenance.go index ecaa519d4..3c1e99e8c 100644 --- a/services/ske/model_maintenance.go +++ b/services/ske/model_maintenance.go @@ -75,24 +75,17 @@ func setMaintenanceGetTimeWindowAttributeType(arg *MaintenanceGetTimeWindowAttri // Maintenance struct for Maintenance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Maintenance struct { - // REQUIRED - AutoUpdate MaintenanceGetAutoUpdateAttributeType `json:"autoUpdate" required:"true"` - // REQUIRED - TimeWindow MaintenanceGetTimeWindowAttributeType `json:"timeWindow" required:"true"` + AutoUpdate MaintenanceGetAutoUpdateAttributeType `json:"autoUpdate,omitempty"` + TimeWindow MaintenanceGetTimeWindowAttributeType `json:"timeWindow,omitempty"` } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Maintenance Maintenance - // NewMaintenance instantiates a new Maintenance object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMaintenance(autoUpdate MaintenanceGetAutoUpdateArgType, timeWindow MaintenanceGetTimeWindowArgType) *Maintenance { +func NewMaintenance() *Maintenance { this := Maintenance{} - setMaintenanceGetAutoUpdateAttributeType(&this.AutoUpdate, autoUpdate) - setMaintenanceGetTimeWindowAttributeType(&this.TimeWindow, timeWindow) return &this } @@ -105,41 +98,55 @@ func NewMaintenanceWithDefaults() *Maintenance { return &this } -// GetAutoUpdate returns the AutoUpdate field value +// GetAutoUpdate returns the AutoUpdate 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 *Maintenance) GetAutoUpdate() (ret MaintenanceGetAutoUpdateRetType) { - ret, _ = o.GetAutoUpdateOk() - return ret +func (o *Maintenance) GetAutoUpdate() (res MaintenanceGetAutoUpdateRetType) { + res, _ = o.GetAutoUpdateOk() + return } -// GetAutoUpdateOk returns a tuple with the AutoUpdate field value +// GetAutoUpdateOk returns a tuple with the AutoUpdate 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 *Maintenance) GetAutoUpdateOk() (ret MaintenanceGetAutoUpdateRetType, ok bool) { return getMaintenanceGetAutoUpdateAttributeTypeOk(o.AutoUpdate) } -// SetAutoUpdate sets field value +// HasAutoUpdate 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 *Maintenance) HasAutoUpdate() bool { + _, ok := o.GetAutoUpdateOk() + return ok +} + +// SetAutoUpdate gets a reference to the given MaintenanceAutoUpdate and assigns it to the AutoUpdate field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Maintenance) SetAutoUpdate(v MaintenanceGetAutoUpdateRetType) { setMaintenanceGetAutoUpdateAttributeType(&o.AutoUpdate, v) } -// GetTimeWindow returns the TimeWindow field value +// GetTimeWindow returns the TimeWindow 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 *Maintenance) GetTimeWindow() (ret MaintenanceGetTimeWindowRetType) { - ret, _ = o.GetTimeWindowOk() - return ret +func (o *Maintenance) GetTimeWindow() (res MaintenanceGetTimeWindowRetType) { + res, _ = o.GetTimeWindowOk() + return } -// GetTimeWindowOk returns a tuple with the TimeWindow field value +// GetTimeWindowOk returns a tuple with the TimeWindow 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 *Maintenance) GetTimeWindowOk() (ret MaintenanceGetTimeWindowRetType, ok bool) { return getMaintenanceGetTimeWindowAttributeTypeOk(o.TimeWindow) } -// SetTimeWindow sets field value +// HasTimeWindow 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 *Maintenance) HasTimeWindow() bool { + _, ok := o.GetTimeWindowOk() + return ok +} + +// SetTimeWindow gets a reference to the given TimeWindow and assigns it to the TimeWindow field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Maintenance) SetTimeWindow(v MaintenanceGetTimeWindowRetType) { setMaintenanceGetTimeWindowAttributeType(&o.TimeWindow, v) diff --git a/services/ske/oas_commit b/services/ske/oas_commit index 69bfa80b3..5542f81cd 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -864bdad12a54f612df8fcdb6e41dd2933e94c3af +1ecc5ee263a36af12f8c9314dbed780cabe4deb2 diff --git a/services/ske/v1api/model_cluster_status_state.go b/services/ske/v1api/model_cluster_status_state.go index 87ac8357e..99416d494 100644 --- a/services/ske/v1api/model_cluster_status_state.go +++ b/services/ske/v1api/model_cluster_status_state.go @@ -15,7 +15,7 @@ import ( "fmt" ) -// ClusterStatusState the model 'ClusterStatusState' +// ClusterStatusState aggregated state of the cluster type ClusterStatusState string // List of ClusterStatusState diff --git a/services/ske/v1api/model_maintenance.go b/services/ske/v1api/model_maintenance.go index 95f846af2..db1f76f07 100644 --- a/services/ske/v1api/model_maintenance.go +++ b/services/ske/v1api/model_maintenance.go @@ -12,7 +12,6 @@ package v1api import ( "encoding/json" - "fmt" ) // checks if the Maintenance type satisfies the MappedNullable interface at compile time @@ -20,8 +19,8 @@ var _ MappedNullable = &Maintenance{} // Maintenance struct for Maintenance type Maintenance struct { - AutoUpdate MaintenanceAutoUpdate `json:"autoUpdate"` - TimeWindow TimeWindow `json:"timeWindow"` + AutoUpdate *MaintenanceAutoUpdate `json:"autoUpdate,omitempty"` + TimeWindow *TimeWindow `json:"timeWindow,omitempty"` AdditionalProperties map[string]interface{} } @@ -31,10 +30,8 @@ type _Maintenance Maintenance // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMaintenance(autoUpdate MaintenanceAutoUpdate, timeWindow TimeWindow) *Maintenance { +func NewMaintenance() *Maintenance { this := Maintenance{} - this.AutoUpdate = autoUpdate - this.TimeWindow = timeWindow return &this } @@ -46,52 +43,68 @@ func NewMaintenanceWithDefaults() *Maintenance { return &this } -// GetAutoUpdate returns the AutoUpdate field value +// GetAutoUpdate returns the AutoUpdate field value if set, zero value otherwise. func (o *Maintenance) GetAutoUpdate() MaintenanceAutoUpdate { - if o == nil { + if o == nil || IsNil(o.AutoUpdate) { var ret MaintenanceAutoUpdate return ret } - - return o.AutoUpdate + return *o.AutoUpdate } -// GetAutoUpdateOk returns a tuple with the AutoUpdate field value +// GetAutoUpdateOk returns a tuple with the AutoUpdate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Maintenance) GetAutoUpdateOk() (*MaintenanceAutoUpdate, bool) { - if o == nil { + if o == nil || IsNil(o.AutoUpdate) { return nil, false } - return &o.AutoUpdate, true + return o.AutoUpdate, true +} + +// HasAutoUpdate returns a boolean if a field has been set. +func (o *Maintenance) HasAutoUpdate() bool { + if o != nil && !IsNil(o.AutoUpdate) { + return true + } + + return false } -// SetAutoUpdate sets field value +// SetAutoUpdate gets a reference to the given MaintenanceAutoUpdate and assigns it to the AutoUpdate field. func (o *Maintenance) SetAutoUpdate(v MaintenanceAutoUpdate) { - o.AutoUpdate = v + o.AutoUpdate = &v } -// GetTimeWindow returns the TimeWindow field value +// GetTimeWindow returns the TimeWindow field value if set, zero value otherwise. func (o *Maintenance) GetTimeWindow() TimeWindow { - if o == nil { + if o == nil || IsNil(o.TimeWindow) { var ret TimeWindow return ret } - - return o.TimeWindow + return *o.TimeWindow } -// GetTimeWindowOk returns a tuple with the TimeWindow field value +// GetTimeWindowOk returns a tuple with the TimeWindow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Maintenance) GetTimeWindowOk() (*TimeWindow, bool) { - if o == nil { + if o == nil || IsNil(o.TimeWindow) { return nil, false } - return &o.TimeWindow, true + return o.TimeWindow, true } -// SetTimeWindow sets field value +// HasTimeWindow returns a boolean if a field has been set. +func (o *Maintenance) HasTimeWindow() bool { + if o != nil && !IsNil(o.TimeWindow) { + return true + } + + return false +} + +// SetTimeWindow gets a reference to the given TimeWindow and assigns it to the TimeWindow field. func (o *Maintenance) SetTimeWindow(v TimeWindow) { - o.TimeWindow = v + o.TimeWindow = &v } func (o Maintenance) MarshalJSON() ([]byte, error) { @@ -104,8 +117,12 @@ func (o Maintenance) MarshalJSON() ([]byte, error) { func (o Maintenance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["autoUpdate"] = o.AutoUpdate - toSerialize["timeWindow"] = o.TimeWindow + if !IsNil(o.AutoUpdate) { + toSerialize["autoUpdate"] = o.AutoUpdate + } + if !IsNil(o.TimeWindow) { + toSerialize["timeWindow"] = o.TimeWindow + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -115,28 +132,6 @@ func (o Maintenance) ToMap() (map[string]interface{}, error) { } func (o *Maintenance) 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{ - "autoUpdate", - "timeWindow", - } - - 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) - } - } - varMaintenance := _Maintenance{} err = json.Unmarshal(data, &varMaintenance) diff --git a/services/ske/v2api/model_access_scope.go b/services/ske/v2api/model_access_scope.go index 02b716197..1f53a154a 100644 --- a/services/ske/v2api/model_access_scope.go +++ b/services/ske/v2api/model_access_scope.go @@ -15,7 +15,7 @@ import ( "fmt" ) -// AccessScope The access scope of the Control Plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. This field is immutable. ⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. +// AccessScope The access scope of the Control Plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. ⚠️ Warning: Changing the access scope on an existing cluster directly impacts its network exposure (e.g., making a private cluster publicly accessible) ⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. type AccessScope string // List of AccessScope diff --git a/services/ske/v2api/model_cluster_status_state.go b/services/ske/v2api/model_cluster_status_state.go index ba2b80086..d31be23bf 100644 --- a/services/ske/v2api/model_cluster_status_state.go +++ b/services/ske/v2api/model_cluster_status_state.go @@ -15,7 +15,7 @@ import ( "fmt" ) -// ClusterStatusState the model 'ClusterStatusState' +// ClusterStatusState ClusterStatusState holds information about the current state of the Cluster type ClusterStatusState string // List of ClusterStatusState diff --git a/services/ske/v2api/model_maintenance.go b/services/ske/v2api/model_maintenance.go index b3870db1c..2c12faf06 100644 --- a/services/ske/v2api/model_maintenance.go +++ b/services/ske/v2api/model_maintenance.go @@ -12,7 +12,6 @@ package v2api import ( "encoding/json" - "fmt" ) // checks if the Maintenance type satisfies the MappedNullable interface at compile time @@ -20,8 +19,8 @@ var _ MappedNullable = &Maintenance{} // Maintenance struct for Maintenance type Maintenance struct { - AutoUpdate MaintenanceAutoUpdate `json:"autoUpdate"` - TimeWindow TimeWindow `json:"timeWindow"` + AutoUpdate *MaintenanceAutoUpdate `json:"autoUpdate,omitempty"` + TimeWindow *TimeWindow `json:"timeWindow,omitempty"` AdditionalProperties map[string]interface{} } @@ -31,10 +30,8 @@ type _Maintenance Maintenance // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMaintenance(autoUpdate MaintenanceAutoUpdate, timeWindow TimeWindow) *Maintenance { +func NewMaintenance() *Maintenance { this := Maintenance{} - this.AutoUpdate = autoUpdate - this.TimeWindow = timeWindow return &this } @@ -46,52 +43,68 @@ func NewMaintenanceWithDefaults() *Maintenance { return &this } -// GetAutoUpdate returns the AutoUpdate field value +// GetAutoUpdate returns the AutoUpdate field value if set, zero value otherwise. func (o *Maintenance) GetAutoUpdate() MaintenanceAutoUpdate { - if o == nil { + if o == nil || IsNil(o.AutoUpdate) { var ret MaintenanceAutoUpdate return ret } - - return o.AutoUpdate + return *o.AutoUpdate } -// GetAutoUpdateOk returns a tuple with the AutoUpdate field value +// GetAutoUpdateOk returns a tuple with the AutoUpdate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Maintenance) GetAutoUpdateOk() (*MaintenanceAutoUpdate, bool) { - if o == nil { + if o == nil || IsNil(o.AutoUpdate) { return nil, false } - return &o.AutoUpdate, true + return o.AutoUpdate, true +} + +// HasAutoUpdate returns a boolean if a field has been set. +func (o *Maintenance) HasAutoUpdate() bool { + if o != nil && !IsNil(o.AutoUpdate) { + return true + } + + return false } -// SetAutoUpdate sets field value +// SetAutoUpdate gets a reference to the given MaintenanceAutoUpdate and assigns it to the AutoUpdate field. func (o *Maintenance) SetAutoUpdate(v MaintenanceAutoUpdate) { - o.AutoUpdate = v + o.AutoUpdate = &v } -// GetTimeWindow returns the TimeWindow field value +// GetTimeWindow returns the TimeWindow field value if set, zero value otherwise. func (o *Maintenance) GetTimeWindow() TimeWindow { - if o == nil { + if o == nil || IsNil(o.TimeWindow) { var ret TimeWindow return ret } - - return o.TimeWindow + return *o.TimeWindow } -// GetTimeWindowOk returns a tuple with the TimeWindow field value +// GetTimeWindowOk returns a tuple with the TimeWindow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Maintenance) GetTimeWindowOk() (*TimeWindow, bool) { - if o == nil { + if o == nil || IsNil(o.TimeWindow) { return nil, false } - return &o.TimeWindow, true + return o.TimeWindow, true } -// SetTimeWindow sets field value +// HasTimeWindow returns a boolean if a field has been set. +func (o *Maintenance) HasTimeWindow() bool { + if o != nil && !IsNil(o.TimeWindow) { + return true + } + + return false +} + +// SetTimeWindow gets a reference to the given TimeWindow and assigns it to the TimeWindow field. func (o *Maintenance) SetTimeWindow(v TimeWindow) { - o.TimeWindow = v + o.TimeWindow = &v } func (o Maintenance) MarshalJSON() ([]byte, error) { @@ -104,8 +117,12 @@ func (o Maintenance) MarshalJSON() ([]byte, error) { func (o Maintenance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["autoUpdate"] = o.AutoUpdate - toSerialize["timeWindow"] = o.TimeWindow + if !IsNil(o.AutoUpdate) { + toSerialize["autoUpdate"] = o.AutoUpdate + } + if !IsNil(o.TimeWindow) { + toSerialize["timeWindow"] = o.TimeWindow + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -115,28 +132,6 @@ func (o Maintenance) ToMap() (map[string]interface{}, error) { } func (o *Maintenance) 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{ - "autoUpdate", - "timeWindow", - } - - 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) - } - } - varMaintenance := _Maintenance{} err = json.Unmarshal(data, &varMaintenance)