From e767cfd76e418876480dbc316b583f451ba9f076 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 6 Mar 2026 10:56:08 +0000 Subject: [PATCH] Generate ske --- services/ske/api_default.go | 206 ++++++++++++++++++ services/ske/model_access.go | 151 +++++++++++++ services/ske/model_access_test.go | 11 + services/ske/model_cluster.go | 58 +++++ services/ske/model_cluster_error.go | 2 +- .../model_create_or_update_cluster_payload.go | 58 +++++ services/ske/model_idp_kubeconfig.go | 151 +++++++++++++ services/ske/model_idp_kubeconfig_test.go | 11 + services/ske/oas_commit | 2 +- 9 files changed, 648 insertions(+), 2 deletions(-) create mode 100644 services/ske/model_access.go create mode 100644 services/ske/model_access_test.go create mode 100644 services/ske/model_idp_kubeconfig.go create mode 100644 services/ske/model_idp_kubeconfig_test.go diff --git a/services/ske/api_default.go b/services/ske/api_default.go index 8030777ea..2da0c192e 100644 --- a/services/ske/api_default.go +++ b/services/ske/api_default.go @@ -151,6 +151,31 @@ type DefaultApi interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetClusterExecute(ctx context.Context, projectId string, region string, clusterName string) (*Cluster, error) + /* + GetIDPKubeconfig Get a kubeconfig to authenticate via IDP for use with the STACKIT CLI + A kubeconfig retrieved using this endpoint does not contain any credentials and instead obtains valid credentials via the STACKIT CLI. Permissions must be granted to the user beforehand using an admin kubeconfig. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param clusterName + @return ApiGetIDPKubeconfigRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + GetIDPKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiGetIDPKubeconfigRequest + /* + GetIDPKubeconfigExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param clusterName + @return IDPKubeconfig + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + GetIDPKubeconfigExecute(ctx context.Context, projectId string, region string, clusterName string) (*IDPKubeconfig, error) /* GetLoginKubeconfig Get an admin kubeconfig for use with the STACKIT CLI A admin kubeconfig retrieved using this endpoint does not contain any credentials and instead obtains valid credentials via the STACKIT CLI. @@ -381,6 +406,12 @@ type ApiGetClusterRequest interface { Execute() (*Cluster, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApiGetIDPKubeconfigRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*IDPKubeconfig, error) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetLoginKubeconfigRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1334,6 +1365,181 @@ func (a *APIClient) GetClusterExecute(ctx context.Context, projectId string, reg return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetIDPKubeconfigRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + clusterName string +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r GetIDPKubeconfigRequest) Execute() (*IDPKubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *IDPKubeconfig + ) + a := r.apiService + client, ok := a.client.(*APIClient) + if !ok { + return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + } + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetIDPKubeconfig") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/kubeconfig/idp" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", url.PathEscape(ParameterValueToString(r.clusterName, "clusterName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + var v RuntimeError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +GetIDPKubeconfig: Get a kubeconfig to authenticate via IDP for use with the STACKIT CLI + +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param clusterName + @return ApiGetIDPKubeconfigRequest +*/ +func (a *APIClient) GetIDPKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiGetIDPKubeconfigRequest { + return GetIDPKubeconfigRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (a *APIClient) GetIDPKubeconfigExecute(ctx context.Context, projectId string, region string, clusterName string) (*IDPKubeconfig, error) { + r := GetIDPKubeconfigRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } + return r.Execute() +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetLoginKubeconfigRequest struct { ctx context.Context diff --git a/services/ske/model_access.go b/services/ske/model_access.go new file mode 100644 index 000000000..fedde1494 --- /dev/null +++ b/services/ske/model_access.go @@ -0,0 +1,151 @@ +/* +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 Access type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Access{} + +/* + types and functions for idp +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AccessGetIdpAttributeType = *IDP + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AccessGetIdpArgType = IDP + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AccessGetIdpRetType = IDP + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getAccessGetIdpAttributeTypeOk(arg AccessGetIdpAttributeType) (ret AccessGetIdpRetType, 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 setAccessGetIdpAttributeType(arg *AccessGetIdpAttributeType, val AccessGetIdpRetType) { + *arg = &val +} + +// Access struct for Access +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Access struct { + Idp AccessGetIdpAttributeType `json:"idp,omitempty"` +} + +// NewAccess instantiates a new Access 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 NewAccess() *Access { + this := Access{} + return &this +} + +// NewAccessWithDefaults instantiates a new Access 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 NewAccessWithDefaults() *Access { + this := Access{} + return &this +} + +// GetIdp returns the Idp 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 *Access) GetIdp() (res AccessGetIdpRetType) { + res, _ = o.GetIdpOk() + return +} + +// GetIdpOk returns a tuple with the Idp 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 *Access) GetIdpOk() (ret AccessGetIdpRetType, ok bool) { + return getAccessGetIdpAttributeTypeOk(o.Idp) +} + +// HasIdp 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 *Access) HasIdp() bool { + _, ok := o.GetIdpOk() + return ok +} + +// SetIdp gets a reference to the given IDP and assigns it to the Idp field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Access) SetIdp(v AccessGetIdpRetType) { + setAccessGetIdpAttributeType(&o.Idp, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Access) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getAccessGetIdpAttributeTypeOk(o.Idp); ok { + toSerialize["Idp"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableAccess struct { + value *Access + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableAccess) Get() *Access { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableAccess) Set(val *Access) { + 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 NullableAccess) 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 *NullableAccess) 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 NewNullableAccess(val *Access) *NullableAccess { + return &NullableAccess{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 NullableAccess) 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 *NullableAccess) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_access_test.go b/services/ske/model_access_test.go new file mode 100644 index 000000000..be50da75a --- /dev/null +++ b/services/ske/model_access_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 2000d66cb..a46ee1e14 100644 --- a/services/ske/model_cluster.go +++ b/services/ske/model_cluster.go @@ -18,6 +18,33 @@ import ( // checks if the Cluster type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Cluster{} +/* + types and functions for access +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetAccessAttributeType = *Access + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetAccessArgType = Access + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ClusterGetAccessRetType = Access + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getClusterGetAccessAttributeTypeOk(arg ClusterGetAccessAttributeType) (ret ClusterGetAccessRetType, 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 setClusterGetAccessAttributeType(arg *ClusterGetAccessAttributeType, val ClusterGetAccessRetType) { + *arg = &val +} + /* types and functions for extensions */ @@ -237,6 +264,7 @@ func setClusterGetStatusAttributeType(arg *ClusterGetStatusAttributeType, val Cl // Cluster struct for Cluster // 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"` Extensions ClusterGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation ClusterGetHibernationAttributeType `json:"hibernation,omitempty"` // REQUIRED @@ -273,6 +301,33 @@ func NewClusterWithDefaults() *Cluster { return &this } +// GetAccess returns the Access 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) GetAccess() (res ClusterGetAccessRetType) { + res, _ = o.GetAccessOk() + return +} + +// GetAccessOk returns a tuple with the Access 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) GetAccessOk() (ret ClusterGetAccessRetType, ok bool) { + return getClusterGetAccessAttributeTypeOk(o.Access) +} + +// HasAccess 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) HasAccess() bool { + _, ok := o.GetAccessOk() + return ok +} + +// SetAccess gets a reference to the given Access and assigns it to the Access field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Cluster) SetAccess(v ClusterGetAccessRetType) { + setClusterGetAccessAttributeType(&o.Access, 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) { @@ -478,6 +533,9 @@ func (o *Cluster) SetStatus(v ClusterGetStatusRetType) { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Cluster) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getClusterGetAccessAttributeTypeOk(o.Access); ok { + toSerialize["Access"] = val + } if val, ok := getClusterGetExtensionsAttributeTypeOk(o.Extensions); ok { toSerialize["Extensions"] = val } diff --git a/services/ske/model_cluster_error.go b/services/ske/model_cluster_error.go index 88ac76360..f252f9a63 100644 --- a/services/ske/model_cluster_error.go +++ b/services/ske/model_cluster_error.go @@ -75,7 +75,7 @@ type ClusterErrorGetMessageRetType = string // ClusterError struct for ClusterError // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterError struct { - // Possible values: `\"SKE_OBSERVABILITY_INSTANCE_NOT_FOUND\"`, `\"SKE_DNS_ZONE_NOT_FOUND\"`, `\"SKE_NODE_NO_VALID_HOST_FOUND\"`, `\"SKE_NODE_MISCONFIGURED_PDB\"`, `\"SKE_NODE_MACHINE_TYPE_NOT_FOUND\"`, `\"SKE_INFRA_SNA_NETWORK_NOT_FOUND\"`, `\"SKE_FETCHING_ERRORS_NOT_POSSIBLE\"` + // Possible values: `\"SKE_INFRA_SNA_NETWORK_NOT_FOUND\"`, `\"SKE_INFRA_SNA_NETWORK_NO_ROUTER\"`, `\"SKE_NODE_NO_VALID_HOST_FOUND\"`, `\"SKE_NODE_MISCONFIGURED_PDB\"`, `\"SKE_NODE_MACHINE_TYPE_NOT_FOUND\"`, `\"SKE_NETWORK_NO_DNS_CONFIGURED\"`, `\"SKE_NETWORK_NO_AVAILABLE_IPS\"`, `\"SKE_NODE_MEMORY_PRESSURE\"`, `\"SKE_NODE_DISK_PRESSURE\"`, `\"SKE_NODE_PID_PRESSURE\"`, `\"SKE_OBSERVABILITY_INSTANCE_NOT_FOUND\"`, `\"SKE_OBSERVABILITY_INSTANCE_NOT_READY\"`, `\"SKE_DNS_ZONE_NOT_FOUND\"`, `\"SKE_FETCHING_ERRORS_NOT_POSSIBLE\"` Code ClusterErrorGetCodeAttributeType `json:"code,omitempty"` Message ClusterErrorGetMessageAttributeType `json:"message,omitempty"` } diff --git a/services/ske/model_create_or_update_cluster_payload.go b/services/ske/model_create_or_update_cluster_payload.go index 761c90a1c..55164b44d 100644 --- a/services/ske/model_create_or_update_cluster_payload.go +++ b/services/ske/model_create_or_update_cluster_payload.go @@ -18,6 +18,33 @@ import ( // checks if the CreateOrUpdateClusterPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateOrUpdateClusterPayload{} +/* + types and functions for access +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetAccessAttributeType = *Access + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetAccessArgType = Access + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateOrUpdateClusterPayloadGetAccessRetType = Access + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateOrUpdateClusterPayloadGetAccessAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetAccessAttributeType) (ret CreateOrUpdateClusterPayloadGetAccessRetType, 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 setCreateOrUpdateClusterPayloadGetAccessAttributeType(arg *CreateOrUpdateClusterPayloadGetAccessAttributeType, val CreateOrUpdateClusterPayloadGetAccessRetType) { + *arg = &val +} + /* types and functions for extensions */ @@ -210,6 +237,7 @@ func setCreateOrUpdateClusterPayloadGetStatusAttributeType(arg *CreateOrUpdateCl // CreateOrUpdateClusterPayload struct for CreateOrUpdateClusterPayload // 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"` Extensions CreateOrUpdateClusterPayloadGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation CreateOrUpdateClusterPayloadGetHibernationAttributeType `json:"hibernation,omitempty"` // REQUIRED @@ -245,6 +273,33 @@ func NewCreateOrUpdateClusterPayloadWithDefaults() *CreateOrUpdateClusterPayload return &this } +// GetAccess returns the Access 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) GetAccess() (res CreateOrUpdateClusterPayloadGetAccessRetType) { + res, _ = o.GetAccessOk() + return +} + +// GetAccessOk returns a tuple with the Access 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) GetAccessOk() (ret CreateOrUpdateClusterPayloadGetAccessRetType, ok bool) { + return getCreateOrUpdateClusterPayloadGetAccessAttributeTypeOk(o.Access) +} + +// HasAccess 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) HasAccess() bool { + _, ok := o.GetAccessOk() + return ok +} + +// SetAccess gets a reference to the given Access and assigns it to the Access field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateOrUpdateClusterPayload) SetAccess(v CreateOrUpdateClusterPayloadGetAccessRetType) { + setCreateOrUpdateClusterPayloadGetAccessAttributeType(&o.Access, 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) { @@ -423,6 +478,9 @@ func (o *CreateOrUpdateClusterPayload) SetStatus(v CreateOrUpdateClusterPayloadG // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateOrUpdateClusterPayloadGetAccessAttributeTypeOk(o.Access); ok { + toSerialize["Access"] = val + } if val, ok := getCreateOrUpdateClusterPayloadGetExtensionsAttributeTypeOk(o.Extensions); ok { toSerialize["Extensions"] = val } diff --git a/services/ske/model_idp_kubeconfig.go b/services/ske/model_idp_kubeconfig.go new file mode 100644 index 000000000..da8cb2702 --- /dev/null +++ b/services/ske/model_idp_kubeconfig.go @@ -0,0 +1,151 @@ +/* +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 IDPKubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IDPKubeconfig{} + +/* + types and functions for kubeconfig +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IDPKubeconfigGetKubeconfigAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getIDPKubeconfigGetKubeconfigAttributeTypeOk(arg IDPKubeconfigGetKubeconfigAttributeType) (ret IDPKubeconfigGetKubeconfigRetType, 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 setIDPKubeconfigGetKubeconfigAttributeType(arg *IDPKubeconfigGetKubeconfigAttributeType, val IDPKubeconfigGetKubeconfigRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IDPKubeconfigGetKubeconfigArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IDPKubeconfigGetKubeconfigRetType = string + +// IDPKubeconfig struct for IDPKubeconfig +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IDPKubeconfig struct { + Kubeconfig IDPKubeconfigGetKubeconfigAttributeType `json:"kubeconfig,omitempty"` +} + +// NewIDPKubeconfig instantiates a new IDPKubeconfig 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 NewIDPKubeconfig() *IDPKubeconfig { + this := IDPKubeconfig{} + return &this +} + +// NewIDPKubeconfigWithDefaults instantiates a new IDPKubeconfig 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 NewIDPKubeconfigWithDefaults() *IDPKubeconfig { + this := IDPKubeconfig{} + return &this +} + +// GetKubeconfig returns the Kubeconfig 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 *IDPKubeconfig) GetKubeconfig() (res IDPKubeconfigGetKubeconfigRetType) { + res, _ = o.GetKubeconfigOk() + return +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig 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 *IDPKubeconfig) GetKubeconfigOk() (ret IDPKubeconfigGetKubeconfigRetType, ok bool) { + return getIDPKubeconfigGetKubeconfigAttributeTypeOk(o.Kubeconfig) +} + +// HasKubeconfig 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 *IDPKubeconfig) HasKubeconfig() bool { + _, ok := o.GetKubeconfigOk() + return ok +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IDPKubeconfig) SetKubeconfig(v IDPKubeconfigGetKubeconfigRetType) { + setIDPKubeconfigGetKubeconfigAttributeType(&o.Kubeconfig, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o IDPKubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getIDPKubeconfigGetKubeconfigAttributeTypeOk(o.Kubeconfig); ok { + toSerialize["Kubeconfig"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableIDPKubeconfig struct { + value *IDPKubeconfig + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableIDPKubeconfig) Get() *IDPKubeconfig { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableIDPKubeconfig) Set(val *IDPKubeconfig) { + 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 NullableIDPKubeconfig) 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 *NullableIDPKubeconfig) 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 NewNullableIDPKubeconfig(val *IDPKubeconfig) *NullableIDPKubeconfig { + return &NullableIDPKubeconfig{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 NullableIDPKubeconfig) 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 *NullableIDPKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_idp_kubeconfig_test.go b/services/ske/model_idp_kubeconfig_test.go new file mode 100644 index 000000000..be50da75a --- /dev/null +++ b/services/ske/model_idp_kubeconfig_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/oas_commit b/services/ske/oas_commit index 853627d06..f5e4510f9 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -335aa32af4d6c0d2a036b8567773da2f051f7efb +73b7457504497158e2836857f5ca4d2e6186ee5d