From 8211ccfbbbf2c1971ca70100d4230af90b7bd5ed Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 18 Aug 2026 11:36:20 +0000 Subject: [PATCH] Generate ske --- services/ske/model_access_scope.go | 2 +- services/ske/model_maintenance.go | 51 +++++++------ services/ske/oas_commit | 2 +- services/ske/v1api/model_maintenance.go | 91 +++++++++++------------- services/ske/v2api/model_access_scope.go | 2 +- services/ske/v2api/model_maintenance.go | 91 +++++++++++------------- 6 files changed, 118 insertions(+), 121 deletions(-) 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_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..0af22f1b2 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -864bdad12a54f612df8fcdb6e41dd2933e94c3af +dba2b6e065de87745d57269c1eaba07e3833f709 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_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)