From 3302c626d2580f24ea1f16c6d55c630252e89e49 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 6 Nov 2026 11:21:49 +0000 Subject: [PATCH] Generate ske --- services/ske/oas_commit | 2 +- services/ske/v2api/model_cilium_config.go | 153 ++++++++++++++++++ services/ske/v2api/model_cilium_hubble.go | 153 ++++++++++++++++++ services/ske/v2api/model_cni.go | 40 ++++- .../ske/v2api/model_machine_image_version.go | 18 +-- .../v2api/model_machine_image_version_cri.go | 153 ++++++++++++++++++ 6 files changed, 507 insertions(+), 12 deletions(-) create mode 100644 services/ske/v2api/model_cilium_config.go create mode 100644 services/ske/v2api/model_cilium_hubble.go create mode 100644 services/ske/v2api/model_machine_image_version_cri.go diff --git a/services/ske/oas_commit b/services/ske/oas_commit index 71a76821d4..d7bdec94a5 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -0afa5e4924e6bf230fdade5cb294ecfd97dd63e5 +744453641dffd3dae2ab164a7b58be6a0b85fe78 diff --git a/services/ske/v2api/model_cilium_config.go b/services/ske/v2api/model_cilium_config.go new file mode 100644 index 0000000000..f2dfce0aed --- /dev/null +++ b/services/ske/v2api/model_cilium_config.go @@ -0,0 +1,153 @@ +/* +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 CiliumConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CiliumConfig{} + +// CiliumConfig Configuration options for the Cilium CNI ⚠️ Note: This feature is in private preview. Enabling Cilium is only possible for enabled accounts. If your account does not have access, the request will be rejected. +type CiliumConfig struct { + Hubble *CiliumHubble `json:"hubble,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CiliumConfig CiliumConfig + +// NewCiliumConfig instantiates a new CiliumConfig 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 NewCiliumConfig() *CiliumConfig { + this := CiliumConfig{} + return &this +} + +// NewCiliumConfigWithDefaults instantiates a new CiliumConfig 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 NewCiliumConfigWithDefaults() *CiliumConfig { + this := CiliumConfig{} + return &this +} + +// GetHubble returns the Hubble field value if set, zero value otherwise. +func (o *CiliumConfig) GetHubble() CiliumHubble { + if o == nil || IsNil(o.Hubble) { + var ret CiliumHubble + return ret + } + return *o.Hubble +} + +// GetHubbleOk returns a tuple with the Hubble field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CiliumConfig) GetHubbleOk() (*CiliumHubble, bool) { + if o == nil || IsNil(o.Hubble) { + return nil, false + } + return o.Hubble, true +} + +// HasHubble returns a boolean if a field has been set. +func (o *CiliumConfig) HasHubble() bool { + if o != nil && !IsNil(o.Hubble) { + return true + } + + return false +} + +// SetHubble gets a reference to the given CiliumHubble and assigns it to the Hubble field. +func (o *CiliumConfig) SetHubble(v CiliumHubble) { + o.Hubble = &v +} + +func (o CiliumConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CiliumConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hubble) { + toSerialize["hubble"] = o.Hubble + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CiliumConfig) UnmarshalJSON(data []byte) (err error) { + varCiliumConfig := _CiliumConfig{} + + err = json.Unmarshal(data, &varCiliumConfig) + + if err != nil { + return err + } + + *o = CiliumConfig(varCiliumConfig) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "hubble") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCiliumConfig struct { + value *CiliumConfig + isSet bool +} + +func (v NullableCiliumConfig) Get() *CiliumConfig { + return v.value +} + +func (v *NullableCiliumConfig) Set(val *CiliumConfig) { + v.value = val + v.isSet = true +} + +func (v NullableCiliumConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableCiliumConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCiliumConfig(val *CiliumConfig) *NullableCiliumConfig { + return &NullableCiliumConfig{value: val, isSet: true} +} + +func (v NullableCiliumConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCiliumConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cilium_hubble.go b/services/ske/v2api/model_cilium_hubble.go new file mode 100644 index 0000000000..e51ed02b0d --- /dev/null +++ b/services/ske/v2api/model_cilium_hubble.go @@ -0,0 +1,153 @@ +/* +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 CiliumHubble type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CiliumHubble{} + +// CiliumHubble struct for CiliumHubble +type CiliumHubble struct { + Enabled *bool `json:"enabled,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CiliumHubble CiliumHubble + +// NewCiliumHubble instantiates a new CiliumHubble 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 NewCiliumHubble() *CiliumHubble { + this := CiliumHubble{} + return &this +} + +// NewCiliumHubbleWithDefaults instantiates a new CiliumHubble 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 NewCiliumHubbleWithDefaults() *CiliumHubble { + this := CiliumHubble{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *CiliumHubble) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CiliumHubble) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *CiliumHubble) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *CiliumHubble) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o CiliumHubble) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CiliumHubble) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CiliumHubble) UnmarshalJSON(data []byte) (err error) { + varCiliumHubble := _CiliumHubble{} + + err = json.Unmarshal(data, &varCiliumHubble) + + if err != nil { + return err + } + + *o = CiliumHubble(varCiliumHubble) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCiliumHubble struct { + value *CiliumHubble + isSet bool +} + +func (v NullableCiliumHubble) Get() *CiliumHubble { + return v.value +} + +func (v *NullableCiliumHubble) Set(val *CiliumHubble) { + v.value = val + v.isSet = true +} + +func (v NullableCiliumHubble) IsSet() bool { + return v.isSet +} + +func (v *NullableCiliumHubble) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCiliumHubble(val *CiliumHubble) *NullableCiliumHubble { + return &NullableCiliumHubble{value: val, isSet: true} +} + +func (v NullableCiliumHubble) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCiliumHubble) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cni.go b/services/ske/v2api/model_cni.go index 469420e6c7..329dac7221 100644 --- a/services/ske/v2api/model_cni.go +++ b/services/ske/v2api/model_cni.go @@ -17,10 +17,10 @@ import ( // 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 +// 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"` + Cilium *CiliumConfig `json:"cilium,omitempty"` AdditionalProperties map[string]interface{} } @@ -75,6 +75,38 @@ func (o *CNI) SetCalico(v map[string]interface{}) { o.Calico = v } +// GetCilium returns the Cilium field value if set, zero value otherwise. +func (o *CNI) GetCilium() CiliumConfig { + if o == nil || IsNil(o.Cilium) { + var ret CiliumConfig + return ret + } + return *o.Cilium +} + +// GetCiliumOk returns a tuple with the Cilium field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNI) GetCiliumOk() (*CiliumConfig, bool) { + if o == nil || IsNil(o.Cilium) { + return nil, false + } + return o.Cilium, true +} + +// HasCilium returns a boolean if a field has been set. +func (o *CNI) HasCilium() bool { + if o != nil && !IsNil(o.Cilium) { + return true + } + + return false +} + +// SetCilium gets a reference to the given CiliumConfig and assigns it to the Cilium field. +func (o *CNI) SetCilium(v CiliumConfig) { + o.Cilium = &v +} + func (o CNI) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -88,6 +120,9 @@ func (o CNI) ToMap() (map[string]interface{}, error) { if !IsNil(o.Calico) { toSerialize["calico"] = o.Calico } + if !IsNil(o.Cilium) { + toSerialize["cilium"] = o.Cilium + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -111,6 +146,7 @@ func (o *CNI) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "calico") + delete(additionalProperties, "cilium") o.AdditionalProperties = additionalProperties } diff --git a/services/ske/v2api/model_machine_image_version.go b/services/ske/v2api/model_machine_image_version.go index 7dc89c6d53..5a6ce923da 100644 --- a/services/ske/v2api/model_machine_image_version.go +++ b/services/ske/v2api/model_machine_image_version.go @@ -20,10 +20,10 @@ var _ MappedNullable = &MachineImageVersion{} // MachineImageVersion struct for MachineImageVersion 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=^(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-]+)*))?$"` + Cri []MachineImageVersionCRI `json:"cri,omitempty"` + ExpirationDate *time.Time `json:"expirationDate,omitempty"` + State *string `json:"state,omitempty"` + 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{} } @@ -47,9 +47,9 @@ func NewMachineImageVersionWithDefaults() *MachineImageVersion { } // GetCri returns the Cri field value if set, zero value otherwise. -func (o *MachineImageVersion) GetCri() []CRI { +func (o *MachineImageVersion) GetCri() []MachineImageVersionCRI { if o == nil || IsNil(o.Cri) { - var ret []CRI + var ret []MachineImageVersionCRI return ret } return o.Cri @@ -57,7 +57,7 @@ func (o *MachineImageVersion) GetCri() []CRI { // GetCriOk returns a tuple with the Cri field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MachineImageVersion) GetCriOk() ([]CRI, bool) { +func (o *MachineImageVersion) GetCriOk() ([]MachineImageVersionCRI, bool) { if o == nil || IsNil(o.Cri) { return nil, false } @@ -73,8 +73,8 @@ func (o *MachineImageVersion) HasCri() bool { return false } -// SetCri gets a reference to the given []CRI and assigns it to the Cri field. -func (o *MachineImageVersion) SetCri(v []CRI) { +// SetCri gets a reference to the given []MachineImageVersionCRI and assigns it to the Cri field. +func (o *MachineImageVersion) SetCri(v []MachineImageVersionCRI) { o.Cri = v } diff --git a/services/ske/v2api/model_machine_image_version_cri.go b/services/ske/v2api/model_machine_image_version_cri.go new file mode 100644 index 0000000000..f49f7a3e09 --- /dev/null +++ b/services/ske/v2api/model_machine_image_version_cri.go @@ -0,0 +1,153 @@ +/* +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 MachineImageVersionCRI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineImageVersionCRI{} + +// MachineImageVersionCRI struct for MachineImageVersionCRI +type MachineImageVersionCRI struct { + Name *NameOfTheCriLibrary `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MachineImageVersionCRI MachineImageVersionCRI + +// NewMachineImageVersionCRI instantiates a new MachineImageVersionCRI 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 NewMachineImageVersionCRI() *MachineImageVersionCRI { + this := MachineImageVersionCRI{} + return &this +} + +// NewMachineImageVersionCRIWithDefaults instantiates a new MachineImageVersionCRI 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 NewMachineImageVersionCRIWithDefaults() *MachineImageVersionCRI { + this := MachineImageVersionCRI{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineImageVersionCRI) GetName() NameOfTheCriLibrary { + if o == nil || IsNil(o.Name) { + var ret NameOfTheCriLibrary + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersionCRI) GetNameOk() (*NameOfTheCriLibrary, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *MachineImageVersionCRI) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given NameOfTheCriLibrary and assigns it to the Name field. +func (o *MachineImageVersionCRI) SetName(v NameOfTheCriLibrary) { + o.Name = &v +} + +func (o MachineImageVersionCRI) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineImageVersionCRI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MachineImageVersionCRI) UnmarshalJSON(data []byte) (err error) { + varMachineImageVersionCRI := _MachineImageVersionCRI{} + + err = json.Unmarshal(data, &varMachineImageVersionCRI) + + if err != nil { + return err + } + + *o = MachineImageVersionCRI(varMachineImageVersionCRI) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMachineImageVersionCRI struct { + value *MachineImageVersionCRI + isSet bool +} + +func (v NullableMachineImageVersionCRI) Get() *MachineImageVersionCRI { + return v.value +} + +func (v *NullableMachineImageVersionCRI) Set(val *MachineImageVersionCRI) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImageVersionCRI) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImageVersionCRI) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImageVersionCRI(val *MachineImageVersionCRI) *NullableMachineImageVersionCRI { + return &NullableMachineImageVersionCRI{value: val, isSet: true} +} + +func (v NullableMachineImageVersionCRI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImageVersionCRI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}