diff --git a/CHANGELOG.md b/CHANGELOG.md index 40f1779fb..3236f8815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ - `sqlserverflex`: [v1.5.0](services/sqlserverflex/CHANGELOG.md#v150) - **Feature:** Introduction of multi API version support for the sqlserverflex SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062 - `v1api`: New package which can be used for communication with the sqlserverflex v1 API - - `v2api`: New package which can be used for communication with the sqlserverflex v1 API + - `v2api`: New package which can be used for communication with the sqlserverflex v2 API - `v3alpha1api`: New package which can be used for communication with the sqlserverflex v3 alpha1 API - `v3beta1api`: New package which can be used for communication with the sqlserverflex v3 beta1 API - **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead. @@ -32,6 +32,12 @@ - `vpn`: [v0.1.0](services/vpn/CHANGELOG.md#v010) - **New:** SDK module for vpn service - `v1alpha1api`: New package which can be used for communication with the vpn v1 alpha1 API +- `ske`: [v1.8.0](services/ske/CHANGELOG.md#v180) + - **Feature:** Introduction of multi API version support for the ske SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062 + - `v1api`: New package which can be used for communication with the ske v1 API + - `v2api`: New package which can be used for communication with the ske v2 API + - **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead. + - **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0` ## Release (2026-02-20) - `core`: [v0.21.1](core/CHANGELOG.md#v0211) diff --git a/examples/ske/go.mod b/examples/ske/go.mod index bb7db27a1..4ddbe11b8 100644 --- a/examples/ske/go.mod +++ b/examples/ske/go.mod @@ -2,8 +2,11 @@ module github.com/stackitcloud/stackit-sdk-go/examples/ske go 1.21 +// This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub. +replace github.com/stackitcloud/stackit-sdk-go/services/ske => ../../services/ske + require ( - github.com/stackitcloud/stackit-sdk-go/core v0.21.1 + github.com/stackitcloud/stackit-sdk-go/core v0.22.0 github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0 ) diff --git a/examples/ske/go.sum b/examples/ske/go.sum index ac9dd8bb5..195011dd5 100644 --- a/examples/ske/go.sum +++ b/examples/ske/go.sum @@ -4,7 +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.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= -github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0 h1:l1QjxW7sdE/6B6BZtHxbmus8XJdI9KDuXX3fwUa5fog= -github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0/go.mod h1:1Jr+ImrmPERxbYnlTy6O2aSZYNnREf2qQyysv6YC1RY= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/examples/ske/ske.go b/examples/ske/ske.go index b8737e366..a79580a02 100644 --- a/examples/ske/ske.go +++ b/examples/ske/ske.go @@ -6,8 +6,8 @@ import ( "os" "github.com/stackitcloud/stackit-sdk-go/core/utils" - "github.com/stackitcloud/stackit-sdk-go/services/ske" - "github.com/stackitcloud/stackit-sdk-go/services/ske/wait" + ske "github.com/stackitcloud/stackit-sdk-go/services/ske/v2api" + "github.com/stackitcloud/stackit-sdk-go/services/ske/v2api/wait" ) func main() { @@ -32,51 +32,51 @@ func main() { // } // Get the ske clusters for your project - getClustersResp, err := skeClient.ListClusters(context.Background(), projectId, region).Execute() + getClustersResp, err := skeClient.DefaultAPI.ListClusters(context.Background(), projectId, region).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `GetClusters`: %v\n", err) } else { - fmt.Printf("Number of clusters: %v\n", len(*getClustersResp.Items)) + fmt.Printf("Number of clusters: %v\n", len(getClustersResp.Items)) } var availableVersion string // Get the ske provider options - getOptionsResp, err := skeClient.ListProviderOptions(context.Background(), region).Execute() + getOptionsResp, err := skeClient.DefaultAPI.ListProviderOptions(context.Background(), region).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `GetOptions`: %v\n", err) } else { - availableVersions := *getOptionsResp.KubernetesVersions + availableVersions := getOptionsResp.KubernetesVersions availableVersion = *availableVersions[0].Version fmt.Printf("First available version: %v\n", availableVersion) } // Create an ske cluster createInstancePayload := ske.CreateOrUpdateClusterPayload{ - Kubernetes: &ske.Kubernetes{ - Version: utils.Ptr(availableVersion), + Kubernetes: ske.Kubernetes{ + Version: availableVersion, }, - Nodepools: &[]ske.Nodepool{ + Nodepools: []ske.Nodepool{ { - AvailabilityZones: utils.Ptr([]string{"eu01-3"}), - Machine: &ske.Machine{ - Image: &ske.Image{ - Name: utils.Ptr("name"), - Version: utils.Ptr("3510.2.5"), + AvailabilityZones: []string{"eu01-3"}, + Machine: ske.Machine{ + Image: ske.Image{ + Name: "name", + Version: "3510.2.5", }, - Type: utils.Ptr("b1.2"), + Type: "b1.2", }, - Maximum: utils.Ptr(int64(3)), - Minimum: utils.Ptr(int64(2)), - Name: utils.Ptr("my-nodepool"), - Volume: &ske.Volume{ - Size: utils.Ptr(int64(20)), + Maximum: int32(3), + Minimum: int32(2), + Name: "my-nodepool", + Volume: ske.Volume{ + Size: int32(20), Type: utils.Ptr("storage_premium_perf0"), }, }, }, } clusterName := "cl-name" - createClusterResp, err := skeClient.CreateOrUpdateCluster(context.Background(), projectId, region, clusterName).CreateOrUpdateClusterPayload(createInstancePayload).Execute() + createClusterResp, err := skeClient.DefaultAPI.CreateOrUpdateCluster(context.Background(), projectId, region, clusterName).CreateOrUpdateClusterPayload(createInstancePayload).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CreateCluster`: %v\n", err) } else { @@ -84,7 +84,7 @@ func main() { } // Wait for cluster creation to complete - _, err = wait.CreateOrUpdateClusterWaitHandler(context.Background(), skeClient, projectId, region, clusterName).WaitWithContext(context.Background()) + _, err = wait.CreateOrUpdateClusterWaitHandler(context.Background(), skeClient.DefaultAPI, projectId, region, clusterName).WaitWithContext(context.Background()) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CreateOrUpdateCluster`: %v\n", err) } else { @@ -92,7 +92,7 @@ func main() { } // Start cluster credential rotation - _, err = skeClient.StartCredentialsRotationExecute(context.Background(), projectId, region, clusterName) + _, err = skeClient.DefaultAPI.StartCredentialsRotation(context.Background(), projectId, region, clusterName).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StartCredentialsRotation`: %v\n", err) } else { @@ -100,7 +100,7 @@ func main() { } // Wait for cluster credential rotation to be prepared - _, err = wait.StartCredentialsRotationWaitHandler(context.Background(), skeClient, projectId, region, clusterName).WaitWithContext(context.Background()) + _, err = wait.StartCredentialsRotationWaitHandler(context.Background(), skeClient.DefaultAPI, projectId, region, clusterName).WaitWithContext(context.Background()) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StartRotateCredentials`: %v\n", err) } else { @@ -108,7 +108,7 @@ func main() { } // Complete cluster credential rotation - _, err = skeClient.CompleteCredentialsRotationExecute(context.Background(), projectId, region, clusterName) + _, err = skeClient.DefaultAPI.CompleteCredentialsRotation(context.Background(), projectId, region, clusterName).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CompleteCredentialsRotation`: %v\n", err) } else { @@ -116,7 +116,7 @@ func main() { } // Wait for cluster credential rotation to be completed - _, err = wait.CompleteCredentialsRotationWaitHandler(context.Background(), skeClient, projectId, region, clusterName).WaitWithContext(context.Background()) + _, err = wait.CompleteCredentialsRotationWaitHandler(context.Background(), skeClient.DefaultAPI, projectId, region, clusterName).WaitWithContext(context.Background()) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CompleteRotateCredentials`: %v\n", err) } else { diff --git a/services/ske/CHANGELOG.md b/services/ske/CHANGELOG.md index 12c095c04..275819c7e 100644 --- a/services/ske/CHANGELOG.md +++ b/services/ske/CHANGELOG.md @@ -1,3 +1,10 @@ +## v1.8.0 +- **Feature:** Introduction of multi API version support for the ske SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062 +- `v1api`: New package which can be used for communication with the ske v1 API +- `v2api`: New package which can be used for communication with the ske v2 API +- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead. +- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0` + ## v1.7.0 - **Feature:** new model `AccessScope` - **Feature:** new model `V2ControlPlaneNetwork` diff --git a/services/ske/VERSION b/services/ske/VERSION index b7c8e167d..804a616da 100644 --- a/services/ske/VERSION +++ b/services/ske/VERSION @@ -1 +1 @@ -v1.7.0 \ No newline at end of file +v1.8.0 diff --git a/services/ske/api_default.go b/services/ske/api_default.go index 1205b5d2b..8030777ea 100644 --- a/services/ske/api_default.go +++ b/services/ske/api_default.go @@ -8,6 +8,7 @@ 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 ( @@ -23,6 +24,7 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/oapierror" ) +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApi interface { /* CompleteCredentialsRotation Complete cluster credentials rotation @@ -33,6 +35,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiCompleteCredentialsRotationRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CompleteCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiCompleteCredentialsRotationRequest /* @@ -44,6 +48,7 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CompleteCredentialsRotationExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) /* @@ -55,6 +60,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiCreateKubeconfigRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiCreateKubeconfigRequest /* @@ -66,6 +73,7 @@ type DefaultApi interface { @param clusterName @return Kubeconfig + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateKubeconfigExecute(ctx context.Context, projectId string, region string, clusterName string) (*Kubeconfig, error) /* @@ -77,6 +85,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiCreateOrUpdateClusterRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest /* @@ -88,6 +98,7 @@ type DefaultApi interface { @param clusterName @return Cluster + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateOrUpdateClusterExecute(ctx context.Context, projectId string, region string, clusterName string) (*Cluster, error) /* @@ -99,6 +110,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiDeleteClusterRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteCluster(ctx context.Context, projectId string, region string, clusterName string) ApiDeleteClusterRequest /* @@ -110,6 +123,7 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteClusterExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) /* @@ -121,6 +135,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiGetClusterRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetCluster(ctx context.Context, projectId string, region string, clusterName string) ApiGetClusterRequest /* @@ -132,6 +148,7 @@ type DefaultApi interface { @param clusterName @return Cluster + // 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) /* @@ -143,6 +160,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiGetLoginKubeconfigRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetLoginKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiGetLoginKubeconfigRequest /* @@ -154,6 +173,7 @@ type DefaultApi interface { @param clusterName @return LoginKubeconfig + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetLoginKubeconfigExecute(ctx context.Context, projectId string, region string, clusterName string) (*LoginKubeconfig, error) /* @@ -164,6 +184,8 @@ type DefaultApi interface { @param projectId @param region @return ApiListClustersRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListClusters(ctx context.Context, projectId string, region string) ApiListClustersRequest /* @@ -174,6 +196,7 @@ type DefaultApi interface { @param region @return ListClustersResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListClustersExecute(ctx context.Context, projectId string, region string) (*ListClustersResponse, error) /* @@ -183,6 +206,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param region @return ApiListProviderOptionsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListProviderOptions(ctx context.Context, region string) ApiListProviderOptionsRequest /* @@ -192,6 +217,7 @@ type DefaultApi interface { @param region @return ProviderOptions + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListProviderOptionsExecute(ctx context.Context, region string) (*ProviderOptions, error) /* @@ -203,6 +229,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiStartCredentialsRotationRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ StartCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiStartCredentialsRotationRequest /* @@ -214,6 +242,7 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ StartCredentialsRotationExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) /* @@ -225,6 +254,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiTriggerHibernateRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerHibernate(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerHibernateRequest /* @@ -236,6 +267,7 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerHibernateExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) /* @@ -247,6 +279,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiTriggerMaintenanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerMaintenance(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerMaintenanceRequest /* @@ -258,6 +292,7 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerMaintenanceExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) /* @@ -269,6 +304,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiTriggerReconcileRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerReconcile(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerReconcileRequest /* @@ -280,6 +317,7 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerReconcileExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) /* @@ -291,6 +329,8 @@ type DefaultApi interface { @param region @param clusterName @return ApiTriggerWakeupRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerWakeup(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerWakeupRequest /* @@ -302,68 +342,100 @@ type DefaultApi interface { @param clusterName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ TriggerWakeupExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCompleteCredentialsRotationRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateKubeconfigRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateKubeconfigPayload(createKubeconfigPayload CreateKubeconfigPayload) ApiCreateKubeconfigRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Kubeconfig, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateOrUpdateClusterRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateOrUpdateClusterPayload(createOrUpdateClusterPayload CreateOrUpdateClusterPayload) ApiCreateOrUpdateClusterRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Cluster, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteClusterRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetClusterRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Cluster, 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 Execute() (*LoginKubeconfig, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListClustersRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListClustersResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListProviderOptionsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead VersionState(versionState string) ApiListProviderOptionsRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ProviderOptions, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiStartCredentialsRotationRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiTriggerHibernateRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiTriggerMaintenanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiTriggerReconcileRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiTriggerWakeupRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } // DefaultApiService DefaultApi service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApiService service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CompleteCredentialsRotationRequest struct { ctx context.Context apiService *DefaultApiService @@ -372,6 +444,7 @@ type CompleteCredentialsRotationRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CompleteCredentialsRotationRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodPost @@ -507,7 +580,7 @@ func (r CompleteCredentialsRotationRequest) Execute() (map[string]interface{}, e /* CompleteCredentialsRotation: Complete cluster credentials rotation -Complete cluster credentials rotation. This is step 2 of a two-step process. Start the rotation using [start-credentials-rotation](#tag/Credentials/operation/SkeService_StartClusterCredentialsRotation). +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 @@ -525,6 +598,7 @@ func (a *APIClient) CompleteCredentialsRotation(ctx context.Context, projectId s } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CompleteCredentialsRotationExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := CompleteCredentialsRotationRequest{ apiService: a.defaultApi, @@ -536,6 +610,7 @@ func (a *APIClient) CompleteCredentialsRotationExecute(ctx context.Context, proj return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateKubeconfigRequest struct { ctx context.Context apiService *DefaultApiService @@ -545,11 +620,13 @@ type CreateKubeconfigRequest struct { createKubeconfigPayload *CreateKubeconfigPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateKubeconfigRequest) CreateKubeconfigPayload(createKubeconfigPayload CreateKubeconfigPayload) ApiCreateKubeconfigRequest { r.createKubeconfigPayload = &createKubeconfigPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateKubeconfigRequest) Execute() (*Kubeconfig, error) { var ( localVarHTTPMethod = http.MethodPost @@ -690,7 +767,7 @@ func (r CreateKubeconfigRequest) Execute() (*Kubeconfig, error) { /* CreateKubeconfig: Create an admin kubeconfig -Create a new admin kubeconfig for the cluster. You can specify the expiration (in seconds) in the request body. Its value must be in the range from 600 (10 min) to 15552000 (6 months). Defaults to 3600. +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 @@ -708,6 +785,7 @@ func (a *APIClient) CreateKubeconfig(ctx context.Context, projectId string, regi } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateKubeconfigExecute(ctx context.Context, projectId string, region string, clusterName string) (*Kubeconfig, error) { r := CreateKubeconfigRequest{ apiService: a.defaultApi, @@ -719,6 +797,7 @@ func (a *APIClient) CreateKubeconfigExecute(ctx context.Context, projectId strin return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterRequest struct { ctx context.Context apiService *DefaultApiService @@ -728,11 +807,13 @@ type CreateOrUpdateClusterRequest struct { createOrUpdateClusterPayload *CreateOrUpdateClusterPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateOrUpdateClusterRequest) CreateOrUpdateClusterPayload(createOrUpdateClusterPayload CreateOrUpdateClusterPayload) ApiCreateOrUpdateClusterRequest { r.createOrUpdateClusterPayload = &createOrUpdateClusterPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateOrUpdateClusterRequest) Execute() (*Cluster, error) { var ( localVarHTTPMethod = http.MethodPut @@ -873,7 +954,7 @@ func (r CreateOrUpdateClusterRequest) Execute() (*Cluster, error) { /* CreateOrUpdateCluster: Create or update a cluster -Create a new cluster in your project or modify an existing one. To get valid values for certain properties please check the [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) endpoint. +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 @@ -891,6 +972,7 @@ func (a *APIClient) CreateOrUpdateCluster(ctx context.Context, projectId string, } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateOrUpdateClusterExecute(ctx context.Context, projectId string, region string, clusterName string) (*Cluster, error) { r := CreateOrUpdateClusterRequest{ apiService: a.defaultApi, @@ -902,6 +984,7 @@ func (a *APIClient) CreateOrUpdateClusterExecute(ctx context.Context, projectId return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteClusterRequest struct { ctx context.Context apiService *DefaultApiService @@ -910,6 +993,7 @@ type DeleteClusterRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteClusterRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -1045,7 +1129,7 @@ func (r DeleteClusterRequest) Execute() (map[string]interface{}, error) { /* DeleteCluster: Delete a cluster -Delete Kubernetes cluster specified by the identifier, belonging to the project specified by `projectId`. +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 @@ -1063,6 +1147,7 @@ func (a *APIClient) DeleteCluster(ctx context.Context, projectId string, region } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteClusterExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := DeleteClusterRequest{ apiService: a.defaultApi, @@ -1074,6 +1159,7 @@ func (a *APIClient) DeleteClusterExecute(ctx context.Context, projectId string, return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetClusterRequest struct { ctx context.Context apiService *DefaultApiService @@ -1082,6 +1168,7 @@ type GetClusterRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetClusterRequest) Execute() (*Cluster, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1217,7 +1304,7 @@ func (r GetClusterRequest) Execute() (*Cluster, error) { /* GetCluster: Get a cluster -Get Kubernetes cluster for the specified identifier, belonging to the project specified by `projectId`. +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 @@ -1235,6 +1322,7 @@ func (a *APIClient) GetCluster(ctx context.Context, projectId string, region str } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetClusterExecute(ctx context.Context, projectId string, region string, clusterName string) (*Cluster, error) { r := GetClusterRequest{ apiService: a.defaultApi, @@ -1246,6 +1334,7 @@ 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 GetLoginKubeconfigRequest struct { ctx context.Context apiService *DefaultApiService @@ -1254,6 +1343,7 @@ type GetLoginKubeconfigRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetLoginKubeconfigRequest) Execute() (*LoginKubeconfig, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1389,7 +1479,7 @@ func (r GetLoginKubeconfigRequest) Execute() (*LoginKubeconfig, 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. +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 @@ -1407,6 +1497,7 @@ func (a *APIClient) GetLoginKubeconfig(ctx context.Context, projectId string, re } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetLoginKubeconfigExecute(ctx context.Context, projectId string, region string, clusterName string) (*LoginKubeconfig, error) { r := GetLoginKubeconfigRequest{ apiService: a.defaultApi, @@ -1418,6 +1509,7 @@ func (a *APIClient) GetLoginKubeconfigExecute(ctx context.Context, projectId str return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListClustersRequest struct { ctx context.Context apiService *DefaultApiService @@ -1425,6 +1517,7 @@ type ListClustersRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListClustersRequest) Execute() (*ListClustersResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1559,7 +1652,7 @@ func (r ListClustersRequest) Execute() (*ListClustersResponse, error) { /* ListClusters: List all clusters -Return a list of Kubernetes clusters in the project specified by `projectId`. +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 @@ -1575,6 +1668,7 @@ func (a *APIClient) ListClusters(ctx context.Context, projectId string, region s } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListClustersExecute(ctx context.Context, projectId string, region string) (*ListClustersResponse, error) { r := ListClustersRequest{ apiService: a.defaultApi, @@ -1585,6 +1679,7 @@ func (a *APIClient) ListClustersExecute(ctx context.Context, projectId string, r return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListProviderOptionsRequest struct { ctx context.Context apiService *DefaultApiService @@ -1592,11 +1687,13 @@ type ListProviderOptionsRequest struct { versionState *string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListProviderOptionsRequest) VersionState(versionState string) ApiListProviderOptionsRequest { r.versionState = &versionState return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListProviderOptionsRequest) Execute() (*ProviderOptions, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1711,7 +1808,7 @@ func (r ListProviderOptionsRequest) Execute() (*ProviderOptions, error) { /* ListProviderOptions: List provider options -Returns available Kubernetes versions, availability zones, machine types, OS versions and volume types for the cluster nodes. +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 region @@ -1725,6 +1822,7 @@ func (a *APIClient) ListProviderOptions(ctx context.Context, region string) ApiL } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListProviderOptionsExecute(ctx context.Context, region string) (*ProviderOptions, error) { r := ListProviderOptionsRequest{ apiService: a.defaultApi, @@ -1734,6 +1832,7 @@ func (a *APIClient) ListProviderOptionsExecute(ctx context.Context, region strin return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StartCredentialsRotationRequest struct { ctx context.Context apiService *DefaultApiService @@ -1742,6 +1841,7 @@ type StartCredentialsRotationRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r StartCredentialsRotationRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1877,7 +1977,7 @@ func (r StartCredentialsRotationRequest) Execute() (map[string]interface{}, erro /* StartCredentialsRotation: Start cluster credentials rotation -Start cluster credentials rotation. This is step 1 of a two-step process. Complete the rotation using [complete-credentials-rotation](#tag/Credentials/operation/SkeService_CompleteClusterCredentialsRotation). +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 @@ -1895,6 +1995,7 @@ func (a *APIClient) StartCredentialsRotation(ctx context.Context, projectId stri } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) StartCredentialsRotationExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := StartCredentialsRotationRequest{ apiService: a.defaultApi, @@ -1906,6 +2007,7 @@ func (a *APIClient) StartCredentialsRotationExecute(ctx context.Context, project return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TriggerHibernateRequest struct { ctx context.Context apiService *DefaultApiService @@ -1914,6 +2016,7 @@ type TriggerHibernateRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r TriggerHibernateRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodPost @@ -2049,7 +2152,7 @@ func (r TriggerHibernateRequest) Execute() (map[string]interface{}, error) { /* TriggerHibernate: Trigger cluster hibernation -Trigger immediate hibernation of the cluster. If the cluster is already in hibernation state, this endpoint does nothing. +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 @@ -2067,6 +2170,7 @@ func (a *APIClient) TriggerHibernate(ctx context.Context, projectId string, regi } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) TriggerHibernateExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := TriggerHibernateRequest{ apiService: a.defaultApi, @@ -2078,6 +2182,7 @@ func (a *APIClient) TriggerHibernateExecute(ctx context.Context, projectId strin return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TriggerMaintenanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -2086,6 +2191,7 @@ type TriggerMaintenanceRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r TriggerMaintenanceRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodPost @@ -2221,7 +2327,7 @@ func (r TriggerMaintenanceRequest) Execute() (map[string]interface{}, error) { /* TriggerMaintenance: Trigger cluster maintenance -Trigger immediate maintenance of the cluster. The autoUpdate configuration specified in the Maintenance object of the cluster spec defines what is updated during the immediate maintenance operation. +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 @@ -2239,6 +2345,7 @@ func (a *APIClient) TriggerMaintenance(ctx context.Context, projectId string, re } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) TriggerMaintenanceExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := TriggerMaintenanceRequest{ apiService: a.defaultApi, @@ -2250,6 +2357,7 @@ func (a *APIClient) TriggerMaintenanceExecute(ctx context.Context, projectId str return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TriggerReconcileRequest struct { ctx context.Context apiService *DefaultApiService @@ -2258,6 +2366,7 @@ type TriggerReconcileRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r TriggerReconcileRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodPost @@ -2393,7 +2502,7 @@ func (r TriggerReconcileRequest) Execute() (map[string]interface{}, error) { /* TriggerReconcile: Trigger cluster reconciliation -Trigger immediate reconciliation of the complete cluster without changing the cluster specification. +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 @@ -2411,6 +2520,7 @@ func (a *APIClient) TriggerReconcile(ctx context.Context, projectId string, regi } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) TriggerReconcileExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := TriggerReconcileRequest{ apiService: a.defaultApi, @@ -2422,6 +2532,7 @@ func (a *APIClient) TriggerReconcileExecute(ctx context.Context, projectId strin return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TriggerWakeupRequest struct { ctx context.Context apiService *DefaultApiService @@ -2430,6 +2541,7 @@ type TriggerWakeupRequest struct { clusterName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r TriggerWakeupRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodPost @@ -2565,7 +2677,7 @@ func (r TriggerWakeupRequest) Execute() (map[string]interface{}, error) { /* TriggerWakeup: Trigger cluster wakeup -Trigger immediate wake up of the cluster. If the cluster is already in running state, this endpoint does nothing. +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 @@ -2583,6 +2695,7 @@ func (a *APIClient) TriggerWakeup(ctx context.Context, projectId string, region } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) TriggerWakeupExecute(ctx context.Context, projectId string, region string, clusterName string) (map[string]interface{}, error) { r := TriggerWakeupRequest{ apiService: a.defaultApi, diff --git a/services/ske/client.go b/services/ske/client.go index 9573879ea..d5bf1433d 100644 --- a/services/ske/client.go +++ b/services/ske/client.go @@ -8,6 +8,7 @@ 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 ( @@ -44,18 +45,21 @@ var ( // APIClient manages communication with the STACKIT Kubernetes Engine API API v2.0 // In most cases there should be only one, shared, APIClient. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClient struct { cfg *config.Configuration common service // Reuse a single struct instead of allocating one for each service on the heap. defaultApi *DefaultApiService } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type service struct { client DefaultApi } // NewAPIClient creates a new API client. // Optionally receives configuration options +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { cfg := NewConfiguration() @@ -147,6 +151,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func ParameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) @@ -285,6 +290,7 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { // Allow modification of underlying config for alternate implementations and testing // Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (c *APIClient) GetConfig() *config.Configuration { return c.cfg } @@ -595,6 +601,7 @@ func parseCacheControl(headers http.Header) cacheControl { } // CacheExpires helper function to determine remaining time before repeating a request. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func CacheExpires(r *http.Response) time.Time { // Figure out when the cache expires. var expires time.Time diff --git a/services/ske/configuration.go b/services/ske/configuration.go index 47a0ab252..c8b76c54f 100644 --- a/services/ske/configuration.go +++ b/services/ske/configuration.go @@ -8,6 +8,7 @@ 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 ( @@ -15,6 +16,7 @@ import ( ) // NewConfiguration returns a new Configuration object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewConfiguration() *config.Configuration { cfg := &config.Configuration{ DefaultHeader: make(map[string]string), diff --git a/services/ske/go.mod b/services/ske/go.mod index 11d8a87ee..20644c357 100644 --- a/services/ske/go.mod +++ b/services/ske/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/google/go-cmp v0.7.0 - github.com/stackitcloud/stackit-sdk-go/core v0.21.1 + github.com/stackitcloud/stackit-sdk-go/core v0.22.0 ) require ( diff --git a/services/ske/go.sum b/services/ske/go.sum index ca103c909..195011dd5 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.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/services/ske/model_access_scope.go b/services/ske/model_access_scope.go index fd273e60a..c1e1344e8 100644 --- a/services/ske/model_access_scope.go +++ b/services/ske/model_access_scope.go @@ -8,6 +8,7 @@ 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 ( @@ -16,20 +17,25 @@ import ( ) // 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. ⚠️ 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 // List of AccessScope const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead ACCESSSCOPE_PUBLIC AccessScope = "PUBLIC" - ACCESSSCOPE_SNA AccessScope = "SNA" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + ACCESSSCOPE_SNA AccessScope = "SNA" ) // All allowed values of AccessScope enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedAccessScopeEnumValues = []AccessScope{ "PUBLIC", "SNA", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *AccessScope) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) @@ -54,6 +60,7 @@ func (v *AccessScope) UnmarshalJSON(src []byte) error { // NewAccessScopeFromValue returns a pointer to a valid AccessScope // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAccessScopeFromValue(v string) (*AccessScope, error) { ev := AccessScope(v) if ev.IsValid() { @@ -64,6 +71,7 @@ func NewAccessScopeFromValue(v string) (*AccessScope, error) { } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v AccessScope) IsValid() bool { for _, existing := range AllowedAccessScopeEnumValues { if existing == v { @@ -74,41 +82,50 @@ func (v AccessScope) IsValid() bool { } // Ptr returns reference to AccessScope value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v AccessScope) Ptr() *AccessScope { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableAccessScope struct { value *AccessScope isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessScope) Get() *AccessScope { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessScope) Set(val *AccessScope) { 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 NullableAccessScope) 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 *NullableAccessScope) 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 NewNullableAccessScope(val *AccessScope) *NullableAccessScope { return &NullableAccessScope{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 NullableAccessScope) 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 *NullableAccessScope) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_acl.go b/services/ske/model_acl.go index 761304f87..7cc556437 100644 --- a/services/ske/model_acl.go +++ b/services/ske/model_acl.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ACL{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetAllowedCidrsAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetAllowedCidrsArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetAllowedCidrsRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getACLGetAllowedCidrsAttributeTypeOk(arg ACLGetAllowedCidrsAttributeType) (ret ACLGetAllowedCidrsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getACLGetAllowedCidrsAttributeTypeOk(arg ACLGetAllowedCidrsAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setACLGetAllowedCidrsAttributeType(arg *ACLGetAllowedCidrsAttributeType, val ACLGetAllowedCidrsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setACLGetAllowedCidrsAttributeType(arg *ACLGetAllowedCidrsAttributeType, va */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLgetEnabledAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLgetEnabledArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLgetEnabledRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getACLgetEnabledAttributeTypeOk(arg ACLgetEnabledAttributeType) (ret ACLgetEnabledRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getACLgetEnabledAttributeTypeOk(arg ACLgetEnabledAttributeType) (ret ACLget return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setACLgetEnabledAttributeType(arg *ACLgetEnabledAttributeType, val ACLgetEnabledRetType) { *arg = &val } // ACL struct for ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACL struct { // Array of CIDRs to allow access to the kubernetes API. // REQUIRED @@ -67,12 +83,14 @@ type ACL struct { Enabled ACLgetEnabledAttributeType `json:"enabled" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ACL ACL // NewACL instantiates a new ACL 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 NewACL(allowedCidrs ACLGetAllowedCidrsArgType, enabled ACLgetEnabledArgType) *ACL { this := ACL{} setACLGetAllowedCidrsAttributeType(&this.AllowedCidrs, allowedCidrs) @@ -83,12 +101,14 @@ func NewACL(allowedCidrs ACLGetAllowedCidrsArgType, enabled ACLgetEnabledArgType // NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { this := ACL{} return &this } // GetAllowedCidrs returns the AllowedCidrs field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetAllowedCidrs() (ret ACLGetAllowedCidrsRetType) { ret, _ = o.GetAllowedCidrsOk() return ret @@ -96,16 +116,19 @@ func (o *ACL) GetAllowedCidrs() (ret ACLGetAllowedCidrsRetType) { // GetAllowedCidrsOk returns a tuple with the AllowedCidrs field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetAllowedCidrsOk() (ret ACLGetAllowedCidrsRetType, ok bool) { return getACLGetAllowedCidrsAttributeTypeOk(o.AllowedCidrs) } // SetAllowedCidrs sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) SetAllowedCidrs(v ACLGetAllowedCidrsRetType) { setACLGetAllowedCidrsAttributeType(&o.AllowedCidrs, v) } // GetEnabled returns the Enabled field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetEnabled() (ret ACLgetEnabledRetType) { ret, _ = o.GetEnabledOk() return ret @@ -113,15 +136,18 @@ func (o *ACL) GetEnabled() (ret ACLgetEnabledRetType) { // GetEnabledOk returns a tuple with the Enabled field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetEnabledOk() (ret ACLgetEnabledRetType, ok bool) { return getACLgetEnabledAttributeTypeOk(o.Enabled) } // SetEnabled sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) SetEnabled(v ACLgetEnabledRetType) { setACLgetEnabledAttributeType(&o.Enabled, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ACL) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getACLGetAllowedCidrsAttributeTypeOk(o.AllowedCidrs); ok { @@ -133,37 +159,45 @@ func (o ACL) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableACL struct { value *ACL isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableACL) Get() *ACL { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableACL) Set(val *ACL) { 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 NullableACL) 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 *NullableACL) 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 NewNullableACL(val *ACL) *NullableACL { return &NullableACL{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 NullableACL) 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 *NullableACL) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_availability_zone.go b/services/ske/model_availability_zone.go index c04257353..5a4295064 100644 --- a/services/ske/model_availability_zone.go +++ b/services/ske/model_availability_zone.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &AvailabilityZone{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AvailabilityZoneGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAvailabilityZoneGetNameAttributeTypeOk(arg AvailabilityZoneGetNameAttributeType) (ret AvailabilityZoneGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getAvailabilityZoneGetNameAttributeTypeOk(arg AvailabilityZoneGetNameAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAvailabilityZoneGetNameAttributeType(arg *AvailabilityZoneGetNameAttributeType, val AvailabilityZoneGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AvailabilityZoneGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AvailabilityZoneGetNameRetType = string // AvailabilityZone struct for AvailabilityZone +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AvailabilityZone struct { Name AvailabilityZoneGetNameAttributeType `json:"name,omitempty"` } @@ -47,6 +55,7 @@ type AvailabilityZone struct { // 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 NewAvailabilityZone() *AvailabilityZone { this := AvailabilityZone{} return &this @@ -55,12 +64,14 @@ func NewAvailabilityZone() *AvailabilityZone { // NewAvailabilityZoneWithDefaults instantiates a new AvailabilityZone 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 NewAvailabilityZoneWithDefaults() *AvailabilityZone { this := AvailabilityZone{} return &this } // GetName returns the Name 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 *AvailabilityZone) GetName() (res AvailabilityZoneGetNameRetType) { res, _ = o.GetNameOk() return @@ -68,21 +79,25 @@ func (o *AvailabilityZone) GetName() (res AvailabilityZoneGetNameRetType) { // GetNameOk returns a tuple with the Name 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 *AvailabilityZone) GetNameOk() (ret AvailabilityZoneGetNameRetType, ok bool) { return getAvailabilityZoneGetNameAttributeTypeOk(o.Name) } // HasName 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 *AvailabilityZone) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AvailabilityZone) SetName(v AvailabilityZoneGetNameRetType) { setAvailabilityZoneGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o AvailabilityZone) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getAvailabilityZoneGetNameAttributeTypeOk(o.Name); ok { @@ -91,37 +106,45 @@ func (o AvailabilityZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableAvailabilityZone struct { value *AvailabilityZone isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAvailabilityZone) Get() *AvailabilityZone { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAvailabilityZone) Set(val *AvailabilityZone) { 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 NullableAvailabilityZone) 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 *NullableAvailabilityZone) 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 NewNullableAvailabilityZone(val *AvailabilityZone) *NullableAvailabilityZone { return &NullableAvailabilityZone{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 NullableAvailabilityZone) 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 *NullableAvailabilityZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_cluster.go b/services/ske/model_cluster.go index 86032b76d..2000d66cb 100644 --- a/services/ske/model_cluster.go +++ b/services/ske/model_cluster.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Cluster{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetExtensionsAttributeType = *Extension + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetExtensionsArgType = Extension + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetExtensionsRetType = Extension +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetExtensionsAttributeTypeOk(arg ClusterGetExtensionsAttributeType) (ret ClusterGetExtensionsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getClusterGetExtensionsAttributeTypeOk(arg ClusterGetExtensionsAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetExtensionsAttributeType(arg *ClusterGetExtensionsAttributeType, val ClusterGetExtensionsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setClusterGetExtensionsAttributeType(arg *ClusterGetExtensionsAttributeType */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetHibernationAttributeType = *Hibernation + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetHibernationArgType = Hibernation + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetHibernationRetType = Hibernation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetHibernationAttributeTypeOk(arg ClusterGetHibernationAttributeType) (ret ClusterGetHibernationRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getClusterGetHibernationAttributeTypeOk(arg ClusterGetHibernationAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetHibernationAttributeType(arg *ClusterGetHibernationAttributeType, val ClusterGetHibernationRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setClusterGetHibernationAttributeType(arg *ClusterGetHibernationAttributeTy */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetKubernetesAttributeType = *Kubernetes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetKubernetesArgType = Kubernetes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetKubernetesRetType = Kubernetes +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetKubernetesAttributeTypeOk(arg ClusterGetKubernetesAttributeType) (ret ClusterGetKubernetesRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getClusterGetKubernetesAttributeTypeOk(arg ClusterGetKubernetesAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetKubernetesAttributeType(arg *ClusterGetKubernetesAttributeType, val ClusterGetKubernetesRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setClusterGetKubernetesAttributeType(arg *ClusterGetKubernetesAttributeType */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetMaintenanceAttributeType = *Maintenance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetMaintenanceArgType = Maintenance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetMaintenanceRetType = Maintenance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetMaintenanceAttributeTypeOk(arg ClusterGetMaintenanceAttributeType) (ret ClusterGetMaintenanceRetType, ok bool) { if arg == nil { return ret, false @@ -93,6 +121,7 @@ func getClusterGetMaintenanceAttributeTypeOk(arg ClusterGetMaintenanceAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetMaintenanceAttributeType(arg *ClusterGetMaintenanceAttributeType, val ClusterGetMaintenanceRetType) { *arg = &val } @@ -102,8 +131,10 @@ func setClusterGetMaintenanceAttributeType(arg *ClusterGetMaintenanceAttributeTy */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetNameAttributeTypeOk(arg ClusterGetNameAttributeType) (ret ClusterGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -111,11 +142,15 @@ func getClusterGetNameAttributeTypeOk(arg ClusterGetNameAttributeType) (ret Clus return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetNameAttributeType(arg *ClusterGetNameAttributeType, val ClusterGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNameRetType = string /* @@ -123,10 +158,16 @@ type ClusterGetNameRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNetworkAttributeType = *Network + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNetworkArgType = Network + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNetworkRetType = Network +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetNetworkAttributeTypeOk(arg ClusterGetNetworkAttributeType) (ret ClusterGetNetworkRetType, ok bool) { if arg == nil { return ret, false @@ -134,6 +175,7 @@ func getClusterGetNetworkAttributeTypeOk(arg ClusterGetNetworkAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetNetworkAttributeType(arg *ClusterGetNetworkAttributeType, val ClusterGetNetworkRetType) { *arg = &val } @@ -143,10 +185,16 @@ func setClusterGetNetworkAttributeType(arg *ClusterGetNetworkAttributeType, val */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNodepoolsAttributeType = *[]Nodepool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNodepoolsArgType = []Nodepool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetNodepoolsRetType = []Nodepool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetNodepoolsAttributeTypeOk(arg ClusterGetNodepoolsAttributeType) (ret ClusterGetNodepoolsRetType, ok bool) { if arg == nil { return ret, false @@ -154,6 +202,7 @@ func getClusterGetNodepoolsAttributeTypeOk(arg ClusterGetNodepoolsAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetNodepoolsAttributeType(arg *ClusterGetNodepoolsAttributeType, val ClusterGetNodepoolsRetType) { *arg = &val } @@ -163,10 +212,16 @@ func setClusterGetNodepoolsAttributeType(arg *ClusterGetNodepoolsAttributeType, */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetStatusAttributeType = *ClusterStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetStatusArgType = ClusterStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterGetStatusRetType = ClusterStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterGetStatusAttributeTypeOk(arg ClusterGetStatusAttributeType) (ret ClusterGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -174,11 +229,13 @@ func getClusterGetStatusAttributeTypeOk(arg ClusterGetStatusAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterGetStatusAttributeType(arg *ClusterGetStatusAttributeType, val ClusterGetStatusRetType) { *arg = &val } // 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 { Extensions ClusterGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation ClusterGetHibernationAttributeType `json:"hibernation,omitempty"` @@ -192,12 +249,14 @@ type Cluster struct { Status ClusterGetStatusAttributeType `json:"status,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Cluster Cluster // NewCluster instantiates a new Cluster 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 NewCluster(kubernetes ClusterGetKubernetesArgType, nodepools ClusterGetNodepoolsArgType) *Cluster { this := Cluster{} setClusterGetKubernetesAttributeType(&this.Kubernetes, kubernetes) @@ -208,12 +267,14 @@ func NewCluster(kubernetes ClusterGetKubernetesArgType, nodepools ClusterGetNode // NewClusterWithDefaults instantiates a new Cluster 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 NewClusterWithDefaults() *Cluster { this := Cluster{} return &this } // 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) { res, _ = o.GetExtensionsOk() return @@ -221,22 +282,26 @@ func (o *Cluster) GetExtensions() (res ClusterGetExtensionsRetType) { // GetExtensionsOk returns a tuple with the Extensions 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) GetExtensionsOk() (ret ClusterGetExtensionsRetType, ok bool) { return getClusterGetExtensionsAttributeTypeOk(o.Extensions) } // HasExtensions 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) HasExtensions() bool { _, ok := o.GetExtensionsOk() return ok } // SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetExtensions(v ClusterGetExtensionsRetType) { setClusterGetExtensionsAttributeType(&o.Extensions, v) } // GetHibernation returns the Hibernation 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) GetHibernation() (res ClusterGetHibernationRetType) { res, _ = o.GetHibernationOk() return @@ -244,22 +309,26 @@ func (o *Cluster) GetHibernation() (res ClusterGetHibernationRetType) { // GetHibernationOk returns a tuple with the Hibernation 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) GetHibernationOk() (ret ClusterGetHibernationRetType, ok bool) { return getClusterGetHibernationAttributeTypeOk(o.Hibernation) } // HasHibernation 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) HasHibernation() bool { _, ok := o.GetHibernationOk() return ok } // SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetHibernation(v ClusterGetHibernationRetType) { setClusterGetHibernationAttributeType(&o.Hibernation, v) } // GetKubernetes returns the Kubernetes field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) GetKubernetes() (ret ClusterGetKubernetesRetType) { ret, _ = o.GetKubernetesOk() return ret @@ -267,16 +336,19 @@ func (o *Cluster) GetKubernetes() (ret ClusterGetKubernetesRetType) { // GetKubernetesOk returns a tuple with the Kubernetes field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) GetKubernetesOk() (ret ClusterGetKubernetesRetType, ok bool) { return getClusterGetKubernetesAttributeTypeOk(o.Kubernetes) } // SetKubernetes sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetKubernetes(v ClusterGetKubernetesRetType) { setClusterGetKubernetesAttributeType(&o.Kubernetes, v) } // GetMaintenance returns the Maintenance 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) GetMaintenance() (res ClusterGetMaintenanceRetType) { res, _ = o.GetMaintenanceOk() return @@ -284,22 +356,26 @@ func (o *Cluster) GetMaintenance() (res ClusterGetMaintenanceRetType) { // GetMaintenanceOk returns a tuple with the Maintenance 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) GetMaintenanceOk() (ret ClusterGetMaintenanceRetType, ok bool) { return getClusterGetMaintenanceAttributeTypeOk(o.Maintenance) } // HasMaintenance 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) HasMaintenance() bool { _, ok := o.GetMaintenanceOk() return ok } // SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetMaintenance(v ClusterGetMaintenanceRetType) { setClusterGetMaintenanceAttributeType(&o.Maintenance, v) } // GetName returns the Name 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) GetName() (res ClusterGetNameRetType) { res, _ = o.GetNameOk() return @@ -307,22 +383,26 @@ func (o *Cluster) GetName() (res ClusterGetNameRetType) { // GetNameOk returns a tuple with the Name 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) GetNameOk() (ret ClusterGetNameRetType, ok bool) { return getClusterGetNameAttributeTypeOk(o.Name) } // HasName 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) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetName(v ClusterGetNameRetType) { setClusterGetNameAttributeType(&o.Name, v) } // GetNetwork returns the Network 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) GetNetwork() (res ClusterGetNetworkRetType) { res, _ = o.GetNetworkOk() return @@ -330,22 +410,26 @@ func (o *Cluster) GetNetwork() (res ClusterGetNetworkRetType) { // GetNetworkOk returns a tuple with the Network 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) GetNetworkOk() (ret ClusterGetNetworkRetType, ok bool) { return getClusterGetNetworkAttributeTypeOk(o.Network) } // HasNetwork 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) HasNetwork() bool { _, ok := o.GetNetworkOk() return ok } // SetNetwork gets a reference to the given Network and assigns it to the Network field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetNetwork(v ClusterGetNetworkRetType) { setClusterGetNetworkAttributeType(&o.Network, v) } // GetNodepools returns the Nodepools field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) GetNodepools() (ret ClusterGetNodepoolsRetType) { ret, _ = o.GetNodepoolsOk() return ret @@ -353,16 +437,19 @@ func (o *Cluster) GetNodepools() (ret ClusterGetNodepoolsRetType) { // GetNodepoolsOk returns a tuple with the Nodepools field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) GetNodepoolsOk() (ret ClusterGetNodepoolsRetType, ok bool) { return getClusterGetNodepoolsAttributeTypeOk(o.Nodepools) } // SetNodepools sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetNodepools(v ClusterGetNodepoolsRetType) { setClusterGetNodepoolsAttributeType(&o.Nodepools, v) } // GetStatus returns the Status 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) GetStatus() (res ClusterGetStatusRetType) { res, _ = o.GetStatusOk() return @@ -370,21 +457,25 @@ func (o *Cluster) GetStatus() (res ClusterGetStatusRetType) { // GetStatusOk returns a tuple with the Status 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) GetStatusOk() (ret ClusterGetStatusRetType, ok bool) { return getClusterGetStatusAttributeTypeOk(o.Status) } // HasStatus 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) HasStatus() bool { _, ok := o.GetStatusOk() return ok } // SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Cluster) SetStatus(v ClusterGetStatusRetType) { setClusterGetStatusAttributeType(&o.Status, v) } +// 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 := getClusterGetExtensionsAttributeTypeOk(o.Extensions); ok { @@ -414,37 +505,45 @@ func (o Cluster) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCluster struct { value *Cluster isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCluster) Get() *Cluster { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCluster) Set(val *Cluster) { 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 NullableCluster) 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 *NullableCluster) 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 NewNullableCluster(val *Cluster) *NullableCluster { return &NullableCluster{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 NullableCluster) 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 *NullableCluster) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_cluster_error.go b/services/ske/model_cluster_error.go index 5c1126bea..88ac76360 100644 --- a/services/ske/model_cluster_error.go +++ b/services/ske/model_cluster_error.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ClusterError{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterErrorGetCodeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterErrorGetCodeAttributeTypeOk(arg ClusterErrorGetCodeAttributeType) (ret ClusterErrorGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getClusterErrorGetCodeAttributeTypeOk(arg ClusterErrorGetCodeAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterErrorGetCodeAttributeType(arg *ClusterErrorGetCodeAttributeType, val ClusterErrorGetCodeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterErrorGetCodeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterErrorGetCodeRetType = string /* @@ -43,8 +50,10 @@ type ClusterErrorGetCodeRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterErrorGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterErrorGetMessageAttributeTypeOk(arg ClusterErrorGetMessageAttributeType) (ret ClusterErrorGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getClusterErrorGetMessageAttributeTypeOk(arg ClusterErrorGetMessageAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterErrorGetMessageAttributeType(arg *ClusterErrorGetMessageAttributeType, val ClusterErrorGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterErrorGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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\"` Code ClusterErrorGetCodeAttributeType `json:"code,omitempty"` @@ -70,6 +84,7 @@ type ClusterError struct { // 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 NewClusterError() *ClusterError { this := ClusterError{} return &this @@ -78,12 +93,14 @@ func NewClusterError() *ClusterError { // NewClusterErrorWithDefaults instantiates a new ClusterError 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 NewClusterErrorWithDefaults() *ClusterError { this := ClusterError{} return &this } // GetCode returns the Code 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 *ClusterError) GetCode() (res ClusterErrorGetCodeRetType) { res, _ = o.GetCodeOk() return @@ -91,22 +108,26 @@ func (o *ClusterError) GetCode() (res ClusterErrorGetCodeRetType) { // GetCodeOk returns a tuple with the Code 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 *ClusterError) GetCodeOk() (ret ClusterErrorGetCodeRetType, ok bool) { return getClusterErrorGetCodeAttributeTypeOk(o.Code) } // HasCode 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 *ClusterError) HasCode() bool { _, ok := o.GetCodeOk() return ok } // SetCode gets a reference to the given string and assigns it to the Code field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterError) SetCode(v ClusterErrorGetCodeRetType) { setClusterErrorGetCodeAttributeType(&o.Code, v) } // GetMessage returns the Message 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 *ClusterError) GetMessage() (res ClusterErrorGetMessageRetType) { res, _ = o.GetMessageOk() return @@ -114,21 +135,25 @@ func (o *ClusterError) GetMessage() (res ClusterErrorGetMessageRetType) { // GetMessageOk returns a tuple with the Message 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 *ClusterError) GetMessageOk() (ret ClusterErrorGetMessageRetType, ok bool) { return getClusterErrorGetMessageAttributeTypeOk(o.Message) } // HasMessage 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 *ClusterError) HasMessage() bool { _, ok := o.GetMessageOk() return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterError) SetMessage(v ClusterErrorGetMessageRetType) { setClusterErrorGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ClusterError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getClusterErrorGetCodeAttributeTypeOk(o.Code); ok { @@ -140,37 +165,45 @@ func (o ClusterError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableClusterError struct { value *ClusterError isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableClusterError) Get() *ClusterError { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableClusterError) Set(val *ClusterError) { 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 NullableClusterError) 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 *NullableClusterError) 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 NewNullableClusterError(val *ClusterError) *NullableClusterError { return &NullableClusterError{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 NullableClusterError) 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 *NullableClusterError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_cluster_status.go b/services/ske/model_cluster_status.go index 4311902e8..136dbecec 100644 --- a/services/ske/model_cluster_status.go +++ b/services/ske/model_cluster_status.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &ClusterStatus{} */ // isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetAggregatedAttributeType = *ClusterStatusState + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetAggregatedArgType = ClusterStatusState + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetAggregatedRetType = ClusterStatusState +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetAggregatedAttributeTypeOk(arg ClusterStatusGetAggregatedAttributeType) (ret ClusterStatusGetAggregatedRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getClusterStatusGetAggregatedAttributeTypeOk(arg ClusterStatusGetAggregated return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetAggregatedAttributeType(arg *ClusterStatusGetAggregatedAttributeType, val ClusterStatusGetAggregatedRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setClusterStatusGetAggregatedAttributeType(arg *ClusterStatusGetAggregatedA */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetCreationTimeAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetCreationTimeArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetCreationTimeRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetCreationTimeAttributeTypeOk(arg ClusterStatusGetCreationTimeAttributeType) (ret ClusterStatusGetCreationTimeRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +68,7 @@ func getClusterStatusGetCreationTimeAttributeTypeOk(arg ClusterStatusGetCreation return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetCreationTimeAttributeType(arg *ClusterStatusGetCreationTimeAttributeType, val ClusterStatusGetCreationTimeRetType) { *arg = &val } @@ -63,10 +78,16 @@ func setClusterStatusGetCreationTimeAttributeType(arg *ClusterStatusGetCreationT */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetCredentialsRotationAttributeType = *CredentialsRotationState + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetCredentialsRotationArgType = CredentialsRotationState + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetCredentialsRotationRetType = CredentialsRotationState +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetCredentialsRotationAttributeTypeOk(arg ClusterStatusGetCredentialsRotationAttributeType) (ret ClusterStatusGetCredentialsRotationRetType, ok bool) { if arg == nil { return ret, false @@ -74,6 +95,7 @@ func getClusterStatusGetCredentialsRotationAttributeTypeOk(arg ClusterStatusGetC return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetCredentialsRotationAttributeType(arg *ClusterStatusGetCredentialsRotationAttributeType, val ClusterStatusGetCredentialsRotationRetType) { *arg = &val } @@ -83,10 +105,16 @@ func setClusterStatusGetCredentialsRotationAttributeType(arg *ClusterStatusGetCr */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetEgressAddressRangesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetEgressAddressRangesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetEgressAddressRangesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetEgressAddressRangesAttributeTypeOk(arg ClusterStatusGetEgressAddressRangesAttributeType) (ret ClusterStatusGetEgressAddressRangesRetType, ok bool) { if arg == nil { return ret, false @@ -94,6 +122,7 @@ func getClusterStatusGetEgressAddressRangesAttributeTypeOk(arg ClusterStatusGetE return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetEgressAddressRangesAttributeType(arg *ClusterStatusGetEgressAddressRangesAttributeType, val ClusterStatusGetEgressAddressRangesRetType) { *arg = &val } @@ -103,10 +132,16 @@ func setClusterStatusGetEgressAddressRangesAttributeType(arg *ClusterStatusGetEg */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetErrorAttributeType = *RuntimeError + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetErrorArgType = RuntimeError + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetErrorRetType = RuntimeError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetErrorAttributeTypeOk(arg ClusterStatusGetErrorAttributeType) (ret ClusterStatusGetErrorRetType, ok bool) { if arg == nil { return ret, false @@ -114,6 +149,7 @@ func getClusterStatusGetErrorAttributeTypeOk(arg ClusterStatusGetErrorAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetErrorAttributeType(arg *ClusterStatusGetErrorAttributeType, val ClusterStatusGetErrorRetType) { *arg = &val } @@ -123,10 +159,16 @@ func setClusterStatusGetErrorAttributeType(arg *ClusterStatusGetErrorAttributeTy */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetErrorsAttributeType = *[]ClusterError + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetErrorsArgType = []ClusterError + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetErrorsRetType = []ClusterError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetErrorsAttributeTypeOk(arg ClusterStatusGetErrorsAttributeType) (ret ClusterStatusGetErrorsRetType, ok bool) { if arg == nil { return ret, false @@ -134,6 +176,7 @@ func getClusterStatusGetErrorsAttributeTypeOk(arg ClusterStatusGetErrorsAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetErrorsAttributeType(arg *ClusterStatusGetErrorsAttributeType, val ClusterStatusGetErrorsRetType) { *arg = &val } @@ -143,10 +186,16 @@ func setClusterStatusGetErrorsAttributeType(arg *ClusterStatusGetErrorsAttribute */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusgetHibernatedAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusgetHibernatedArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusgetHibernatedRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusgetHibernatedAttributeTypeOk(arg ClusterStatusgetHibernatedAttributeType) (ret ClusterStatusgetHibernatedRetType, ok bool) { if arg == nil { return ret, false @@ -154,6 +203,7 @@ func getClusterStatusgetHibernatedAttributeTypeOk(arg ClusterStatusgetHibernated return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusgetHibernatedAttributeType(arg *ClusterStatusgetHibernatedAttributeType, val ClusterStatusgetHibernatedRetType) { *arg = &val } @@ -163,8 +213,10 @@ func setClusterStatusgetHibernatedAttributeType(arg *ClusterStatusgetHibernatedA */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetIdentityAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetIdentityAttributeTypeOk(arg ClusterStatusGetIdentityAttributeType) (ret ClusterStatusGetIdentityRetType, ok bool) { if arg == nil { return ret, false @@ -172,11 +224,15 @@ func getClusterStatusGetIdentityAttributeTypeOk(arg ClusterStatusGetIdentityAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetIdentityAttributeType(arg *ClusterStatusGetIdentityAttributeType, val ClusterStatusGetIdentityRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetIdentityArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetIdentityRetType = string /* @@ -184,10 +240,16 @@ type ClusterStatusGetIdentityRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetPodAddressRangesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetPodAddressRangesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusGetPodAddressRangesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getClusterStatusGetPodAddressRangesAttributeTypeOk(arg ClusterStatusGetPodAddressRangesAttributeType) (ret ClusterStatusGetPodAddressRangesRetType, ok bool) { if arg == nil { return ret, false @@ -195,11 +257,13 @@ func getClusterStatusGetPodAddressRangesAttributeTypeOk(arg ClusterStatusGetPodA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setClusterStatusGetPodAddressRangesAttributeType(arg *ClusterStatusGetPodAddressRangesAttributeType, val ClusterStatusGetPodAddressRangesRetType) { *arg = &val } // ClusterStatus struct for ClusterStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatus struct { Aggregated ClusterStatusGetAggregatedAttributeType `json:"aggregated,omitempty"` // Format: `2024-02-15T11:06:29Z` @@ -219,6 +283,7 @@ type ClusterStatus struct { // 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 NewClusterStatus() *ClusterStatus { this := ClusterStatus{} return &this @@ -227,12 +292,14 @@ func NewClusterStatus() *ClusterStatus { // NewClusterStatusWithDefaults instantiates a new ClusterStatus 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 NewClusterStatusWithDefaults() *ClusterStatus { this := ClusterStatus{} return &this } // GetAggregated returns the Aggregated 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 *ClusterStatus) GetAggregated() (res ClusterStatusGetAggregatedRetType) { res, _ = o.GetAggregatedOk() return @@ -240,22 +307,26 @@ func (o *ClusterStatus) GetAggregated() (res ClusterStatusGetAggregatedRetType) // GetAggregatedOk returns a tuple with the Aggregated 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 *ClusterStatus) GetAggregatedOk() (ret ClusterStatusGetAggregatedRetType, ok bool) { return getClusterStatusGetAggregatedAttributeTypeOk(o.Aggregated) } // HasAggregated 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 *ClusterStatus) HasAggregated() bool { _, ok := o.GetAggregatedOk() return ok } // SetAggregated gets a reference to the given ClusterStatusState and assigns it to the Aggregated field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetAggregated(v ClusterStatusGetAggregatedRetType) { setClusterStatusGetAggregatedAttributeType(&o.Aggregated, v) } // GetCreationTime returns the CreationTime 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 *ClusterStatus) GetCreationTime() (res ClusterStatusGetCreationTimeRetType) { res, _ = o.GetCreationTimeOk() return @@ -263,22 +334,26 @@ func (o *ClusterStatus) GetCreationTime() (res ClusterStatusGetCreationTimeRetTy // GetCreationTimeOk returns a tuple with the CreationTime 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 *ClusterStatus) GetCreationTimeOk() (ret ClusterStatusGetCreationTimeRetType, ok bool) { return getClusterStatusGetCreationTimeAttributeTypeOk(o.CreationTime) } // HasCreationTime 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 *ClusterStatus) HasCreationTime() bool { _, ok := o.GetCreationTimeOk() return ok } // SetCreationTime gets a reference to the given time.Time and assigns it to the CreationTime field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetCreationTime(v ClusterStatusGetCreationTimeRetType) { setClusterStatusGetCreationTimeAttributeType(&o.CreationTime, v) } // GetCredentialsRotation returns the CredentialsRotation 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 *ClusterStatus) GetCredentialsRotation() (res ClusterStatusGetCredentialsRotationRetType) { res, _ = o.GetCredentialsRotationOk() return @@ -286,22 +361,26 @@ func (o *ClusterStatus) GetCredentialsRotation() (res ClusterStatusGetCredential // GetCredentialsRotationOk returns a tuple with the CredentialsRotation 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 *ClusterStatus) GetCredentialsRotationOk() (ret ClusterStatusGetCredentialsRotationRetType, ok bool) { return getClusterStatusGetCredentialsRotationAttributeTypeOk(o.CredentialsRotation) } // HasCredentialsRotation 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 *ClusterStatus) HasCredentialsRotation() bool { _, ok := o.GetCredentialsRotationOk() return ok } // SetCredentialsRotation gets a reference to the given CredentialsRotationState and assigns it to the CredentialsRotation field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetCredentialsRotation(v ClusterStatusGetCredentialsRotationRetType) { setClusterStatusGetCredentialsRotationAttributeType(&o.CredentialsRotation, v) } // GetEgressAddressRanges returns the EgressAddressRanges 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 *ClusterStatus) GetEgressAddressRanges() (res ClusterStatusGetEgressAddressRangesRetType) { res, _ = o.GetEgressAddressRangesOk() return @@ -309,22 +388,26 @@ func (o *ClusterStatus) GetEgressAddressRanges() (res ClusterStatusGetEgressAddr // GetEgressAddressRangesOk returns a tuple with the EgressAddressRanges 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 *ClusterStatus) GetEgressAddressRangesOk() (ret ClusterStatusGetEgressAddressRangesRetType, ok bool) { return getClusterStatusGetEgressAddressRangesAttributeTypeOk(o.EgressAddressRanges) } // HasEgressAddressRanges 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 *ClusterStatus) HasEgressAddressRanges() bool { _, ok := o.GetEgressAddressRangesOk() return ok } // SetEgressAddressRanges gets a reference to the given []string and assigns it to the EgressAddressRanges field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetEgressAddressRanges(v ClusterStatusGetEgressAddressRangesRetType) { setClusterStatusGetEgressAddressRangesAttributeType(&o.EgressAddressRanges, v) } // GetError returns the Error 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 *ClusterStatus) GetError() (res ClusterStatusGetErrorRetType) { res, _ = o.GetErrorOk() return @@ -332,22 +415,26 @@ func (o *ClusterStatus) GetError() (res ClusterStatusGetErrorRetType) { // GetErrorOk returns a tuple with the Error 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 *ClusterStatus) GetErrorOk() (ret ClusterStatusGetErrorRetType, ok bool) { return getClusterStatusGetErrorAttributeTypeOk(o.Error) } // HasError 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 *ClusterStatus) HasError() bool { _, ok := o.GetErrorOk() return ok } // SetError gets a reference to the given RuntimeError and assigns it to the Error field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetError(v ClusterStatusGetErrorRetType) { setClusterStatusGetErrorAttributeType(&o.Error, v) } // GetErrors returns the Errors 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 *ClusterStatus) GetErrors() (res ClusterStatusGetErrorsRetType) { res, _ = o.GetErrorsOk() return @@ -355,22 +442,26 @@ func (o *ClusterStatus) GetErrors() (res ClusterStatusGetErrorsRetType) { // GetErrorsOk returns a tuple with the Errors 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 *ClusterStatus) GetErrorsOk() (ret ClusterStatusGetErrorsRetType, ok bool) { return getClusterStatusGetErrorsAttributeTypeOk(o.Errors) } // HasErrors 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 *ClusterStatus) HasErrors() bool { _, ok := o.GetErrorsOk() return ok } // SetErrors gets a reference to the given []ClusterError and assigns it to the Errors field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetErrors(v ClusterStatusGetErrorsRetType) { setClusterStatusGetErrorsAttributeType(&o.Errors, v) } // GetHibernated returns the Hibernated 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 *ClusterStatus) GetHibernated() (res ClusterStatusgetHibernatedRetType) { res, _ = o.GetHibernatedOk() return @@ -378,22 +469,26 @@ func (o *ClusterStatus) GetHibernated() (res ClusterStatusgetHibernatedRetType) // GetHibernatedOk returns a tuple with the Hibernated 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 *ClusterStatus) GetHibernatedOk() (ret ClusterStatusgetHibernatedRetType, ok bool) { return getClusterStatusgetHibernatedAttributeTypeOk(o.Hibernated) } // HasHibernated 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 *ClusterStatus) HasHibernated() bool { _, ok := o.GetHibernatedOk() return ok } // SetHibernated gets a reference to the given bool and assigns it to the Hibernated field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetHibernated(v ClusterStatusgetHibernatedRetType) { setClusterStatusgetHibernatedAttributeType(&o.Hibernated, v) } // GetIdentity returns the Identity 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 *ClusterStatus) GetIdentity() (res ClusterStatusGetIdentityRetType) { res, _ = o.GetIdentityOk() return @@ -401,22 +496,26 @@ func (o *ClusterStatus) GetIdentity() (res ClusterStatusGetIdentityRetType) { // GetIdentityOk returns a tuple with the Identity 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 *ClusterStatus) GetIdentityOk() (ret ClusterStatusGetIdentityRetType, ok bool) { return getClusterStatusGetIdentityAttributeTypeOk(o.Identity) } // HasIdentity 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 *ClusterStatus) HasIdentity() bool { _, ok := o.GetIdentityOk() return ok } // SetIdentity gets a reference to the given string and assigns it to the Identity field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetIdentity(v ClusterStatusGetIdentityRetType) { setClusterStatusGetIdentityAttributeType(&o.Identity, v) } // GetPodAddressRanges returns the PodAddressRanges 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 *ClusterStatus) GetPodAddressRanges() (res ClusterStatusGetPodAddressRangesRetType) { res, _ = o.GetPodAddressRangesOk() return @@ -424,21 +523,25 @@ func (o *ClusterStatus) GetPodAddressRanges() (res ClusterStatusGetPodAddressRan // GetPodAddressRangesOk returns a tuple with the PodAddressRanges 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 *ClusterStatus) GetPodAddressRangesOk() (ret ClusterStatusGetPodAddressRangesRetType, ok bool) { return getClusterStatusGetPodAddressRangesAttributeTypeOk(o.PodAddressRanges) } // HasPodAddressRanges 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 *ClusterStatus) HasPodAddressRanges() bool { _, ok := o.GetPodAddressRangesOk() return ok } // SetPodAddressRanges gets a reference to the given []string and assigns it to the PodAddressRanges field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ClusterStatus) SetPodAddressRanges(v ClusterStatusGetPodAddressRangesRetType) { setClusterStatusGetPodAddressRangesAttributeType(&o.PodAddressRanges, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ClusterStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getClusterStatusGetAggregatedAttributeTypeOk(o.Aggregated); ok { @@ -471,37 +574,45 @@ func (o ClusterStatus) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableClusterStatus struct { value *ClusterStatus isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableClusterStatus) Get() *ClusterStatus { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableClusterStatus) Set(val *ClusterStatus) { 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 NullableClusterStatus) 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 *NullableClusterStatus) 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 NewNullableClusterStatus(val *ClusterStatus) *NullableClusterStatus { return &NullableClusterStatus{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 NullableClusterStatus) 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 *NullableClusterStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_cluster_status_state.go b/services/ske/model_cluster_status_state.go index 3cfd13125..5ec3af0bd 100644 --- a/services/ske/model_cluster_status_state.go +++ b/services/ske/model_cluster_status_state.go @@ -8,6 +8,7 @@ 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 ( @@ -16,21 +17,31 @@ import ( ) // ClusterStatusState the model 'ClusterStatusState' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ClusterStatusState string // List of ClusterStatusState const ( - CLUSTERSTATUSSTATE_HEALTHY ClusterStatusState = "STATE_HEALTHY" - CLUSTERSTATUSSTATE_CREATING ClusterStatusState = "STATE_CREATING" - CLUSTERSTATUSSTATE_DELETING ClusterStatusState = "STATE_DELETING" - CLUSTERSTATUSSTATE_UNHEALTHY ClusterStatusState = "STATE_UNHEALTHY" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CLUSTERSTATUSSTATE_HEALTHY ClusterStatusState = "STATE_HEALTHY" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CLUSTERSTATUSSTATE_CREATING ClusterStatusState = "STATE_CREATING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CLUSTERSTATUSSTATE_DELETING ClusterStatusState = "STATE_DELETING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CLUSTERSTATUSSTATE_UNHEALTHY ClusterStatusState = "STATE_UNHEALTHY" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CLUSTERSTATUSSTATE_RECONCILING ClusterStatusState = "STATE_RECONCILING" - CLUSTERSTATUSSTATE_HIBERNATED ClusterStatusState = "STATE_HIBERNATED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CLUSTERSTATUSSTATE_HIBERNATED ClusterStatusState = "STATE_HIBERNATED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CLUSTERSTATUSSTATE_HIBERNATING ClusterStatusState = "STATE_HIBERNATING" - CLUSTERSTATUSSTATE_WAKINGUP ClusterStatusState = "STATE_WAKINGUP" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CLUSTERSTATUSSTATE_WAKINGUP ClusterStatusState = "STATE_WAKINGUP" ) // All allowed values of ClusterStatusState enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedClusterStatusStateEnumValues = []ClusterStatusState{ "STATE_HEALTHY", "STATE_CREATING", @@ -42,6 +53,7 @@ var AllowedClusterStatusStateEnumValues = []ClusterStatusState{ "STATE_WAKINGUP", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *ClusterStatusState) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) @@ -66,6 +78,7 @@ func (v *ClusterStatusState) UnmarshalJSON(src []byte) error { // NewClusterStatusStateFromValue returns a pointer to a valid ClusterStatusState // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewClusterStatusStateFromValue(v string) (*ClusterStatusState, error) { ev := ClusterStatusState(v) if ev.IsValid() { @@ -76,6 +89,7 @@ func NewClusterStatusStateFromValue(v string) (*ClusterStatusState, error) { } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ClusterStatusState) IsValid() bool { for _, existing := range AllowedClusterStatusStateEnumValues { if existing == v { @@ -86,41 +100,50 @@ func (v ClusterStatusState) IsValid() bool { } // Ptr returns reference to ClusterStatusState value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ClusterStatusState) Ptr() *ClusterStatusState { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableClusterStatusState struct { value *ClusterStatusState isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableClusterStatusState) Get() *ClusterStatusState { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableClusterStatusState) Set(val *ClusterStatusState) { 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 NullableClusterStatusState) 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 *NullableClusterStatusState) 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 NewNullableClusterStatusState(val *ClusterStatusState) *NullableClusterStatusState { return &NullableClusterStatusState{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 NullableClusterStatusState) 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 *NullableClusterStatusState) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_create_kubeconfig_payload.go b/services/ske/model_create_kubeconfig_payload.go index a80580867..d6503a673 100644 --- a/services/ske/model_create_kubeconfig_payload.go +++ b/services/ske/model_create_kubeconfig_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateKubeconfigPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateKubeconfigPayloadGetExpirationSecondsAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateKubeconfigPayloadGetExpirationSecondsAttributeTypeOk(arg CreateKubeconfigPayloadGetExpirationSecondsAttributeType) (ret CreateKubeconfigPayloadGetExpirationSecondsRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getCreateKubeconfigPayloadGetExpirationSecondsAttributeTypeOk(arg CreateKub return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateKubeconfigPayloadGetExpirationSecondsAttributeType(arg *CreateKubeconfigPayloadGetExpirationSecondsAttributeType, val CreateKubeconfigPayloadGetExpirationSecondsRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateKubeconfigPayloadGetExpirationSecondsArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateKubeconfigPayloadGetExpirationSecondsRetType = string // CreateKubeconfigPayload struct for CreateKubeconfigPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateKubeconfigPayload struct { ExpirationSeconds CreateKubeconfigPayloadGetExpirationSecondsAttributeType `json:"expirationSeconds,omitempty"` } @@ -47,6 +55,7 @@ type CreateKubeconfigPayload struct { // 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 NewCreateKubeconfigPayload() *CreateKubeconfigPayload { this := CreateKubeconfigPayload{} return &this @@ -55,12 +64,14 @@ func NewCreateKubeconfigPayload() *CreateKubeconfigPayload { // NewCreateKubeconfigPayloadWithDefaults instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayloadWithDefaults() *CreateKubeconfigPayload { this := CreateKubeconfigPayload{} return &this } // GetExpirationSeconds returns the ExpirationSeconds 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 *CreateKubeconfigPayload) GetExpirationSeconds() (res CreateKubeconfigPayloadGetExpirationSecondsRetType) { res, _ = o.GetExpirationSecondsOk() return @@ -68,21 +79,25 @@ func (o *CreateKubeconfigPayload) GetExpirationSeconds() (res CreateKubeconfigPa // GetExpirationSecondsOk returns a tuple with the ExpirationSeconds 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 *CreateKubeconfigPayload) GetExpirationSecondsOk() (ret CreateKubeconfigPayloadGetExpirationSecondsRetType, ok bool) { return getCreateKubeconfigPayloadGetExpirationSecondsAttributeTypeOk(o.ExpirationSeconds) } // HasExpirationSeconds 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 *CreateKubeconfigPayload) HasExpirationSeconds() bool { _, ok := o.GetExpirationSecondsOk() return ok } // SetExpirationSeconds gets a reference to the given string and assigns it to the ExpirationSeconds field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateKubeconfigPayload) SetExpirationSeconds(v CreateKubeconfigPayloadGetExpirationSecondsRetType) { setCreateKubeconfigPayloadGetExpirationSecondsAttributeType(&o.ExpirationSeconds, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateKubeconfigPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateKubeconfigPayloadGetExpirationSecondsAttributeTypeOk(o.ExpirationSeconds); ok { @@ -91,37 +106,45 @@ func (o CreateKubeconfigPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateKubeconfigPayload struct { value *CreateKubeconfigPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateKubeconfigPayload) Get() *CreateKubeconfigPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateKubeconfigPayload) Set(val *CreateKubeconfigPayload) { 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 NullableCreateKubeconfigPayload) 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 *NullableCreateKubeconfigPayload) 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 NewNullableCreateKubeconfigPayload(val *CreateKubeconfigPayload) *NullableCreateKubeconfigPayload { return &NullableCreateKubeconfigPayload{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 NullableCreateKubeconfigPayload) 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 *NullableCreateKubeconfigPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_create_or_update_cluster_payload.go b/services/ske/model_create_or_update_cluster_payload.go index 2de66fc94..761c90a1c 100644 --- a/services/ske/model_create_or_update_cluster_payload.go +++ b/services/ske/model_create_or_update_cluster_payload.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateOrUpdateClusterPayload{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetExtensionsAttributeType = *Extension + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetExtensionsArgType = Extension + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetExtensionsRetType = Extension +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetExtensionsAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetExtensionsAttributeType) (ret CreateOrUpdateClusterPayloadGetExtensionsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getCreateOrUpdateClusterPayloadGetExtensionsAttributeTypeOk(arg CreateOrUpd return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetExtensionsAttributeType(arg *CreateOrUpdateClusterPayloadGetExtensionsAttributeType, val CreateOrUpdateClusterPayloadGetExtensionsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setCreateOrUpdateClusterPayloadGetExtensionsAttributeType(arg *CreateOrUpda */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetHibernationAttributeType = *Hibernation + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetHibernationArgType = Hibernation + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetHibernationRetType = Hibernation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetHibernationAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetHibernationAttributeType) (ret CreateOrUpdateClusterPayloadGetHibernationRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getCreateOrUpdateClusterPayloadGetHibernationAttributeTypeOk(arg CreateOrUp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetHibernationAttributeType(arg *CreateOrUpdateClusterPayloadGetHibernationAttributeType, val CreateOrUpdateClusterPayloadGetHibernationRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setCreateOrUpdateClusterPayloadGetHibernationAttributeType(arg *CreateOrUpd */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetKubernetesAttributeType = *Kubernetes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetKubernetesArgType = Kubernetes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetKubernetesRetType = Kubernetes +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetKubernetesAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetKubernetesAttributeType) (ret CreateOrUpdateClusterPayloadGetKubernetesRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getCreateOrUpdateClusterPayloadGetKubernetesAttributeTypeOk(arg CreateOrUpd return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetKubernetesAttributeType(arg *CreateOrUpdateClusterPayloadGetKubernetesAttributeType, val CreateOrUpdateClusterPayloadGetKubernetesRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setCreateOrUpdateClusterPayloadGetKubernetesAttributeType(arg *CreateOrUpda */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetMaintenanceAttributeType = *Maintenance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetMaintenanceArgType = Maintenance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetMaintenanceRetType = Maintenance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetMaintenanceAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetMaintenanceAttributeType) (ret CreateOrUpdateClusterPayloadGetMaintenanceRetType, ok bool) { if arg == nil { return ret, false @@ -93,6 +121,7 @@ func getCreateOrUpdateClusterPayloadGetMaintenanceAttributeTypeOk(arg CreateOrUp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetMaintenanceAttributeType(arg *CreateOrUpdateClusterPayloadGetMaintenanceAttributeType, val CreateOrUpdateClusterPayloadGetMaintenanceRetType) { *arg = &val } @@ -102,10 +131,16 @@ func setCreateOrUpdateClusterPayloadGetMaintenanceAttributeType(arg *CreateOrUpd */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetNetworkAttributeType = *Network + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetNetworkArgType = Network + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetNetworkRetType = Network +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetNetworkAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetNetworkAttributeType) (ret CreateOrUpdateClusterPayloadGetNetworkRetType, ok bool) { if arg == nil { return ret, false @@ -113,6 +148,7 @@ func getCreateOrUpdateClusterPayloadGetNetworkAttributeTypeOk(arg CreateOrUpdate return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetNetworkAttributeType(arg *CreateOrUpdateClusterPayloadGetNetworkAttributeType, val CreateOrUpdateClusterPayloadGetNetworkRetType) { *arg = &val } @@ -122,10 +158,16 @@ func setCreateOrUpdateClusterPayloadGetNetworkAttributeType(arg *CreateOrUpdateC */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetNodepoolsAttributeType = *[]Nodepool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetNodepoolsArgType = []Nodepool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetNodepoolsRetType = []Nodepool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetNodepoolsAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetNodepoolsAttributeType) (ret CreateOrUpdateClusterPayloadGetNodepoolsRetType, ok bool) { if arg == nil { return ret, false @@ -133,6 +175,7 @@ func getCreateOrUpdateClusterPayloadGetNodepoolsAttributeTypeOk(arg CreateOrUpda return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetNodepoolsAttributeType(arg *CreateOrUpdateClusterPayloadGetNodepoolsAttributeType, val CreateOrUpdateClusterPayloadGetNodepoolsRetType) { *arg = &val } @@ -142,10 +185,16 @@ func setCreateOrUpdateClusterPayloadGetNodepoolsAttributeType(arg *CreateOrUpdat */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetStatusAttributeType = *ClusterStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetStatusArgType = ClusterStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateOrUpdateClusterPayloadGetStatusRetType = ClusterStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateOrUpdateClusterPayloadGetStatusAttributeTypeOk(arg CreateOrUpdateClusterPayloadGetStatusAttributeType) (ret CreateOrUpdateClusterPayloadGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -153,11 +202,13 @@ func getCreateOrUpdateClusterPayloadGetStatusAttributeTypeOk(arg CreateOrUpdateC return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateOrUpdateClusterPayloadGetStatusAttributeType(arg *CreateOrUpdateClusterPayloadGetStatusAttributeType, val CreateOrUpdateClusterPayloadGetStatusRetType) { *arg = &val } // 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 { Extensions CreateOrUpdateClusterPayloadGetExtensionsAttributeType `json:"extensions,omitempty"` Hibernation CreateOrUpdateClusterPayloadGetHibernationAttributeType `json:"hibernation,omitempty"` @@ -170,12 +221,14 @@ type CreateOrUpdateClusterPayload struct { Status CreateOrUpdateClusterPayloadGetStatusAttributeType `json:"status,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateOrUpdateClusterPayload CreateOrUpdateClusterPayload // NewCreateOrUpdateClusterPayload instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayload(kubernetes CreateOrUpdateClusterPayloadGetKubernetesArgType, nodepools CreateOrUpdateClusterPayloadGetNodepoolsArgType) *CreateOrUpdateClusterPayload { this := CreateOrUpdateClusterPayload{} setCreateOrUpdateClusterPayloadGetKubernetesAttributeType(&this.Kubernetes, kubernetes) @@ -186,12 +239,14 @@ func NewCreateOrUpdateClusterPayload(kubernetes CreateOrUpdateClusterPayloadGetK // NewCreateOrUpdateClusterPayloadWithDefaults instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayloadWithDefaults() *CreateOrUpdateClusterPayload { this := CreateOrUpdateClusterPayload{} return &this } // 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) { res, _ = o.GetExtensionsOk() return @@ -199,22 +254,26 @@ func (o *CreateOrUpdateClusterPayload) GetExtensions() (res CreateOrUpdateCluste // GetExtensionsOk returns a tuple with the Extensions 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) GetExtensionsOk() (ret CreateOrUpdateClusterPayloadGetExtensionsRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetExtensionsAttributeTypeOk(o.Extensions) } // HasExtensions 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) HasExtensions() bool { _, ok := o.GetExtensionsOk() return ok } // SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetExtensions(v CreateOrUpdateClusterPayloadGetExtensionsRetType) { setCreateOrUpdateClusterPayloadGetExtensionsAttributeType(&o.Extensions, v) } // GetHibernation returns the Hibernation 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) GetHibernation() (res CreateOrUpdateClusterPayloadGetHibernationRetType) { res, _ = o.GetHibernationOk() return @@ -222,22 +281,26 @@ func (o *CreateOrUpdateClusterPayload) GetHibernation() (res CreateOrUpdateClust // GetHibernationOk returns a tuple with the Hibernation 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) GetHibernationOk() (ret CreateOrUpdateClusterPayloadGetHibernationRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetHibernationAttributeTypeOk(o.Hibernation) } // HasHibernation 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) HasHibernation() bool { _, ok := o.GetHibernationOk() return ok } // SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetHibernation(v CreateOrUpdateClusterPayloadGetHibernationRetType) { setCreateOrUpdateClusterPayloadGetHibernationAttributeType(&o.Hibernation, v) } // GetKubernetes returns the Kubernetes field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) GetKubernetes() (ret CreateOrUpdateClusterPayloadGetKubernetesRetType) { ret, _ = o.GetKubernetesOk() return ret @@ -245,16 +308,19 @@ func (o *CreateOrUpdateClusterPayload) GetKubernetes() (ret CreateOrUpdateCluste // GetKubernetesOk returns a tuple with the Kubernetes field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) GetKubernetesOk() (ret CreateOrUpdateClusterPayloadGetKubernetesRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetKubernetesAttributeTypeOk(o.Kubernetes) } // SetKubernetes sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetKubernetes(v CreateOrUpdateClusterPayloadGetKubernetesRetType) { setCreateOrUpdateClusterPayloadGetKubernetesAttributeType(&o.Kubernetes, v) } // GetMaintenance returns the Maintenance 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) GetMaintenance() (res CreateOrUpdateClusterPayloadGetMaintenanceRetType) { res, _ = o.GetMaintenanceOk() return @@ -262,22 +328,26 @@ func (o *CreateOrUpdateClusterPayload) GetMaintenance() (res CreateOrUpdateClust // GetMaintenanceOk returns a tuple with the Maintenance 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) GetMaintenanceOk() (ret CreateOrUpdateClusterPayloadGetMaintenanceRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetMaintenanceAttributeTypeOk(o.Maintenance) } // HasMaintenance 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) HasMaintenance() bool { _, ok := o.GetMaintenanceOk() return ok } // SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetMaintenance(v CreateOrUpdateClusterPayloadGetMaintenanceRetType) { setCreateOrUpdateClusterPayloadGetMaintenanceAttributeType(&o.Maintenance, v) } // GetNetwork returns the Network 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) GetNetwork() (res CreateOrUpdateClusterPayloadGetNetworkRetType) { res, _ = o.GetNetworkOk() return @@ -285,22 +355,26 @@ func (o *CreateOrUpdateClusterPayload) GetNetwork() (res CreateOrUpdateClusterPa // GetNetworkOk returns a tuple with the Network 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) GetNetworkOk() (ret CreateOrUpdateClusterPayloadGetNetworkRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetNetworkAttributeTypeOk(o.Network) } // HasNetwork 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) HasNetwork() bool { _, ok := o.GetNetworkOk() return ok } // SetNetwork gets a reference to the given Network and assigns it to the Network field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetNetwork(v CreateOrUpdateClusterPayloadGetNetworkRetType) { setCreateOrUpdateClusterPayloadGetNetworkAttributeType(&o.Network, v) } // GetNodepools returns the Nodepools field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) GetNodepools() (ret CreateOrUpdateClusterPayloadGetNodepoolsRetType) { ret, _ = o.GetNodepoolsOk() return ret @@ -308,16 +382,19 @@ func (o *CreateOrUpdateClusterPayload) GetNodepools() (ret CreateOrUpdateCluster // GetNodepoolsOk returns a tuple with the Nodepools field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) GetNodepoolsOk() (ret CreateOrUpdateClusterPayloadGetNodepoolsRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetNodepoolsAttributeTypeOk(o.Nodepools) } // SetNodepools sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetNodepools(v CreateOrUpdateClusterPayloadGetNodepoolsRetType) { setCreateOrUpdateClusterPayloadGetNodepoolsAttributeType(&o.Nodepools, v) } // GetStatus returns the Status 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) GetStatus() (res CreateOrUpdateClusterPayloadGetStatusRetType) { res, _ = o.GetStatusOk() return @@ -325,21 +402,25 @@ func (o *CreateOrUpdateClusterPayload) GetStatus() (res CreateOrUpdateClusterPay // GetStatusOk returns a tuple with the Status 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) GetStatusOk() (ret CreateOrUpdateClusterPayloadGetStatusRetType, ok bool) { return getCreateOrUpdateClusterPayloadGetStatusAttributeTypeOk(o.Status) } // HasStatus 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) HasStatus() bool { _, ok := o.GetStatusOk() return ok } // SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateOrUpdateClusterPayload) SetStatus(v CreateOrUpdateClusterPayloadGetStatusRetType) { setCreateOrUpdateClusterPayloadGetStatusAttributeType(&o.Status, v) } +// 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 := getCreateOrUpdateClusterPayloadGetExtensionsAttributeTypeOk(o.Extensions); ok { @@ -366,37 +447,45 @@ func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateOrUpdateClusterPayload struct { value *CreateOrUpdateClusterPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateOrUpdateClusterPayload) Get() *CreateOrUpdateClusterPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateOrUpdateClusterPayload) Set(val *CreateOrUpdateClusterPayload) { 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 NullableCreateOrUpdateClusterPayload) 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 *NullableCreateOrUpdateClusterPayload) 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 NewNullableCreateOrUpdateClusterPayload(val *CreateOrUpdateClusterPayload) *NullableCreateOrUpdateClusterPayload { return &NullableCreateOrUpdateClusterPayload{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 NullableCreateOrUpdateClusterPayload) 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 *NullableCreateOrUpdateClusterPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_credentials_rotation_state.go b/services/ske/model_credentials_rotation_state.go index 7e5456bcf..5abeeee83 100644 --- a/services/ske/model_credentials_rotation_state.go +++ b/services/ske/model_credentials_rotation_state.go @@ -8,6 +8,7 @@ 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 ( @@ -24,10 +25,16 @@ var _ MappedNullable = &CredentialsRotationState{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetLastCompletionTimeAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetLastCompletionTimeArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetLastCompletionTimeRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCredentialsRotationStateGetLastCompletionTimeAttributeTypeOk(arg CredentialsRotationStateGetLastCompletionTimeAttributeType) (ret CredentialsRotationStateGetLastCompletionTimeRetType, ok bool) { if arg == nil { return ret, false @@ -35,6 +42,7 @@ func getCredentialsRotationStateGetLastCompletionTimeAttributeTypeOk(arg Credent return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCredentialsRotationStateGetLastCompletionTimeAttributeType(arg *CredentialsRotationStateGetLastCompletionTimeAttributeType, val CredentialsRotationStateGetLastCompletionTimeRetType) { *arg = &val } @@ -44,10 +52,16 @@ func setCredentialsRotationStateGetLastCompletionTimeAttributeType(arg *Credenti */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetLastInitiationTimeAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetLastInitiationTimeArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetLastInitiationTimeRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCredentialsRotationStateGetLastInitiationTimeAttributeTypeOk(arg CredentialsRotationStateGetLastInitiationTimeAttributeType) (ret CredentialsRotationStateGetLastInitiationTimeRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +69,7 @@ func getCredentialsRotationStateGetLastInitiationTimeAttributeTypeOk(arg Credent return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCredentialsRotationStateGetLastInitiationTimeAttributeType(arg *CredentialsRotationStateGetLastInitiationTimeAttributeType, val CredentialsRotationStateGetLastInitiationTimeRetType) { *arg = &val } @@ -67,18 +82,25 @@ func setCredentialsRotationStateGetLastInitiationTimeAttributeType(arg *Credenti // CredentialsRotationStatePhase Phase of the credentials rotation. `NEVER` indicates that no credentials rotation has been performed using the new credentials rotation endpoints yet. // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStatePhase string // List of Phase const ( - CREDENTIALSROTATIONSTATEPHASE_NEVER CredentialsRotationStatePhase = "NEVER" - CREDENTIALSROTATIONSTATEPHASE_PREPARING CredentialsRotationStatePhase = "PREPARING" - CREDENTIALSROTATIONSTATEPHASE_PREPARED CredentialsRotationStatePhase = "PREPARED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CREDENTIALSROTATIONSTATEPHASE_NEVER CredentialsRotationStatePhase = "NEVER" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CREDENTIALSROTATIONSTATEPHASE_PREPARING CredentialsRotationStatePhase = "PREPARING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CREDENTIALSROTATIONSTATEPHASE_PREPARED CredentialsRotationStatePhase = "PREPARED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREDENTIALSROTATIONSTATEPHASE_COMPLETING CredentialsRotationStatePhase = "COMPLETING" - CREDENTIALSROTATIONSTATEPHASE_COMPLETED CredentialsRotationStatePhase = "COMPLETED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CREDENTIALSROTATIONSTATEPHASE_COMPLETED CredentialsRotationStatePhase = "COMPLETED" ) // All allowed values of CredentialsRotationState enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCredentialsRotationStatePhaseEnumValues = []CredentialsRotationStatePhase{ "NEVER", "PREPARING", @@ -87,6 +109,7 @@ var AllowedCredentialsRotationStatePhaseEnumValues = []CredentialsRotationStateP "COMPLETED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CredentialsRotationStatePhase) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -114,6 +137,7 @@ func (v *CredentialsRotationStatePhase) UnmarshalJSON(src []byte) error { // NewCredentialsRotationStatePhaseFromValue returns a pointer to a valid CredentialsRotationStatePhase // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCredentialsRotationStatePhaseFromValue(v CredentialsRotationStatePhase) (*CredentialsRotationStatePhase, error) { ev := CredentialsRotationStatePhase(v) if ev.IsValid() { @@ -124,6 +148,7 @@ func NewCredentialsRotationStatePhaseFromValue(v CredentialsRotationStatePhase) } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CredentialsRotationStatePhase) IsValid() bool { for _, existing := range AllowedCredentialsRotationStatePhaseEnumValues { if existing == v { @@ -134,50 +159,65 @@ func (v CredentialsRotationStatePhase) IsValid() bool { } // Ptr returns reference to PhasePhase value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CredentialsRotationStatePhase) Ptr() *CredentialsRotationStatePhase { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCredentialsRotationStatePhase struct { value *CredentialsRotationStatePhase isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCredentialsRotationStatePhase) Get() *CredentialsRotationStatePhase { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCredentialsRotationStatePhase) Set(val *CredentialsRotationStatePhase) { 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 NullableCredentialsRotationStatePhase) 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 *NullableCredentialsRotationStatePhase) 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 NewNullableCredentialsRotationStatePhase(val *CredentialsRotationStatePhase) *NullableCredentialsRotationStatePhase { return &NullableCredentialsRotationStatePhase{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 NullableCredentialsRotationStatePhase) 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 *NullableCredentialsRotationStatePhase) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetPhaseAttributeType = *CredentialsRotationStatePhase + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetPhaseArgType = CredentialsRotationStatePhase + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationStateGetPhaseRetType = CredentialsRotationStatePhase +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCredentialsRotationStateGetPhaseAttributeTypeOk(arg CredentialsRotationStateGetPhaseAttributeType) (ret CredentialsRotationStateGetPhaseRetType, ok bool) { if arg == nil { return ret, false @@ -185,11 +225,13 @@ func getCredentialsRotationStateGetPhaseAttributeTypeOk(arg CredentialsRotationS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCredentialsRotationStateGetPhaseAttributeType(arg *CredentialsRotationStateGetPhaseAttributeType, val CredentialsRotationStateGetPhaseRetType) { *arg = &val } // CredentialsRotationState struct for CredentialsRotationState +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CredentialsRotationState struct { // Format: `2024-02-15T11:06:29Z` LastCompletionTime CredentialsRotationStateGetLastCompletionTimeAttributeType `json:"lastCompletionTime,omitempty"` @@ -203,6 +245,7 @@ type CredentialsRotationState struct { // 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 NewCredentialsRotationState() *CredentialsRotationState { this := CredentialsRotationState{} return &this @@ -211,12 +254,14 @@ func NewCredentialsRotationState() *CredentialsRotationState { // NewCredentialsRotationStateWithDefaults instantiates a new CredentialsRotationState 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 NewCredentialsRotationStateWithDefaults() *CredentialsRotationState { this := CredentialsRotationState{} return &this } // GetLastCompletionTime returns the LastCompletionTime 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 *CredentialsRotationState) GetLastCompletionTime() (res CredentialsRotationStateGetLastCompletionTimeRetType) { res, _ = o.GetLastCompletionTimeOk() return @@ -224,22 +269,26 @@ func (o *CredentialsRotationState) GetLastCompletionTime() (res CredentialsRotat // GetLastCompletionTimeOk returns a tuple with the LastCompletionTime 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 *CredentialsRotationState) GetLastCompletionTimeOk() (ret CredentialsRotationStateGetLastCompletionTimeRetType, ok bool) { return getCredentialsRotationStateGetLastCompletionTimeAttributeTypeOk(o.LastCompletionTime) } // HasLastCompletionTime 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 *CredentialsRotationState) HasLastCompletionTime() bool { _, ok := o.GetLastCompletionTimeOk() return ok } // SetLastCompletionTime gets a reference to the given time.Time and assigns it to the LastCompletionTime field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CredentialsRotationState) SetLastCompletionTime(v CredentialsRotationStateGetLastCompletionTimeRetType) { setCredentialsRotationStateGetLastCompletionTimeAttributeType(&o.LastCompletionTime, v) } // GetLastInitiationTime returns the LastInitiationTime 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 *CredentialsRotationState) GetLastInitiationTime() (res CredentialsRotationStateGetLastInitiationTimeRetType) { res, _ = o.GetLastInitiationTimeOk() return @@ -247,22 +296,26 @@ func (o *CredentialsRotationState) GetLastInitiationTime() (res CredentialsRotat // GetLastInitiationTimeOk returns a tuple with the LastInitiationTime 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 *CredentialsRotationState) GetLastInitiationTimeOk() (ret CredentialsRotationStateGetLastInitiationTimeRetType, ok bool) { return getCredentialsRotationStateGetLastInitiationTimeAttributeTypeOk(o.LastInitiationTime) } // HasLastInitiationTime 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 *CredentialsRotationState) HasLastInitiationTime() bool { _, ok := o.GetLastInitiationTimeOk() return ok } // SetLastInitiationTime gets a reference to the given time.Time and assigns it to the LastInitiationTime field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CredentialsRotationState) SetLastInitiationTime(v CredentialsRotationStateGetLastInitiationTimeRetType) { setCredentialsRotationStateGetLastInitiationTimeAttributeType(&o.LastInitiationTime, v) } // GetPhase returns the Phase 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 *CredentialsRotationState) GetPhase() (res CredentialsRotationStateGetPhaseRetType) { res, _ = o.GetPhaseOk() return @@ -270,21 +323,25 @@ func (o *CredentialsRotationState) GetPhase() (res CredentialsRotationStateGetPh // GetPhaseOk returns a tuple with the Phase 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 *CredentialsRotationState) GetPhaseOk() (ret CredentialsRotationStateGetPhaseRetType, ok bool) { return getCredentialsRotationStateGetPhaseAttributeTypeOk(o.Phase) } // HasPhase 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 *CredentialsRotationState) HasPhase() bool { _, ok := o.GetPhaseOk() return ok } // SetPhase gets a reference to the given string and assigns it to the Phase field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CredentialsRotationState) SetPhase(v CredentialsRotationStateGetPhaseRetType) { setCredentialsRotationStateGetPhaseAttributeType(&o.Phase, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CredentialsRotationState) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCredentialsRotationStateGetLastCompletionTimeAttributeTypeOk(o.LastCompletionTime); ok { @@ -299,37 +356,45 @@ func (o CredentialsRotationState) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCredentialsRotationState struct { value *CredentialsRotationState isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCredentialsRotationState) Get() *CredentialsRotationState { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCredentialsRotationState) Set(val *CredentialsRotationState) { 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 NullableCredentialsRotationState) 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 *NullableCredentialsRotationState) 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 NewNullableCredentialsRotationState(val *CredentialsRotationState) *NullableCredentialsRotationState { return &NullableCredentialsRotationState{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 NullableCredentialsRotationState) 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 *NullableCredentialsRotationState) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_cri.go b/services/ske/model_cri.go index 774105cfd..8a1416cdf 100644 --- a/services/ske/model_cri.go +++ b/services/ske/model_cri.go @@ -8,6 +8,7 @@ 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 ( @@ -26,20 +27,25 @@ var _ MappedNullable = &CRI{} // CRIName the model 'CRI' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CRIName string // List of Name const ( - CRINAME_DOCKER CRIName = "docker" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CRINAME_DOCKER CRIName = "docker" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CRINAME_CONTAINERD CRIName = "containerd" ) // All allowed values of CRI enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCRINameEnumValues = []CRIName{ "docker", "containerd", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CRIName) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -67,6 +73,7 @@ func (v *CRIName) UnmarshalJSON(src []byte) error { // NewCRINameFromValue returns a pointer to a valid CRIName // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCRINameFromValue(v CRIName) (*CRIName, error) { ev := CRIName(v) if ev.IsValid() { @@ -77,6 +84,7 @@ func NewCRINameFromValue(v CRIName) (*CRIName, error) { } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CRIName) IsValid() bool { for _, existing := range AllowedCRINameEnumValues { if existing == v { @@ -87,50 +95,65 @@ func (v CRIName) IsValid() bool { } // Ptr returns reference to NameName value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CRIName) Ptr() *CRIName { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCRIName struct { value *CRIName isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCRIName) Get() *CRIName { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCRIName) Set(val *CRIName) { 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 NullableCRIName) 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 *NullableCRIName) 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 NewNullableCRIName(val *CRIName) *NullableCRIName { return &NullableCRIName{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 NullableCRIName) 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 *NullableCRIName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CRIGetNameAttributeType = *CRIName + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CRIGetNameArgType = CRIName + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CRIGetNameRetType = CRIName +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCRIGetNameAttributeTypeOk(arg CRIGetNameAttributeType) (ret CRIGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -138,11 +161,13 @@ func getCRIGetNameAttributeTypeOk(arg CRIGetNameAttributeType) (ret CRIGetNameRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCRIGetNameAttributeType(arg *CRIGetNameAttributeType, val CRIGetNameRetType) { *arg = &val } // CRI struct for CRI +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CRI struct { Name CRIGetNameAttributeType `json:"name,omitempty"` } @@ -151,6 +176,7 @@ type CRI struct { // 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 NewCRI() *CRI { this := CRI{} return &this @@ -159,12 +185,14 @@ func NewCRI() *CRI { // NewCRIWithDefaults instantiates a new CRI 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 NewCRIWithDefaults() *CRI { this := CRI{} return &this } // GetName returns the Name 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 *CRI) GetName() (res CRIGetNameRetType) { res, _ = o.GetNameOk() return @@ -172,21 +200,25 @@ func (o *CRI) GetName() (res CRIGetNameRetType) { // GetNameOk returns a tuple with the Name 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 *CRI) GetNameOk() (ret CRIGetNameRetType, ok bool) { return getCRIGetNameAttributeTypeOk(o.Name) } // HasName 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 *CRI) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CRI) SetName(v CRIGetNameRetType) { setCRIGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CRI) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCRIGetNameAttributeTypeOk(o.Name); ok { @@ -195,37 +227,45 @@ func (o CRI) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCRI struct { value *CRI isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCRI) Get() *CRI { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCRI) Set(val *CRI) { 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 NullableCRI) 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 *NullableCRI) 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 NewNullableCRI(val *CRI) *NullableCRI { return &NullableCRI{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 NullableCRI) 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 *NullableCRI) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_dns.go b/services/ske/model_dns.go index 7180198bb..dd2b7af45 100644 --- a/services/ske/model_dns.go +++ b/services/ske/model_dns.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &DNS{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNSgetEnabledAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNSgetEnabledArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNSgetEnabledRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getDNSgetEnabledAttributeTypeOk(arg DNSgetEnabledAttributeType) (ret DNSgetEnabledRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getDNSgetEnabledAttributeTypeOk(arg DNSgetEnabledAttributeType) (ret DNSget return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setDNSgetEnabledAttributeType(arg *DNSgetEnabledAttributeType, val DNSgetEnabledRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setDNSgetEnabledAttributeType(arg *DNSgetEnabledAttributeType, val DNSgetEn */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNSGetZonesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNSGetZonesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNSGetZonesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getDNSGetZonesAttributeTypeOk(arg DNSGetZonesAttributeType) (ret DNSGetZonesRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getDNSGetZonesAttributeTypeOk(arg DNSGetZonesAttributeType) (ret DNSGetZone return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setDNSGetZonesAttributeType(arg *DNSGetZonesAttributeType, val DNSGetZonesRetType) { *arg = &val } // DNS struct for DNS +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DNS struct { // Enables the dns extension. // REQUIRED @@ -66,12 +82,14 @@ type DNS struct { Zones DNSGetZonesAttributeType `json:"zones,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _DNS DNS // NewDNS instantiates a new DNS 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 NewDNS(enabled DNSgetEnabledArgType) *DNS { this := DNS{} setDNSgetEnabledAttributeType(&this.Enabled, enabled) @@ -81,12 +99,14 @@ func NewDNS(enabled DNSgetEnabledArgType) *DNS { // NewDNSWithDefaults instantiates a new DNS 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 NewDNSWithDefaults() *DNS { this := DNS{} return &this } // GetEnabled returns the Enabled field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *DNS) GetEnabled() (ret DNSgetEnabledRetType) { ret, _ = o.GetEnabledOk() return ret @@ -94,16 +114,19 @@ func (o *DNS) GetEnabled() (ret DNSgetEnabledRetType) { // GetEnabledOk returns a tuple with the Enabled field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *DNS) GetEnabledOk() (ret DNSgetEnabledRetType, ok bool) { return getDNSgetEnabledAttributeTypeOk(o.Enabled) } // SetEnabled sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *DNS) SetEnabled(v DNSgetEnabledRetType) { setDNSgetEnabledAttributeType(&o.Enabled, v) } // GetZones returns the Zones 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 *DNS) GetZones() (res DNSGetZonesRetType) { res, _ = o.GetZonesOk() return @@ -111,21 +134,25 @@ func (o *DNS) GetZones() (res DNSGetZonesRetType) { // GetZonesOk returns a tuple with the Zones 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 *DNS) GetZonesOk() (ret DNSGetZonesRetType, ok bool) { return getDNSGetZonesAttributeTypeOk(o.Zones) } // HasZones 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 *DNS) HasZones() bool { _, ok := o.GetZonesOk() return ok } // SetZones gets a reference to the given []string and assigns it to the Zones field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *DNS) SetZones(v DNSGetZonesRetType) { setDNSGetZonesAttributeType(&o.Zones, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o DNS) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getDNSgetEnabledAttributeTypeOk(o.Enabled); ok { @@ -137,37 +164,45 @@ func (o DNS) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableDNS struct { value *DNS isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableDNS) Get() *DNS { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableDNS) Set(val *DNS) { 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 NullableDNS) 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 *NullableDNS) 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 NewNullableDNS(val *DNS) *NullableDNS { return &NullableDNS{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 NullableDNS) 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 *NullableDNS) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_extension.go b/services/ske/model_extension.go index 09fdbf0ba..55a97b3af 100644 --- a/services/ske/model_extension.go +++ b/services/ske/model_extension.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Extension{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetAclAttributeType = *ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetAclArgType = ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetAclRetType = ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getExtensionGetAclAttributeTypeOk(arg ExtensionGetAclAttributeType) (ret ExtensionGetAclRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getExtensionGetAclAttributeTypeOk(arg ExtensionGetAclAttributeType) (ret Ex return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setExtensionGetAclAttributeType(arg *ExtensionGetAclAttributeType, val ExtensionGetAclRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setExtensionGetAclAttributeType(arg *ExtensionGetAclAttributeType, val Exte */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetDnsAttributeType = *DNS + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetDnsArgType = DNS + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetDnsRetType = DNS +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getExtensionGetDnsAttributeTypeOk(arg ExtensionGetDnsAttributeType) (ret ExtensionGetDnsRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getExtensionGetDnsAttributeTypeOk(arg ExtensionGetDnsAttributeType) (ret Ex return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setExtensionGetDnsAttributeType(arg *ExtensionGetDnsAttributeType, val ExtensionGetDnsRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setExtensionGetDnsAttributeType(arg *ExtensionGetDnsAttributeType, val Exte */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetObservabilityAttributeType = *Observability + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetObservabilityArgType = Observability + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ExtensionGetObservabilityRetType = Observability +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getExtensionGetObservabilityAttributeTypeOk(arg ExtensionGetObservabilityAttributeType) (ret ExtensionGetObservabilityRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +94,13 @@ func getExtensionGetObservabilityAttributeTypeOk(arg ExtensionGetObservabilityAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setExtensionGetObservabilityAttributeType(arg *ExtensionGetObservabilityAttributeType, val ExtensionGetObservabilityRetType) { *arg = &val } // Extension struct for Extension +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Extension struct { Acl ExtensionGetAclAttributeType `json:"acl,omitempty"` Dns ExtensionGetDnsAttributeType `json:"dns,omitempty"` @@ -88,6 +111,7 @@ type Extension struct { // 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 NewExtension() *Extension { this := Extension{} return &this @@ -96,12 +120,14 @@ func NewExtension() *Extension { // NewExtensionWithDefaults instantiates a new Extension 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 NewExtensionWithDefaults() *Extension { this := Extension{} return &this } // GetAcl returns the Acl 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 *Extension) GetAcl() (res ExtensionGetAclRetType) { res, _ = o.GetAclOk() return @@ -109,22 +135,26 @@ func (o *Extension) GetAcl() (res ExtensionGetAclRetType) { // GetAclOk returns a tuple with the Acl 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 *Extension) GetAclOk() (ret ExtensionGetAclRetType, ok bool) { return getExtensionGetAclAttributeTypeOk(o.Acl) } // HasAcl 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 *Extension) HasAcl() bool { _, ok := o.GetAclOk() return ok } // SetAcl gets a reference to the given ACL and assigns it to the Acl field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Extension) SetAcl(v ExtensionGetAclRetType) { setExtensionGetAclAttributeType(&o.Acl, v) } // GetDns returns the Dns 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 *Extension) GetDns() (res ExtensionGetDnsRetType) { res, _ = o.GetDnsOk() return @@ -132,22 +162,26 @@ func (o *Extension) GetDns() (res ExtensionGetDnsRetType) { // GetDnsOk returns a tuple with the Dns 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 *Extension) GetDnsOk() (ret ExtensionGetDnsRetType, ok bool) { return getExtensionGetDnsAttributeTypeOk(o.Dns) } // HasDns 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 *Extension) HasDns() bool { _, ok := o.GetDnsOk() return ok } // SetDns gets a reference to the given DNS and assigns it to the Dns field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Extension) SetDns(v ExtensionGetDnsRetType) { setExtensionGetDnsAttributeType(&o.Dns, v) } // GetObservability returns the Observability 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 *Extension) GetObservability() (res ExtensionGetObservabilityRetType) { res, _ = o.GetObservabilityOk() return @@ -155,21 +189,25 @@ func (o *Extension) GetObservability() (res ExtensionGetObservabilityRetType) { // GetObservabilityOk returns a tuple with the Observability 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 *Extension) GetObservabilityOk() (ret ExtensionGetObservabilityRetType, ok bool) { return getExtensionGetObservabilityAttributeTypeOk(o.Observability) } // HasObservability 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 *Extension) HasObservability() bool { _, ok := o.GetObservabilityOk() return ok } // SetObservability gets a reference to the given Observability and assigns it to the Observability field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Extension) SetObservability(v ExtensionGetObservabilityRetType) { setExtensionGetObservabilityAttributeType(&o.Observability, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Extension) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getExtensionGetAclAttributeTypeOk(o.Acl); ok { @@ -184,37 +222,45 @@ func (o Extension) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableExtension struct { value *Extension isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableExtension) Get() *Extension { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableExtension) Set(val *Extension) { 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 NullableExtension) 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 *NullableExtension) 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 NewNullableExtension(val *Extension) *NullableExtension { return &NullableExtension{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 NullableExtension) 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 *NullableExtension) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_get_provider_options_request_version_state.go b/services/ske/model_get_provider_options_request_version_state.go index e83c82cb3..68fe3395a 100644 --- a/services/ske/model_get_provider_options_request_version_state.go +++ b/services/ske/model_get_provider_options_request_version_state.go @@ -8,6 +8,7 @@ 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 ( @@ -16,18 +17,22 @@ import ( ) // GetProviderOptionsRequestVersionState the model 'GetProviderOptionsRequestVersionState' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetProviderOptionsRequestVersionState string // List of GetProviderOptionsRequestVersionState const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead GETPROVIDEROPTIONSREQUESTVERSIONSTATE_SUPPORTED GetProviderOptionsRequestVersionState = "SUPPORTED" ) // All allowed values of GetProviderOptionsRequestVersionState enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedGetProviderOptionsRequestVersionStateEnumValues = []GetProviderOptionsRequestVersionState{ "SUPPORTED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *GetProviderOptionsRequestVersionState) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) @@ -52,6 +57,7 @@ func (v *GetProviderOptionsRequestVersionState) UnmarshalJSON(src []byte) error // NewGetProviderOptionsRequestVersionStateFromValue returns a pointer to a valid GetProviderOptionsRequestVersionState // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetProviderOptionsRequestVersionStateFromValue(v string) (*GetProviderOptionsRequestVersionState, error) { ev := GetProviderOptionsRequestVersionState(v) if ev.IsValid() { @@ -62,6 +68,7 @@ func NewGetProviderOptionsRequestVersionStateFromValue(v string) (*GetProviderOp } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetProviderOptionsRequestVersionState) IsValid() bool { for _, existing := range AllowedGetProviderOptionsRequestVersionStateEnumValues { if existing == v { @@ -72,41 +79,50 @@ func (v GetProviderOptionsRequestVersionState) IsValid() bool { } // Ptr returns reference to GetProviderOptionsRequestVersionState value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetProviderOptionsRequestVersionState) Ptr() *GetProviderOptionsRequestVersionState { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetProviderOptionsRequestVersionState struct { value *GetProviderOptionsRequestVersionState isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetProviderOptionsRequestVersionState) Get() *GetProviderOptionsRequestVersionState { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetProviderOptionsRequestVersionState) Set(val *GetProviderOptionsRequestVersionState) { 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 NullableGetProviderOptionsRequestVersionState) 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 *NullableGetProviderOptionsRequestVersionState) 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 NewNullableGetProviderOptionsRequestVersionState(val *GetProviderOptionsRequestVersionState) *NullableGetProviderOptionsRequestVersionState { return &NullableGetProviderOptionsRequestVersionState{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 NullableGetProviderOptionsRequestVersionState) 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 *NullableGetProviderOptionsRequestVersionState) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_hibernation.go b/services/ske/model_hibernation.go index 5a64a7ce6..644734594 100644 --- a/services/ske/model_hibernation.go +++ b/services/ske/model_hibernation.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Hibernation{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationGetSchedulesAttributeType = *[]HibernationSchedule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationGetSchedulesArgType = []HibernationSchedule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationGetSchedulesRetType = []HibernationSchedule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHibernationGetSchedulesAttributeTypeOk(arg HibernationGetSchedulesAttributeType) (ret HibernationGetSchedulesRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getHibernationGetSchedulesAttributeTypeOk(arg HibernationGetSchedulesAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHibernationGetSchedulesAttributeType(arg *HibernationGetSchedulesAttributeType, val HibernationGetSchedulesRetType) { *arg = &val } // Hibernation struct for Hibernation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Hibernation struct { // REQUIRED Schedules HibernationGetSchedulesAttributeType `json:"schedules" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Hibernation Hibernation // NewHibernation instantiates a new Hibernation 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 NewHibernation(schedules HibernationGetSchedulesArgType) *Hibernation { this := Hibernation{} setHibernationGetSchedulesAttributeType(&this.Schedules, schedules) @@ -58,12 +69,14 @@ func NewHibernation(schedules HibernationGetSchedulesArgType) *Hibernation { // NewHibernationWithDefaults instantiates a new Hibernation 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 NewHibernationWithDefaults() *Hibernation { this := Hibernation{} return &this } // GetSchedules returns the Schedules field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Hibernation) GetSchedules() (ret HibernationGetSchedulesRetType) { ret, _ = o.GetSchedulesOk() return ret @@ -71,15 +84,18 @@ func (o *Hibernation) GetSchedules() (ret HibernationGetSchedulesRetType) { // GetSchedulesOk returns a tuple with the Schedules field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Hibernation) GetSchedulesOk() (ret HibernationGetSchedulesRetType, ok bool) { return getHibernationGetSchedulesAttributeTypeOk(o.Schedules) } // SetSchedules sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Hibernation) SetSchedules(v HibernationGetSchedulesRetType) { setHibernationGetSchedulesAttributeType(&o.Schedules, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Hibernation) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getHibernationGetSchedulesAttributeTypeOk(o.Schedules); ok { @@ -88,37 +104,45 @@ func (o Hibernation) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableHibernation struct { value *Hibernation isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableHibernation) Get() *Hibernation { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableHibernation) Set(val *Hibernation) { 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 NullableHibernation) 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 *NullableHibernation) 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 NewNullableHibernation(val *Hibernation) *NullableHibernation { return &NullableHibernation{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 NullableHibernation) 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 *NullableHibernation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_hibernation_schedule.go b/services/ske/model_hibernation_schedule.go index b13cb69e3..777e7e5a7 100644 --- a/services/ske/model_hibernation_schedule.go +++ b/services/ske/model_hibernation_schedule.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &HibernationSchedule{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetEndAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHibernationScheduleGetEndAttributeTypeOk(arg HibernationScheduleGetEndAttributeType) (ret HibernationScheduleGetEndRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getHibernationScheduleGetEndAttributeTypeOk(arg HibernationScheduleGetEndAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHibernationScheduleGetEndAttributeType(arg *HibernationScheduleGetEndAttributeType, val HibernationScheduleGetEndRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetEndArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetEndRetType = string /* @@ -43,8 +50,10 @@ type HibernationScheduleGetEndRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetStartAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHibernationScheduleGetStartAttributeTypeOk(arg HibernationScheduleGetStartAttributeType) (ret HibernationScheduleGetStartRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getHibernationScheduleGetStartAttributeTypeOk(arg HibernationScheduleGetSta return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHibernationScheduleGetStartAttributeType(arg *HibernationScheduleGetStartAttributeType, val HibernationScheduleGetStartRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetStartArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetStartRetType = string /* @@ -64,8 +77,10 @@ type HibernationScheduleGetStartRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetTimezoneAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHibernationScheduleGetTimezoneAttributeTypeOk(arg HibernationScheduleGetTimezoneAttributeType) (ret HibernationScheduleGetTimezoneRetType, ok bool) { if arg == nil { return ret, false @@ -73,14 +88,19 @@ func getHibernationScheduleGetTimezoneAttributeTypeOk(arg HibernationScheduleGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHibernationScheduleGetTimezoneAttributeType(arg *HibernationScheduleGetTimezoneAttributeType, val HibernationScheduleGetTimezoneRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetTimezoneArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationScheduleGetTimezoneRetType = string // HibernationSchedule struct for HibernationSchedule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HibernationSchedule struct { // REQUIRED End HibernationScheduleGetEndAttributeType `json:"end" required:"true"` @@ -89,12 +109,14 @@ type HibernationSchedule struct { Timezone HibernationScheduleGetTimezoneAttributeType `json:"timezone,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _HibernationSchedule HibernationSchedule // NewHibernationSchedule instantiates a new HibernationSchedule 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 NewHibernationSchedule(end HibernationScheduleGetEndArgType, start HibernationScheduleGetStartArgType) *HibernationSchedule { this := HibernationSchedule{} setHibernationScheduleGetEndAttributeType(&this.End, end) @@ -105,12 +127,14 @@ func NewHibernationSchedule(end HibernationScheduleGetEndArgType, start Hibernat // NewHibernationScheduleWithDefaults instantiates a new HibernationSchedule 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 NewHibernationScheduleWithDefaults() *HibernationSchedule { this := HibernationSchedule{} return &this } // GetEnd returns the End field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) GetEnd() (ret HibernationScheduleGetEndRetType) { ret, _ = o.GetEndOk() return ret @@ -118,16 +142,19 @@ func (o *HibernationSchedule) GetEnd() (ret HibernationScheduleGetEndRetType) { // GetEndOk returns a tuple with the End field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) GetEndOk() (ret HibernationScheduleGetEndRetType, ok bool) { return getHibernationScheduleGetEndAttributeTypeOk(o.End) } // SetEnd sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) SetEnd(v HibernationScheduleGetEndRetType) { setHibernationScheduleGetEndAttributeType(&o.End, v) } // GetStart returns the Start field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) GetStart() (ret HibernationScheduleGetStartRetType) { ret, _ = o.GetStartOk() return ret @@ -135,16 +162,19 @@ func (o *HibernationSchedule) GetStart() (ret HibernationScheduleGetStartRetType // GetStartOk returns a tuple with the Start field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) GetStartOk() (ret HibernationScheduleGetStartRetType, ok bool) { return getHibernationScheduleGetStartAttributeTypeOk(o.Start) } // SetStart sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) SetStart(v HibernationScheduleGetStartRetType) { setHibernationScheduleGetStartAttributeType(&o.Start, v) } // GetTimezone returns the Timezone 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 *HibernationSchedule) GetTimezone() (res HibernationScheduleGetTimezoneRetType) { res, _ = o.GetTimezoneOk() return @@ -152,21 +182,25 @@ func (o *HibernationSchedule) GetTimezone() (res HibernationScheduleGetTimezoneR // GetTimezoneOk returns a tuple with the Timezone 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 *HibernationSchedule) GetTimezoneOk() (ret HibernationScheduleGetTimezoneRetType, ok bool) { return getHibernationScheduleGetTimezoneAttributeTypeOk(o.Timezone) } // HasTimezone 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 *HibernationSchedule) HasTimezone() bool { _, ok := o.GetTimezoneOk() return ok } // SetTimezone gets a reference to the given string and assigns it to the Timezone field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HibernationSchedule) SetTimezone(v HibernationScheduleGetTimezoneRetType) { setHibernationScheduleGetTimezoneAttributeType(&o.Timezone, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o HibernationSchedule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getHibernationScheduleGetEndAttributeTypeOk(o.End); ok { @@ -181,37 +215,45 @@ func (o HibernationSchedule) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableHibernationSchedule struct { value *HibernationSchedule isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableHibernationSchedule) Get() *HibernationSchedule { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableHibernationSchedule) Set(val *HibernationSchedule) { 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 NullableHibernationSchedule) 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 *NullableHibernationSchedule) 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 NewNullableHibernationSchedule(val *HibernationSchedule) *NullableHibernationSchedule { return &NullableHibernationSchedule{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 NullableHibernationSchedule) 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 *NullableHibernationSchedule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_idp.go b/services/ske/model_idp.go index 7cbc6f8b9..9cdb6ba72 100644 --- a/services/ske/model_idp.go +++ b/services/ske/model_idp.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &IDP{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDPgetEnabledAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDPgetEnabledArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDPgetEnabledRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getIDPgetEnabledAttributeTypeOk(arg IDPgetEnabledAttributeType) (ret IDPgetEnabledRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getIDPgetEnabledAttributeTypeOk(arg IDPgetEnabledAttributeType) (ret IDPget return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setIDPgetEnabledAttributeType(arg *IDPgetEnabledAttributeType, val IDPgetEnabledRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setIDPgetEnabledAttributeType(arg *IDPgetEnabledAttributeType, val IDPgetEn */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDPGetTypeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getIDPGetTypeAttributeTypeOk(arg IDPGetTypeAttributeType) (ret IDPGetTypeRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getIDPGetTypeAttributeTypeOk(arg IDPGetTypeAttributeType) (ret IDPGetTypeRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setIDPGetTypeAttributeType(arg *IDPGetTypeAttributeType, val IDPGetTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDPGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDPGetTypeRetType = string // IDP struct for IDP +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type IDP struct { // Enable IDP integration for the cluster. // REQUIRED @@ -68,12 +83,14 @@ type IDP struct { Type IDPGetTypeAttributeType `json:"type" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _IDP IDP // NewIDP instantiates a new IDP 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 NewIDP(enabled IDPgetEnabledArgType, types IDPGetTypeArgType) *IDP { this := IDP{} setIDPgetEnabledAttributeType(&this.Enabled, enabled) @@ -84,12 +101,14 @@ func NewIDP(enabled IDPgetEnabledArgType, types IDPGetTypeArgType) *IDP { // NewIDPWithDefaults instantiates a new IDP 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 NewIDPWithDefaults() *IDP { this := IDP{} return &this } // GetEnabled returns the Enabled field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *IDP) GetEnabled() (ret IDPgetEnabledRetType) { ret, _ = o.GetEnabledOk() return ret @@ -97,16 +116,19 @@ func (o *IDP) GetEnabled() (ret IDPgetEnabledRetType) { // GetEnabledOk returns a tuple with the Enabled field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *IDP) GetEnabledOk() (ret IDPgetEnabledRetType, ok bool) { return getIDPgetEnabledAttributeTypeOk(o.Enabled) } // SetEnabled sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *IDP) SetEnabled(v IDPgetEnabledRetType) { setIDPgetEnabledAttributeType(&o.Enabled, v) } // GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *IDP) GetType() (ret IDPGetTypeRetType) { ret, _ = o.GetTypeOk() return ret @@ -114,15 +136,18 @@ func (o *IDP) GetType() (ret IDPGetTypeRetType) { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *IDP) GetTypeOk() (ret IDPGetTypeRetType, ok bool) { return getIDPGetTypeAttributeTypeOk(o.Type) } // SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *IDP) SetType(v IDPGetTypeRetType) { setIDPGetTypeAttributeType(&o.Type, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o IDP) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getIDPgetEnabledAttributeTypeOk(o.Enabled); ok { @@ -134,37 +159,45 @@ func (o IDP) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableIDP struct { value *IDP isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableIDP) Get() *IDP { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableIDP) Set(val *IDP) { 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 NullableIDP) 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 *NullableIDP) 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 NewNullableIDP(val *IDP) *NullableIDP { return &NullableIDP{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 NullableIDP) 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 *NullableIDP) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_image.go b/services/ske/model_image.go index 4c5795679..ce10da7de 100644 --- a/services/ske/model_image.go +++ b/services/ske/model_image.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Image{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getImageGetNameAttributeTypeOk(arg ImageGetNameAttributeType) (ret ImageGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getImageGetNameAttributeTypeOk(arg ImageGetNameAttributeType) (ret ImageGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setImageGetNameAttributeType(arg *ImageGetNameAttributeType, val ImageGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageGetNameRetType = string /* @@ -43,8 +50,10 @@ type ImageGetNameRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getImageGetVersionAttributeTypeOk(arg ImageGetVersionAttributeType) (ret ImageGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getImageGetVersionAttributeTypeOk(arg ImageGetVersionAttributeType) (ret Im return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setImageGetVersionAttributeType(arg *ImageGetVersionAttributeType, val ImageGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ImageGetVersionRetType = string // Image For valid names and versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `machineImages`. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Image struct { // REQUIRED Name ImageGetNameAttributeType `json:"name" required:"true"` @@ -67,12 +81,14 @@ type Image struct { Version ImageGetVersionAttributeType `json:"version" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Image Image // NewImage instantiates a new Image 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 NewImage(name ImageGetNameArgType, version ImageGetVersionArgType) *Image { this := Image{} setImageGetNameAttributeType(&this.Name, name) @@ -83,12 +99,14 @@ func NewImage(name ImageGetNameArgType, version ImageGetVersionArgType) *Image { // NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image { this := Image{} return &this } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Image) GetName() (ret ImageGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -96,16 +114,19 @@ func (o *Image) GetName() (ret ImageGetNameRetType) { // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Image) GetNameOk() (ret ImageGetNameRetType, ok bool) { return getImageGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Image) SetName(v ImageGetNameRetType) { setImageGetNameAttributeType(&o.Name, v) } // GetVersion returns the Version field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Image) GetVersion() (ret ImageGetVersionRetType) { ret, _ = o.GetVersionOk() return ret @@ -113,15 +134,18 @@ func (o *Image) GetVersion() (ret ImageGetVersionRetType) { // GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Image) GetVersionOk() (ret ImageGetVersionRetType, ok bool) { return getImageGetVersionAttributeTypeOk(o.Version) } // SetVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Image) SetVersion(v ImageGetVersionRetType) { setImageGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Image) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getImageGetNameAttributeTypeOk(o.Name); ok { @@ -133,37 +157,45 @@ func (o Image) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableImage struct { value *Image isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableImage) Get() *Image { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableImage) Set(val *Image) { 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 NullableImage) 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 *NullableImage) 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 NewNullableImage(val *Image) *NullableImage { return &NullableImage{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 NullableImage) 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 *NullableImage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_kubeconfig.go b/services/ske/model_kubeconfig.go index 56b2ad313..f62091853 100644 --- a/services/ske/model_kubeconfig.go +++ b/services/ske/model_kubeconfig.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &Kubeconfig{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetExpirationTimestampAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetExpirationTimestampArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetExpirationTimestampRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubeconfigGetExpirationTimestampAttributeTypeOk(arg KubeconfigGetExpirationTimestampAttributeType) (ret KubeconfigGetExpirationTimestampRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getKubeconfigGetExpirationTimestampAttributeTypeOk(arg KubeconfigGetExpirat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubeconfigGetExpirationTimestampAttributeType(arg *KubeconfigGetExpirationTimestampAttributeType, val KubeconfigGetExpirationTimestampRetType) { *arg = &val } @@ -43,8 +51,10 @@ func setKubeconfigGetExpirationTimestampAttributeType(arg *KubeconfigGetExpirati */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetKubeconfigAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubeconfigGetKubeconfigAttributeTypeOk(arg KubeconfigGetKubeconfigAttributeType) (ret KubeconfigGetKubeconfigRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +62,19 @@ func getKubeconfigGetKubeconfigAttributeTypeOk(arg KubeconfigGetKubeconfigAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubeconfigGetKubeconfigAttributeType(arg *KubeconfigGetKubeconfigAttributeType, val KubeconfigGetKubeconfigRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetKubeconfigArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetKubeconfigRetType = string // Kubeconfig struct for Kubeconfig +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Kubeconfig struct { ExpirationTimestamp KubeconfigGetExpirationTimestampAttributeType `json:"expirationTimestamp,omitempty"` Kubeconfig KubeconfigGetKubeconfigAttributeType `json:"kubeconfig,omitempty"` @@ -69,6 +84,7 @@ type Kubeconfig struct { // 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 NewKubeconfig() *Kubeconfig { this := Kubeconfig{} return &this @@ -77,12 +93,14 @@ func NewKubeconfig() *Kubeconfig { // NewKubeconfigWithDefaults instantiates a new Kubeconfig 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 NewKubeconfigWithDefaults() *Kubeconfig { this := Kubeconfig{} return &this } // GetExpirationTimestamp returns the ExpirationTimestamp 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 *Kubeconfig) GetExpirationTimestamp() (res KubeconfigGetExpirationTimestampRetType) { res, _ = o.GetExpirationTimestampOk() return @@ -90,22 +108,26 @@ func (o *Kubeconfig) GetExpirationTimestamp() (res KubeconfigGetExpirationTimest // GetExpirationTimestampOk returns a tuple with the ExpirationTimestamp 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 *Kubeconfig) GetExpirationTimestampOk() (ret KubeconfigGetExpirationTimestampRetType, ok bool) { return getKubeconfigGetExpirationTimestampAttributeTypeOk(o.ExpirationTimestamp) } // HasExpirationTimestamp 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 *Kubeconfig) HasExpirationTimestamp() bool { _, ok := o.GetExpirationTimestampOk() return ok } // SetExpirationTimestamp gets a reference to the given time.Time and assigns it to the ExpirationTimestamp field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Kubeconfig) SetExpirationTimestamp(v KubeconfigGetExpirationTimestampRetType) { setKubeconfigGetExpirationTimestampAttributeType(&o.ExpirationTimestamp, v) } // 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 *Kubeconfig) GetKubeconfig() (res KubeconfigGetKubeconfigRetType) { res, _ = o.GetKubeconfigOk() return @@ -113,21 +135,25 @@ func (o *Kubeconfig) GetKubeconfig() (res KubeconfigGetKubeconfigRetType) { // 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 *Kubeconfig) GetKubeconfigOk() (ret KubeconfigGetKubeconfigRetType, ok bool) { return getKubeconfigGetKubeconfigAttributeTypeOk(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 *Kubeconfig) 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 *Kubeconfig) SetKubeconfig(v KubeconfigGetKubeconfigRetType) { setKubeconfigGetKubeconfigAttributeType(&o.Kubeconfig, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Kubeconfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getKubeconfigGetExpirationTimestampAttributeTypeOk(o.ExpirationTimestamp); ok { @@ -139,37 +165,45 @@ func (o Kubeconfig) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableKubeconfig struct { value *Kubeconfig isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableKubeconfig) Get() *Kubeconfig { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableKubeconfig) Set(val *Kubeconfig) { 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 NullableKubeconfig) 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 *NullableKubeconfig) 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 NewNullableKubeconfig(val *Kubeconfig) *NullableKubeconfig { return &NullableKubeconfig{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 NullableKubeconfig) 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 *NullableKubeconfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_kubernetes.go b/services/ske/model_kubernetes.go index 52e5d62ee..5a70c3a77 100644 --- a/services/ske/model_kubernetes.go +++ b/services/ske/model_kubernetes.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Kubernetes{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubernetesGetVersionAttributeTypeOk(arg KubernetesGetVersionAttributeType) (ret KubernetesGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -31,25 +34,32 @@ func getKubernetesGetVersionAttributeTypeOk(arg KubernetesGetVersionAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubernetesGetVersionAttributeType(arg *KubernetesGetVersionAttributeType, val KubernetesGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesGetVersionRetType = string // Kubernetes For valid versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `kubernetesVersions`. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Kubernetes struct { // REQUIRED Version KubernetesGetVersionAttributeType `json:"version" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Kubernetes Kubernetes // NewKubernetes instantiates a new Kubernetes 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 NewKubernetes(version KubernetesGetVersionArgType) *Kubernetes { this := Kubernetes{} setKubernetesGetVersionAttributeType(&this.Version, version) @@ -59,12 +69,14 @@ func NewKubernetes(version KubernetesGetVersionArgType) *Kubernetes { // NewKubernetesWithDefaults instantiates a new Kubernetes 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 NewKubernetesWithDefaults() *Kubernetes { this := Kubernetes{} return &this } // GetVersion returns the Version field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Kubernetes) GetVersion() (ret KubernetesGetVersionRetType) { ret, _ = o.GetVersionOk() return ret @@ -72,15 +84,18 @@ func (o *Kubernetes) GetVersion() (ret KubernetesGetVersionRetType) { // GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Kubernetes) GetVersionOk() (ret KubernetesGetVersionRetType, ok bool) { return getKubernetesGetVersionAttributeTypeOk(o.Version) } // SetVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Kubernetes) SetVersion(v KubernetesGetVersionRetType) { setKubernetesGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Kubernetes) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getKubernetesGetVersionAttributeTypeOk(o.Version); ok { @@ -89,37 +104,45 @@ func (o Kubernetes) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableKubernetes struct { value *Kubernetes isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableKubernetes) Get() *Kubernetes { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableKubernetes) Set(val *Kubernetes) { 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 NullableKubernetes) 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 *NullableKubernetes) 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 NewNullableKubernetes(val *Kubernetes) *NullableKubernetes { return &NullableKubernetes{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 NullableKubernetes) 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 *NullableKubernetes) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_kubernetes_version.go b/services/ske/model_kubernetes_version.go index 4fe6e3b34..94d3d4431 100644 --- a/services/ske/model_kubernetes_version.go +++ b/services/ske/model_kubernetes_version.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &KubernetesVersion{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetExpirationDateAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetExpirationDateArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetExpirationDateRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubernetesVersionGetExpirationDateAttributeTypeOk(arg KubernetesVersionGetExpirationDateAttributeType) (ret KubernetesVersionGetExpirationDateRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getKubernetesVersionGetExpirationDateAttributeTypeOk(arg KubernetesVersionG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubernetesVersionGetExpirationDateAttributeType(arg *KubernetesVersionGetExpirationDateAttributeType, val KubernetesVersionGetExpirationDateRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setKubernetesVersionGetExpirationDateAttributeType(arg *KubernetesVersionGe */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetFeatureGatesAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetFeatureGatesArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetFeatureGatesRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubernetesVersionGetFeatureGatesAttributeTypeOk(arg KubernetesVersionGetFeatureGatesAttributeType) (ret KubernetesVersionGetFeatureGatesRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +68,7 @@ func getKubernetesVersionGetFeatureGatesAttributeTypeOk(arg KubernetesVersionGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubernetesVersionGetFeatureGatesAttributeType(arg *KubernetesVersionGetFeatureGatesAttributeType, val KubernetesVersionGetFeatureGatesRetType) { *arg = &val } @@ -63,8 +78,10 @@ func setKubernetesVersionGetFeatureGatesAttributeType(arg *KubernetesVersionGetF */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubernetesVersionGetStateAttributeTypeOk(arg KubernetesVersionGetStateAttributeType) (ret KubernetesVersionGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getKubernetesVersionGetStateAttributeTypeOk(arg KubernetesVersionGetStateAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubernetesVersionGetStateAttributeType(arg *KubernetesVersionGetStateAttributeType, val KubernetesVersionGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetStateRetType = string /* @@ -84,8 +105,10 @@ type KubernetesVersionGetStateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKubernetesVersionGetVersionAttributeTypeOk(arg KubernetesVersionGetVersionAttributeType) (ret KubernetesVersionGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -93,14 +116,19 @@ func getKubernetesVersionGetVersionAttributeTypeOk(arg KubernetesVersionGetVersi return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKubernetesVersionGetVersionAttributeType(arg *KubernetesVersionGetVersionAttributeType, val KubernetesVersionGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersionGetVersionRetType = string // KubernetesVersion struct for KubernetesVersion +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubernetesVersion struct { ExpirationDate KubernetesVersionGetExpirationDateAttributeType `json:"expirationDate,omitempty"` FeatureGates KubernetesVersionGetFeatureGatesAttributeType `json:"featureGates,omitempty"` @@ -112,6 +140,7 @@ type KubernetesVersion struct { // 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 NewKubernetesVersion() *KubernetesVersion { this := KubernetesVersion{} return &this @@ -120,12 +149,14 @@ func NewKubernetesVersion() *KubernetesVersion { // NewKubernetesVersionWithDefaults instantiates a new KubernetesVersion 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 NewKubernetesVersionWithDefaults() *KubernetesVersion { this := KubernetesVersion{} return &this } // GetExpirationDate returns the ExpirationDate 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 *KubernetesVersion) GetExpirationDate() (res KubernetesVersionGetExpirationDateRetType) { res, _ = o.GetExpirationDateOk() return @@ -133,22 +164,26 @@ func (o *KubernetesVersion) GetExpirationDate() (res KubernetesVersionGetExpirat // GetExpirationDateOk returns a tuple with the ExpirationDate 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 *KubernetesVersion) GetExpirationDateOk() (ret KubernetesVersionGetExpirationDateRetType, ok bool) { return getKubernetesVersionGetExpirationDateAttributeTypeOk(o.ExpirationDate) } // HasExpirationDate 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 *KubernetesVersion) HasExpirationDate() bool { _, ok := o.GetExpirationDateOk() return ok } // SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KubernetesVersion) SetExpirationDate(v KubernetesVersionGetExpirationDateRetType) { setKubernetesVersionGetExpirationDateAttributeType(&o.ExpirationDate, v) } // GetFeatureGates returns the FeatureGates 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 *KubernetesVersion) GetFeatureGates() (res KubernetesVersionGetFeatureGatesRetType) { res, _ = o.GetFeatureGatesOk() return @@ -156,22 +191,26 @@ func (o *KubernetesVersion) GetFeatureGates() (res KubernetesVersionGetFeatureGa // GetFeatureGatesOk returns a tuple with the FeatureGates 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 *KubernetesVersion) GetFeatureGatesOk() (ret KubernetesVersionGetFeatureGatesRetType, ok bool) { return getKubernetesVersionGetFeatureGatesAttributeTypeOk(o.FeatureGates) } // HasFeatureGates 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 *KubernetesVersion) HasFeatureGates() bool { _, ok := o.GetFeatureGatesOk() return ok } // SetFeatureGates gets a reference to the given map[string]string and assigns it to the FeatureGates field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KubernetesVersion) SetFeatureGates(v KubernetesVersionGetFeatureGatesRetType) { setKubernetesVersionGetFeatureGatesAttributeType(&o.FeatureGates, v) } // GetState returns the State 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 *KubernetesVersion) GetState() (res KubernetesVersionGetStateRetType) { res, _ = o.GetStateOk() return @@ -179,22 +218,26 @@ func (o *KubernetesVersion) GetState() (res KubernetesVersionGetStateRetType) { // GetStateOk returns a tuple with the State 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 *KubernetesVersion) GetStateOk() (ret KubernetesVersionGetStateRetType, ok bool) { return getKubernetesVersionGetStateAttributeTypeOk(o.State) } // HasState 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 *KubernetesVersion) HasState() bool { _, ok := o.GetStateOk() return ok } // SetState gets a reference to the given string and assigns it to the State field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KubernetesVersion) SetState(v KubernetesVersionGetStateRetType) { setKubernetesVersionGetStateAttributeType(&o.State, v) } // GetVersion returns the Version 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 *KubernetesVersion) GetVersion() (res KubernetesVersionGetVersionRetType) { res, _ = o.GetVersionOk() return @@ -202,21 +245,25 @@ func (o *KubernetesVersion) GetVersion() (res KubernetesVersionGetVersionRetType // GetVersionOk returns a tuple with the Version 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 *KubernetesVersion) GetVersionOk() (ret KubernetesVersionGetVersionRetType, ok bool) { return getKubernetesVersionGetVersionAttributeTypeOk(o.Version) } // HasVersion 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 *KubernetesVersion) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KubernetesVersion) SetVersion(v KubernetesVersionGetVersionRetType) { setKubernetesVersionGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o KubernetesVersion) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getKubernetesVersionGetExpirationDateAttributeTypeOk(o.ExpirationDate); ok { @@ -234,37 +281,45 @@ func (o KubernetesVersion) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableKubernetesVersion struct { value *KubernetesVersion isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableKubernetesVersion) Get() *KubernetesVersion { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableKubernetesVersion) Set(val *KubernetesVersion) { 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 NullableKubernetesVersion) 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 *NullableKubernetesVersion) 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 NewNullableKubernetesVersion(val *KubernetesVersion) *NullableKubernetesVersion { return &NullableKubernetesVersion{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 NullableKubernetesVersion) 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 *NullableKubernetesVersion) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_list_clusters_response.go b/services/ske/model_list_clusters_response.go index fcc41eaec..d69c9756a 100644 --- a/services/ske/model_list_clusters_response.go +++ b/services/ske/model_list_clusters_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListClustersResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListClustersResponseGetItemsAttributeType = *[]Cluster + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListClustersResponseGetItemsArgType = []Cluster + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListClustersResponseGetItemsRetType = []Cluster +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListClustersResponseGetItemsAttributeTypeOk(arg ListClustersResponseGetItemsAttributeType) (ret ListClustersResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListClustersResponseGetItemsAttributeTypeOk(arg ListClustersResponseGetI return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListClustersResponseGetItemsAttributeType(arg *ListClustersResponseGetItemsAttributeType, val ListClustersResponseGetItemsRetType) { *arg = &val } // ListClustersResponse struct for ListClustersResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListClustersResponse struct { Items ListClustersResponseGetItemsAttributeType `json:"items,omitempty"` } @@ -46,6 +55,7 @@ type ListClustersResponse struct { // 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 NewListClustersResponse() *ListClustersResponse { this := ListClustersResponse{} return &this @@ -54,12 +64,14 @@ func NewListClustersResponse() *ListClustersResponse { // NewListClustersResponseWithDefaults instantiates a new ListClustersResponse 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 NewListClustersResponseWithDefaults() *ListClustersResponse { this := ListClustersResponse{} return &this } // GetItems returns the Items 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 *ListClustersResponse) GetItems() (res ListClustersResponseGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -67,21 +79,25 @@ func (o *ListClustersResponse) GetItems() (res ListClustersResponseGetItemsRetTy // GetItemsOk returns a tuple with the Items 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 *ListClustersResponse) GetItemsOk() (ret ListClustersResponseGetItemsRetType, ok bool) { return getListClustersResponseGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *ListClustersResponse) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []Cluster and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListClustersResponse) SetItems(v ListClustersResponseGetItemsRetType) { setListClustersResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListClustersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListClustersResponseGetItemsAttributeTypeOk(o.Items); ok { @@ -90,37 +106,45 @@ func (o ListClustersResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListClustersResponse struct { value *ListClustersResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListClustersResponse) Get() *ListClustersResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListClustersResponse) Set(val *ListClustersResponse) { 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 NullableListClustersResponse) 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 *NullableListClustersResponse) 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 NewNullableListClustersResponse(val *ListClustersResponse) *NullableListClustersResponse { return &NullableListClustersResponse{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 NullableListClustersResponse) 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 *NullableListClustersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_login_kubeconfig.go b/services/ske/model_login_kubeconfig.go index 4187d0993..ec0cc37ed 100644 --- a/services/ske/model_login_kubeconfig.go +++ b/services/ske/model_login_kubeconfig.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &LoginKubeconfig{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type LoginKubeconfigGetKubeconfigAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getLoginKubeconfigGetKubeconfigAttributeTypeOk(arg LoginKubeconfigGetKubeconfigAttributeType) (ret LoginKubeconfigGetKubeconfigRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getLoginKubeconfigGetKubeconfigAttributeTypeOk(arg LoginKubeconfigGetKubeco return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setLoginKubeconfigGetKubeconfigAttributeType(arg *LoginKubeconfigGetKubeconfigAttributeType, val LoginKubeconfigGetKubeconfigRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type LoginKubeconfigGetKubeconfigArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type LoginKubeconfigGetKubeconfigRetType = string // LoginKubeconfig struct for LoginKubeconfig +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type LoginKubeconfig struct { Kubeconfig LoginKubeconfigGetKubeconfigAttributeType `json:"kubeconfig,omitempty"` } @@ -47,6 +55,7 @@ type LoginKubeconfig struct { // 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 NewLoginKubeconfig() *LoginKubeconfig { this := LoginKubeconfig{} return &this @@ -55,12 +64,14 @@ func NewLoginKubeconfig() *LoginKubeconfig { // NewLoginKubeconfigWithDefaults instantiates a new LoginKubeconfig 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 NewLoginKubeconfigWithDefaults() *LoginKubeconfig { this := LoginKubeconfig{} 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 *LoginKubeconfig) GetKubeconfig() (res LoginKubeconfigGetKubeconfigRetType) { res, _ = o.GetKubeconfigOk() return @@ -68,21 +79,25 @@ func (o *LoginKubeconfig) GetKubeconfig() (res LoginKubeconfigGetKubeconfigRetTy // 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 *LoginKubeconfig) GetKubeconfigOk() (ret LoginKubeconfigGetKubeconfigRetType, ok bool) { return getLoginKubeconfigGetKubeconfigAttributeTypeOk(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 *LoginKubeconfig) 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 *LoginKubeconfig) SetKubeconfig(v LoginKubeconfigGetKubeconfigRetType) { setLoginKubeconfigGetKubeconfigAttributeType(&o.Kubeconfig, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o LoginKubeconfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getLoginKubeconfigGetKubeconfigAttributeTypeOk(o.Kubeconfig); ok { @@ -91,37 +106,45 @@ func (o LoginKubeconfig) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableLoginKubeconfig struct { value *LoginKubeconfig isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableLoginKubeconfig) Get() *LoginKubeconfig { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableLoginKubeconfig) Set(val *LoginKubeconfig) { 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 NullableLoginKubeconfig) 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 *NullableLoginKubeconfig) 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 NewNullableLoginKubeconfig(val *LoginKubeconfig) *NullableLoginKubeconfig { return &NullableLoginKubeconfig{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 NullableLoginKubeconfig) 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 *NullableLoginKubeconfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_machine.go b/services/ske/model_machine.go index b776e4863..20645e837 100644 --- a/services/ske/model_machine.go +++ b/services/ske/model_machine.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Machine{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineGetImageAttributeType = *Image + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineGetImageArgType = Image + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineGetImageRetType = Image +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineGetImageAttributeTypeOk(arg MachineGetImageAttributeType) (ret MachineGetImageRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getMachineGetImageAttributeTypeOk(arg MachineGetImageAttributeType) (ret Ma return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineGetImageAttributeType(arg *MachineGetImageAttributeType, val MachineGetImageRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setMachineGetImageAttributeType(arg *MachineGetImageAttributeType, val Mach */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineGetTypeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineGetTypeAttributeTypeOk(arg MachineGetTypeAttributeType) (ret MachineGetTypeRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getMachineGetTypeAttributeTypeOk(arg MachineGetTypeAttributeType) (ret Mach return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineGetTypeAttributeType(arg *MachineGetTypeAttributeType, val MachineGetTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineGetTypeRetType = string // Machine struct for Machine +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Machine struct { // REQUIRED Image MachineGetImageAttributeType `json:"image" required:"true"` @@ -67,12 +82,14 @@ type Machine struct { Type MachineGetTypeAttributeType `json:"type" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Machine Machine // NewMachine instantiates a new Machine 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 NewMachine(image MachineGetImageArgType, types MachineGetTypeArgType) *Machine { this := Machine{} setMachineGetImageAttributeType(&this.Image, image) @@ -83,12 +100,14 @@ func NewMachine(image MachineGetImageArgType, types MachineGetTypeArgType) *Mach // NewMachineWithDefaults instantiates a new Machine 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 NewMachineWithDefaults() *Machine { this := Machine{} return &this } // GetImage returns the Image field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Machine) GetImage() (ret MachineGetImageRetType) { ret, _ = o.GetImageOk() return ret @@ -96,16 +115,19 @@ func (o *Machine) GetImage() (ret MachineGetImageRetType) { // GetImageOk returns a tuple with the Image field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Machine) GetImageOk() (ret MachineGetImageRetType, ok bool) { return getMachineGetImageAttributeTypeOk(o.Image) } // SetImage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Machine) SetImage(v MachineGetImageRetType) { setMachineGetImageAttributeType(&o.Image, v) } // GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Machine) GetType() (ret MachineGetTypeRetType) { ret, _ = o.GetTypeOk() return ret @@ -113,15 +135,18 @@ func (o *Machine) GetType() (ret MachineGetTypeRetType) { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Machine) GetTypeOk() (ret MachineGetTypeRetType, ok bool) { return getMachineGetTypeAttributeTypeOk(o.Type) } // SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Machine) SetType(v MachineGetTypeRetType) { setMachineGetTypeAttributeType(&o.Type, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Machine) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMachineGetImageAttributeTypeOk(o.Image); ok { @@ -133,37 +158,45 @@ func (o Machine) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableMachine struct { value *Machine isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMachine) Get() *Machine { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMachine) Set(val *Machine) { 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 NullableMachine) 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 *NullableMachine) 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 NewNullableMachine(val *Machine) *NullableMachine { return &NullableMachine{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 NullableMachine) 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 *NullableMachine) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_machine_image.go b/services/ske/model_machine_image.go index 61e43875b..f3199c31f 100644 --- a/services/ske/model_machine_image.go +++ b/services/ske/model_machine_image.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &MachineImage{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineImageGetNameAttributeTypeOk(arg MachineImageGetNameAttributeType) (ret MachineImageGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getMachineImageGetNameAttributeTypeOk(arg MachineImageGetNameAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineImageGetNameAttributeType(arg *MachineImageGetNameAttributeType, val MachineImageGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageGetNameRetType = string /* @@ -43,10 +50,16 @@ type MachineImageGetNameRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageGetVersionsAttributeType = *[]MachineImageVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageGetVersionsArgType = []MachineImageVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageGetVersionsRetType = []MachineImageVersion +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineImageGetVersionsAttributeTypeOk(arg MachineImageGetVersionsAttributeType) (ret MachineImageGetVersionsRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getMachineImageGetVersionsAttributeTypeOk(arg MachineImageGetVersionsAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineImageGetVersionsAttributeType(arg *MachineImageGetVersionsAttributeType, val MachineImageGetVersionsRetType) { *arg = &val } // MachineImage struct for MachineImage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImage struct { Name MachineImageGetNameAttributeType `json:"name,omitempty"` Versions MachineImageGetVersionsAttributeType `json:"versions,omitempty"` @@ -68,6 +83,7 @@ type MachineImage struct { // 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 NewMachineImage() *MachineImage { this := MachineImage{} return &this @@ -76,12 +92,14 @@ func NewMachineImage() *MachineImage { // NewMachineImageWithDefaults instantiates a new MachineImage 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 NewMachineImageWithDefaults() *MachineImage { this := MachineImage{} return &this } // GetName returns the Name 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 *MachineImage) GetName() (res MachineImageGetNameRetType) { res, _ = o.GetNameOk() return @@ -89,22 +107,26 @@ func (o *MachineImage) GetName() (res MachineImageGetNameRetType) { // GetNameOk returns a tuple with the Name 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 *MachineImage) GetNameOk() (ret MachineImageGetNameRetType, ok bool) { return getMachineImageGetNameAttributeTypeOk(o.Name) } // HasName 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 *MachineImage) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineImage) SetName(v MachineImageGetNameRetType) { setMachineImageGetNameAttributeType(&o.Name, v) } // GetVersions returns the Versions 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 *MachineImage) GetVersions() (res MachineImageGetVersionsRetType) { res, _ = o.GetVersionsOk() return @@ -112,21 +134,25 @@ func (o *MachineImage) GetVersions() (res MachineImageGetVersionsRetType) { // GetVersionsOk returns a tuple with the Versions 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 *MachineImage) GetVersionsOk() (ret MachineImageGetVersionsRetType, ok bool) { return getMachineImageGetVersionsAttributeTypeOk(o.Versions) } // HasVersions 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 *MachineImage) HasVersions() bool { _, ok := o.GetVersionsOk() return ok } // SetVersions gets a reference to the given []MachineImageVersion and assigns it to the Versions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineImage) SetVersions(v MachineImageGetVersionsRetType) { setMachineImageGetVersionsAttributeType(&o.Versions, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MachineImage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMachineImageGetNameAttributeTypeOk(o.Name); ok { @@ -138,37 +164,45 @@ func (o MachineImage) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableMachineImage struct { value *MachineImage isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMachineImage) Get() *MachineImage { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMachineImage) Set(val *MachineImage) { 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 NullableMachineImage) 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 *NullableMachineImage) 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 NewNullableMachineImage(val *MachineImage) *NullableMachineImage { return &NullableMachineImage{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 NullableMachineImage) 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 *NullableMachineImage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_machine_image_version.go b/services/ske/model_machine_image_version.go index b9b079ce3..fd2d4d3b6 100644 --- a/services/ske/model_machine_image_version.go +++ b/services/ske/model_machine_image_version.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &MachineImageVersion{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetCriAttributeType = *[]CRI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetCriArgType = []CRI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetCriRetType = []CRI +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineImageVersionGetCriAttributeTypeOk(arg MachineImageVersionGetCriAttributeType) (ret MachineImageVersionGetCriRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getMachineImageVersionGetCriAttributeTypeOk(arg MachineImageVersionGetCriAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineImageVersionGetCriAttributeType(arg *MachineImageVersionGetCriAttributeType, val MachineImageVersionGetCriRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setMachineImageVersionGetCriAttributeType(arg *MachineImageVersionGetCriAtt */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetExpirationDateAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetExpirationDateArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetExpirationDateRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineImageVersionGetExpirationDateAttributeTypeOk(arg MachineImageVersionGetExpirationDateAttributeType) (ret MachineImageVersionGetExpirationDateRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +68,7 @@ func getMachineImageVersionGetExpirationDateAttributeTypeOk(arg MachineImageVers return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineImageVersionGetExpirationDateAttributeType(arg *MachineImageVersionGetExpirationDateAttributeType, val MachineImageVersionGetExpirationDateRetType) { *arg = &val } @@ -63,8 +78,10 @@ func setMachineImageVersionGetExpirationDateAttributeType(arg *MachineImageVersi */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineImageVersionGetStateAttributeTypeOk(arg MachineImageVersionGetStateAttributeType) (ret MachineImageVersionGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getMachineImageVersionGetStateAttributeTypeOk(arg MachineImageVersionGetSta return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineImageVersionGetStateAttributeType(arg *MachineImageVersionGetStateAttributeType, val MachineImageVersionGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetStateRetType = string /* @@ -84,8 +105,10 @@ type MachineImageVersionGetStateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineImageVersionGetVersionAttributeTypeOk(arg MachineImageVersionGetVersionAttributeType) (ret MachineImageVersionGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -93,14 +116,19 @@ func getMachineImageVersionGetVersionAttributeTypeOk(arg MachineImageVersionGetV return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineImageVersionGetVersionAttributeType(arg *MachineImageVersionGetVersionAttributeType, val MachineImageVersionGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersionGetVersionRetType = string // MachineImageVersion struct for MachineImageVersion +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineImageVersion struct { Cri MachineImageVersionGetCriAttributeType `json:"cri,omitempty"` ExpirationDate MachineImageVersionGetExpirationDateAttributeType `json:"expirationDate,omitempty"` @@ -112,6 +140,7 @@ type MachineImageVersion struct { // 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 NewMachineImageVersion() *MachineImageVersion { this := MachineImageVersion{} return &this @@ -120,12 +149,14 @@ func NewMachineImageVersion() *MachineImageVersion { // NewMachineImageVersionWithDefaults instantiates a new MachineImageVersion 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 NewMachineImageVersionWithDefaults() *MachineImageVersion { this := MachineImageVersion{} return &this } // GetCri returns the Cri 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 *MachineImageVersion) GetCri() (res MachineImageVersionGetCriRetType) { res, _ = o.GetCriOk() return @@ -133,22 +164,26 @@ func (o *MachineImageVersion) GetCri() (res MachineImageVersionGetCriRetType) { // GetCriOk returns a tuple with the Cri 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 *MachineImageVersion) GetCriOk() (ret MachineImageVersionGetCriRetType, ok bool) { return getMachineImageVersionGetCriAttributeTypeOk(o.Cri) } // HasCri 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 *MachineImageVersion) HasCri() bool { _, ok := o.GetCriOk() return ok } // SetCri gets a reference to the given []CRI and assigns it to the Cri field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineImageVersion) SetCri(v MachineImageVersionGetCriRetType) { setMachineImageVersionGetCriAttributeType(&o.Cri, v) } // GetExpirationDate returns the ExpirationDate 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 *MachineImageVersion) GetExpirationDate() (res MachineImageVersionGetExpirationDateRetType) { res, _ = o.GetExpirationDateOk() return @@ -156,22 +191,26 @@ func (o *MachineImageVersion) GetExpirationDate() (res MachineImageVersionGetExp // GetExpirationDateOk returns a tuple with the ExpirationDate 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 *MachineImageVersion) GetExpirationDateOk() (ret MachineImageVersionGetExpirationDateRetType, ok bool) { return getMachineImageVersionGetExpirationDateAttributeTypeOk(o.ExpirationDate) } // HasExpirationDate 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 *MachineImageVersion) HasExpirationDate() bool { _, ok := o.GetExpirationDateOk() return ok } // SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineImageVersion) SetExpirationDate(v MachineImageVersionGetExpirationDateRetType) { setMachineImageVersionGetExpirationDateAttributeType(&o.ExpirationDate, v) } // GetState returns the State 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 *MachineImageVersion) GetState() (res MachineImageVersionGetStateRetType) { res, _ = o.GetStateOk() return @@ -179,22 +218,26 @@ func (o *MachineImageVersion) GetState() (res MachineImageVersionGetStateRetType // GetStateOk returns a tuple with the State 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 *MachineImageVersion) GetStateOk() (ret MachineImageVersionGetStateRetType, ok bool) { return getMachineImageVersionGetStateAttributeTypeOk(o.State) } // HasState 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 *MachineImageVersion) HasState() bool { _, ok := o.GetStateOk() return ok } // SetState gets a reference to the given string and assigns it to the State field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineImageVersion) SetState(v MachineImageVersionGetStateRetType) { setMachineImageVersionGetStateAttributeType(&o.State, v) } // GetVersion returns the Version 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 *MachineImageVersion) GetVersion() (res MachineImageVersionGetVersionRetType) { res, _ = o.GetVersionOk() return @@ -202,21 +245,25 @@ func (o *MachineImageVersion) GetVersion() (res MachineImageVersionGetVersionRet // GetVersionOk returns a tuple with the Version 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 *MachineImageVersion) GetVersionOk() (ret MachineImageVersionGetVersionRetType, ok bool) { return getMachineImageVersionGetVersionAttributeTypeOk(o.Version) } // HasVersion 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 *MachineImageVersion) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineImageVersion) SetVersion(v MachineImageVersionGetVersionRetType) { setMachineImageVersionGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MachineImageVersion) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMachineImageVersionGetCriAttributeTypeOk(o.Cri); ok { @@ -234,37 +281,45 @@ func (o MachineImageVersion) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableMachineImageVersion struct { value *MachineImageVersion isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMachineImageVersion) Get() *MachineImageVersion { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMachineImageVersion) Set(val *MachineImageVersion) { 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 NullableMachineImageVersion) 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 *NullableMachineImageVersion) 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 NewNullableMachineImageVersion(val *MachineImageVersion) *NullableMachineImageVersion { return &NullableMachineImageVersion{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 NullableMachineImageVersion) 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 *NullableMachineImageVersion) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_machine_type.go b/services/ske/model_machine_type.go index 1309d5975..2e2e126a4 100644 --- a/services/ske/model_machine_type.go +++ b/services/ske/model_machine_type.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &MachineType{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetArchitectureAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineTypeGetArchitectureAttributeTypeOk(arg MachineTypeGetArchitectureAttributeType) (ret MachineTypeGetArchitectureRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getMachineTypeGetArchitectureAttributeTypeOk(arg MachineTypeGetArchitecture return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineTypeGetArchitectureAttributeType(arg *MachineTypeGetArchitectureAttributeType, val MachineTypeGetArchitectureRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetArchitectureArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetArchitectureRetType = string /* @@ -43,10 +50,16 @@ type MachineTypeGetArchitectureRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetCpuAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetCpuArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetCpuRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineTypeGetCpuAttributeTypeOk(arg MachineTypeGetCpuAttributeType) (ret MachineTypeGetCpuRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getMachineTypeGetCpuAttributeTypeOk(arg MachineTypeGetCpuAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineTypeGetCpuAttributeType(arg *MachineTypeGetCpuAttributeType, val MachineTypeGetCpuRetType) { *arg = &val } @@ -63,10 +77,16 @@ func setMachineTypeGetCpuAttributeType(arg *MachineTypeGetCpuAttributeType, val */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetGpuAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetGpuArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetGpuRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineTypeGetGpuAttributeTypeOk(arg MachineTypeGetGpuAttributeType) (ret MachineTypeGetGpuRetType, ok bool) { if arg == nil { return ret, false @@ -74,6 +94,7 @@ func getMachineTypeGetGpuAttributeTypeOk(arg MachineTypeGetGpuAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineTypeGetGpuAttributeType(arg *MachineTypeGetGpuAttributeType, val MachineTypeGetGpuRetType) { *arg = &val } @@ -83,10 +104,16 @@ func setMachineTypeGetGpuAttributeType(arg *MachineTypeGetGpuAttributeType, val */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetMemoryAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetMemoryArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetMemoryRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineTypeGetMemoryAttributeTypeOk(arg MachineTypeGetMemoryAttributeType) (ret MachineTypeGetMemoryRetType, ok bool) { if arg == nil { return ret, false @@ -94,6 +121,7 @@ func getMachineTypeGetMemoryAttributeTypeOk(arg MachineTypeGetMemoryAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineTypeGetMemoryAttributeType(arg *MachineTypeGetMemoryAttributeType, val MachineTypeGetMemoryRetType) { *arg = &val } @@ -103,8 +131,10 @@ func setMachineTypeGetMemoryAttributeType(arg *MachineTypeGetMemoryAttributeType */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMachineTypeGetNameAttributeTypeOk(arg MachineTypeGetNameAttributeType) (ret MachineTypeGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -112,14 +142,19 @@ func getMachineTypeGetNameAttributeTypeOk(arg MachineTypeGetNameAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMachineTypeGetNameAttributeType(arg *MachineTypeGetNameAttributeType, val MachineTypeGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineTypeGetNameRetType = string // MachineType struct for MachineType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MachineType struct { Architecture MachineTypeGetArchitectureAttributeType `json:"architecture,omitempty"` // Can be cast to int32 without loss of precision. @@ -135,6 +170,7 @@ type MachineType struct { // 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 NewMachineType() *MachineType { this := MachineType{} return &this @@ -143,12 +179,14 @@ func NewMachineType() *MachineType { // NewMachineTypeWithDefaults instantiates a new MachineType 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 NewMachineTypeWithDefaults() *MachineType { this := MachineType{} return &this } // GetArchitecture returns the Architecture 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 *MachineType) GetArchitecture() (res MachineTypeGetArchitectureRetType) { res, _ = o.GetArchitectureOk() return @@ -156,22 +194,26 @@ func (o *MachineType) GetArchitecture() (res MachineTypeGetArchitectureRetType) // GetArchitectureOk returns a tuple with the Architecture 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 *MachineType) GetArchitectureOk() (ret MachineTypeGetArchitectureRetType, ok bool) { return getMachineTypeGetArchitectureAttributeTypeOk(o.Architecture) } // HasArchitecture 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 *MachineType) HasArchitecture() bool { _, ok := o.GetArchitectureOk() return ok } // SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineType) SetArchitecture(v MachineTypeGetArchitectureRetType) { setMachineTypeGetArchitectureAttributeType(&o.Architecture, v) } // GetCpu returns the Cpu 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 *MachineType) GetCpu() (res MachineTypeGetCpuRetType) { res, _ = o.GetCpuOk() return @@ -179,22 +221,26 @@ func (o *MachineType) GetCpu() (res MachineTypeGetCpuRetType) { // GetCpuOk returns a tuple with the Cpu 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 *MachineType) GetCpuOk() (ret MachineTypeGetCpuRetType, ok bool) { return getMachineTypeGetCpuAttributeTypeOk(o.Cpu) } // HasCpu 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 *MachineType) HasCpu() bool { _, ok := o.GetCpuOk() return ok } // SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineType) SetCpu(v MachineTypeGetCpuRetType) { setMachineTypeGetCpuAttributeType(&o.Cpu, v) } // GetGpu returns the Gpu 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 *MachineType) GetGpu() (res MachineTypeGetGpuRetType) { res, _ = o.GetGpuOk() return @@ -202,22 +248,26 @@ func (o *MachineType) GetGpu() (res MachineTypeGetGpuRetType) { // GetGpuOk returns a tuple with the Gpu 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 *MachineType) GetGpuOk() (ret MachineTypeGetGpuRetType, ok bool) { return getMachineTypeGetGpuAttributeTypeOk(o.Gpu) } // HasGpu 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 *MachineType) HasGpu() bool { _, ok := o.GetGpuOk() return ok } // SetGpu gets a reference to the given int64 and assigns it to the Gpu field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineType) SetGpu(v MachineTypeGetGpuRetType) { setMachineTypeGetGpuAttributeType(&o.Gpu, v) } // GetMemory returns the Memory 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 *MachineType) GetMemory() (res MachineTypeGetMemoryRetType) { res, _ = o.GetMemoryOk() return @@ -225,22 +275,26 @@ func (o *MachineType) GetMemory() (res MachineTypeGetMemoryRetType) { // GetMemoryOk returns a tuple with the Memory 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 *MachineType) GetMemoryOk() (ret MachineTypeGetMemoryRetType, ok bool) { return getMachineTypeGetMemoryAttributeTypeOk(o.Memory) } // HasMemory 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 *MachineType) HasMemory() bool { _, ok := o.GetMemoryOk() return ok } // SetMemory gets a reference to the given int64 and assigns it to the Memory field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineType) SetMemory(v MachineTypeGetMemoryRetType) { setMachineTypeGetMemoryAttributeType(&o.Memory, v) } // GetName returns the Name 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 *MachineType) GetName() (res MachineTypeGetNameRetType) { res, _ = o.GetNameOk() return @@ -248,21 +302,25 @@ func (o *MachineType) GetName() (res MachineTypeGetNameRetType) { // GetNameOk returns a tuple with the Name 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 *MachineType) GetNameOk() (ret MachineTypeGetNameRetType, ok bool) { return getMachineTypeGetNameAttributeTypeOk(o.Name) } // HasName 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 *MachineType) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MachineType) SetName(v MachineTypeGetNameRetType) { setMachineTypeGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MachineType) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMachineTypeGetArchitectureAttributeTypeOk(o.Architecture); ok { @@ -283,37 +341,45 @@ func (o MachineType) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableMachineType struct { value *MachineType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMachineType) Get() *MachineType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMachineType) Set(val *MachineType) { 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 NullableMachineType) 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 *NullableMachineType) 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 NewNullableMachineType(val *MachineType) *NullableMachineType { return &NullableMachineType{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 NullableMachineType) 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 *NullableMachineType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_maintenance.go b/services/ske/model_maintenance.go index 32e7b5e33..ecaa519d4 100644 --- a/services/ske/model_maintenance.go +++ b/services/ske/model_maintenance.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Maintenance{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceGetAutoUpdateAttributeType = *MaintenanceAutoUpdate + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceGetAutoUpdateArgType = MaintenanceAutoUpdate + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceGetAutoUpdateRetType = MaintenanceAutoUpdate +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMaintenanceGetAutoUpdateAttributeTypeOk(arg MaintenanceGetAutoUpdateAttributeType) (ret MaintenanceGetAutoUpdateRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getMaintenanceGetAutoUpdateAttributeTypeOk(arg MaintenanceGetAutoUpdateAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMaintenanceGetAutoUpdateAttributeType(arg *MaintenanceGetAutoUpdateAttributeType, val MaintenanceGetAutoUpdateRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setMaintenanceGetAutoUpdateAttributeType(arg *MaintenanceGetAutoUpdateAttri */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceGetTimeWindowAttributeType = *TimeWindow + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceGetTimeWindowArgType = TimeWindow + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceGetTimeWindowRetType = TimeWindow +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMaintenanceGetTimeWindowAttributeTypeOk(arg MaintenanceGetTimeWindowAttributeType) (ret MaintenanceGetTimeWindowRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getMaintenanceGetTimeWindowAttributeTypeOk(arg MaintenanceGetTimeWindowAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMaintenanceGetTimeWindowAttributeType(arg *MaintenanceGetTimeWindowAttributeType, val MaintenanceGetTimeWindowRetType) { *arg = &val } // 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"` @@ -65,12 +81,14 @@ type Maintenance struct { TimeWindow MaintenanceGetTimeWindowAttributeType `json:"timeWindow" required:"true"` } +// 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 { this := Maintenance{} setMaintenanceGetAutoUpdateAttributeType(&this.AutoUpdate, autoUpdate) @@ -81,12 +99,14 @@ func NewMaintenance(autoUpdate MaintenanceGetAutoUpdateArgType, timeWindow Maint // NewMaintenanceWithDefaults instantiates a new Maintenance 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 NewMaintenanceWithDefaults() *Maintenance { this := Maintenance{} return &this } // GetAutoUpdate returns the AutoUpdate field value +// 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 @@ -94,16 +114,19 @@ func (o *Maintenance) GetAutoUpdate() (ret MaintenanceGetAutoUpdateRetType) { // GetAutoUpdateOk returns a tuple with the AutoUpdate field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Maintenance) GetAutoUpdateOk() (ret MaintenanceGetAutoUpdateRetType, ok bool) { return getMaintenanceGetAutoUpdateAttributeTypeOk(o.AutoUpdate) } // SetAutoUpdate sets field value +// 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 +// 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 @@ -111,15 +134,18 @@ func (o *Maintenance) GetTimeWindow() (ret MaintenanceGetTimeWindowRetType) { // GetTimeWindowOk returns a tuple with the TimeWindow field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Maintenance) GetTimeWindowOk() (ret MaintenanceGetTimeWindowRetType, ok bool) { return getMaintenanceGetTimeWindowAttributeTypeOk(o.TimeWindow) } // SetTimeWindow sets field value +// 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) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Maintenance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMaintenanceGetAutoUpdateAttributeTypeOk(o.AutoUpdate); ok { @@ -131,37 +157,45 @@ func (o Maintenance) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableMaintenance struct { value *Maintenance isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMaintenance) Get() *Maintenance { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMaintenance) Set(val *Maintenance) { 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 NullableMaintenance) 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 *NullableMaintenance) 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 NewNullableMaintenance(val *Maintenance) *NullableMaintenance { return &NullableMaintenance{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 NullableMaintenance) 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 *NullableMaintenance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_maintenance_auto_update.go b/services/ske/model_maintenance_auto_update.go index ae391599f..741f5be33 100644 --- a/services/ske/model_maintenance_auto_update.go +++ b/services/ske/model_maintenance_auto_update.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &MaintenanceAutoUpdate{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdategetKubernetesVersionAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdategetKubernetesVersionArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdategetKubernetesVersionRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMaintenanceAutoUpdategetKubernetesVersionAttributeTypeOk(arg MaintenanceAutoUpdategetKubernetesVersionAttributeType) (ret MaintenanceAutoUpdategetKubernetesVersionRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getMaintenanceAutoUpdategetKubernetesVersionAttributeTypeOk(arg Maintenance return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMaintenanceAutoUpdategetKubernetesVersionAttributeType(arg *MaintenanceAutoUpdategetKubernetesVersionAttributeType, val MaintenanceAutoUpdategetKubernetesVersionRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setMaintenanceAutoUpdategetKubernetesVersionAttributeType(arg *MaintenanceA */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdategetMachineImageVersionAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdategetMachineImageVersionArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdategetMachineImageVersionRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMaintenanceAutoUpdategetMachineImageVersionAttributeTypeOk(arg MaintenanceAutoUpdategetMachineImageVersionAttributeType) (ret MaintenanceAutoUpdategetMachineImageVersionRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getMaintenanceAutoUpdategetMachineImageVersionAttributeTypeOk(arg Maintenan return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMaintenanceAutoUpdategetMachineImageVersionAttributeType(arg *MaintenanceAutoUpdategetMachineImageVersionAttributeType, val MaintenanceAutoUpdategetMachineImageVersionRetType) { *arg = &val } // MaintenanceAutoUpdate struct for MaintenanceAutoUpdate +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MaintenanceAutoUpdate struct { KubernetesVersion MaintenanceAutoUpdategetKubernetesVersionAttributeType `json:"kubernetesVersion,omitempty"` MachineImageVersion MaintenanceAutoUpdategetMachineImageVersionAttributeType `json:"machineImageVersion,omitempty"` @@ -67,6 +83,7 @@ type MaintenanceAutoUpdate struct { // 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 NewMaintenanceAutoUpdate() *MaintenanceAutoUpdate { this := MaintenanceAutoUpdate{} return &this @@ -75,12 +92,14 @@ func NewMaintenanceAutoUpdate() *MaintenanceAutoUpdate { // NewMaintenanceAutoUpdateWithDefaults instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdateWithDefaults() *MaintenanceAutoUpdate { this := MaintenanceAutoUpdate{} return &this } // GetKubernetesVersion returns the KubernetesVersion 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 *MaintenanceAutoUpdate) GetKubernetesVersion() (res MaintenanceAutoUpdategetKubernetesVersionRetType) { res, _ = o.GetKubernetesVersionOk() return @@ -88,22 +107,26 @@ func (o *MaintenanceAutoUpdate) GetKubernetesVersion() (res MaintenanceAutoUpdat // GetKubernetesVersionOk returns a tuple with the KubernetesVersion 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 *MaintenanceAutoUpdate) GetKubernetesVersionOk() (ret MaintenanceAutoUpdategetKubernetesVersionRetType, ok bool) { return getMaintenanceAutoUpdategetKubernetesVersionAttributeTypeOk(o.KubernetesVersion) } // HasKubernetesVersion 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 *MaintenanceAutoUpdate) HasKubernetesVersion() bool { _, ok := o.GetKubernetesVersionOk() return ok } // SetKubernetesVersion gets a reference to the given bool and assigns it to the KubernetesVersion field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MaintenanceAutoUpdate) SetKubernetesVersion(v MaintenanceAutoUpdategetKubernetesVersionRetType) { setMaintenanceAutoUpdategetKubernetesVersionAttributeType(&o.KubernetesVersion, v) } // GetMachineImageVersion returns the MachineImageVersion 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 *MaintenanceAutoUpdate) GetMachineImageVersion() (res MaintenanceAutoUpdategetMachineImageVersionRetType) { res, _ = o.GetMachineImageVersionOk() return @@ -111,21 +134,25 @@ func (o *MaintenanceAutoUpdate) GetMachineImageVersion() (res MaintenanceAutoUpd // GetMachineImageVersionOk returns a tuple with the MachineImageVersion 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 *MaintenanceAutoUpdate) GetMachineImageVersionOk() (ret MaintenanceAutoUpdategetMachineImageVersionRetType, ok bool) { return getMaintenanceAutoUpdategetMachineImageVersionAttributeTypeOk(o.MachineImageVersion) } // HasMachineImageVersion 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 *MaintenanceAutoUpdate) HasMachineImageVersion() bool { _, ok := o.GetMachineImageVersionOk() return ok } // SetMachineImageVersion gets a reference to the given bool and assigns it to the MachineImageVersion field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MaintenanceAutoUpdate) SetMachineImageVersion(v MaintenanceAutoUpdategetMachineImageVersionRetType) { setMaintenanceAutoUpdategetMachineImageVersionAttributeType(&o.MachineImageVersion, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MaintenanceAutoUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMaintenanceAutoUpdategetKubernetesVersionAttributeTypeOk(o.KubernetesVersion); ok { @@ -137,37 +164,45 @@ func (o MaintenanceAutoUpdate) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableMaintenanceAutoUpdate struct { value *MaintenanceAutoUpdate isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMaintenanceAutoUpdate) Get() *MaintenanceAutoUpdate { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMaintenanceAutoUpdate) Set(val *MaintenanceAutoUpdate) { 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 NullableMaintenanceAutoUpdate) 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 *NullableMaintenanceAutoUpdate) 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 NewNullableMaintenanceAutoUpdate(val *MaintenanceAutoUpdate) *NullableMaintenanceAutoUpdate { return &NullableMaintenanceAutoUpdate{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 NullableMaintenanceAutoUpdate) 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 *NullableMaintenanceAutoUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_network.go b/services/ske/model_network.go index a3ed5c090..91b96b360 100644 --- a/services/ske/model_network.go +++ b/services/ske/model_network.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Network{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NetworkGetControlPlaneAttributeType = *V2ControlPlaneNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NetworkGetControlPlaneArgType = V2ControlPlaneNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NetworkGetControlPlaneRetType = V2ControlPlaneNetwork +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNetworkGetControlPlaneAttributeTypeOk(arg NetworkGetControlPlaneAttributeType) (ret NetworkGetControlPlaneRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getNetworkGetControlPlaneAttributeTypeOk(arg NetworkGetControlPlaneAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNetworkGetControlPlaneAttributeType(arg *NetworkGetControlPlaneAttributeType, val NetworkGetControlPlaneRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setNetworkGetControlPlaneAttributeType(arg *NetworkGetControlPlaneAttribute */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NetworkGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNetworkGetIdAttributeTypeOk(arg NetworkGetIdAttributeType) (ret NetworkGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getNetworkGetIdAttributeTypeOk(arg NetworkGetIdAttributeType) (ret NetworkG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNetworkGetIdAttributeType(arg *NetworkGetIdAttributeType, val NetworkGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NetworkGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NetworkGetIdRetType = string // Network struct for Network +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Network struct { ControlPlane NetworkGetControlPlaneAttributeType `json:"controlPlane,omitempty"` Id NetworkGetIdAttributeType `json:"id,omitempty"` @@ -68,6 +83,7 @@ type Network struct { // 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 NewNetwork() *Network { this := Network{} return &this @@ -76,12 +92,14 @@ func NewNetwork() *Network { // NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { this := Network{} return &this } // GetControlPlane returns the ControlPlane 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 *Network) GetControlPlane() (res NetworkGetControlPlaneRetType) { res, _ = o.GetControlPlaneOk() return @@ -89,22 +107,26 @@ func (o *Network) GetControlPlane() (res NetworkGetControlPlaneRetType) { // GetControlPlaneOk returns a tuple with the ControlPlane 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 *Network) GetControlPlaneOk() (ret NetworkGetControlPlaneRetType, ok bool) { return getNetworkGetControlPlaneAttributeTypeOk(o.ControlPlane) } // HasControlPlane 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 *Network) HasControlPlane() bool { _, ok := o.GetControlPlaneOk() return ok } // SetControlPlane gets a reference to the given V2ControlPlaneNetwork and assigns it to the ControlPlane field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Network) SetControlPlane(v NetworkGetControlPlaneRetType) { setNetworkGetControlPlaneAttributeType(&o.ControlPlane, v) } // GetId returns the Id 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 *Network) GetId() (res NetworkGetIdRetType) { res, _ = o.GetIdOk() return @@ -112,21 +134,25 @@ func (o *Network) GetId() (res NetworkGetIdRetType) { // GetIdOk returns a tuple with the Id 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 *Network) GetIdOk() (ret NetworkGetIdRetType, ok bool) { return getNetworkGetIdAttributeTypeOk(o.Id) } // HasId 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 *Network) HasId() bool { _, ok := o.GetIdOk() return ok } // SetId gets a reference to the given string and assigns it to the Id field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Network) SetId(v NetworkGetIdRetType) { setNetworkGetIdAttributeType(&o.Id, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Network) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getNetworkGetControlPlaneAttributeTypeOk(o.ControlPlane); ok { @@ -138,37 +164,45 @@ func (o Network) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableNetwork struct { value *Network isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableNetwork) Get() *Network { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableNetwork) Set(val *Network) { 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 NullableNetwork) 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 *NullableNetwork) 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 NewNullableNetwork(val *Network) *NullableNetwork { return &NullableNetwork{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 NullableNetwork) 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 *NullableNetwork) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_nodepool.go b/services/ske/model_nodepool.go index 9aa797bf3..5457565c8 100644 --- a/services/ske/model_nodepool.go +++ b/services/ske/model_nodepool.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Nodepool{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolgetAllowSystemComponentsAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolgetAllowSystemComponentsArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolgetAllowSystemComponentsRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolgetAllowSystemComponentsAttributeTypeOk(arg NodepoolgetAllowSystemComponentsAttributeType) (ret NodepoolgetAllowSystemComponentsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getNodepoolgetAllowSystemComponentsAttributeTypeOk(arg NodepoolgetAllowSyst return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolgetAllowSystemComponentsAttributeType(arg *NodepoolgetAllowSystemComponentsAttributeType, val NodepoolgetAllowSystemComponentsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setNodepoolgetAllowSystemComponentsAttributeType(arg *NodepoolgetAllowSyste */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetAvailabilityZonesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetAvailabilityZonesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetAvailabilityZonesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetAvailabilityZonesAttributeTypeOk(arg NodepoolGetAvailabilityZonesAttributeType) (ret NodepoolGetAvailabilityZonesRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getNodepoolGetAvailabilityZonesAttributeTypeOk(arg NodepoolGetAvailabilityZ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetAvailabilityZonesAttributeType(arg *NodepoolGetAvailabilityZonesAttributeType, val NodepoolGetAvailabilityZonesRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setNodepoolGetAvailabilityZonesAttributeType(arg *NodepoolGetAvailabilityZo */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetCriAttributeType = *CRI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetCriArgType = CRI + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetCriRetType = CRI +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetCriAttributeTypeOk(arg NodepoolGetCriAttributeType) (ret NodepoolGetCriRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getNodepoolGetCriAttributeTypeOk(arg NodepoolGetCriAttributeType) (ret Node return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetCriAttributeType(arg *NodepoolGetCriAttributeType, val NodepoolGetCriRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setNodepoolGetCriAttributeType(arg *NodepoolGetCriAttributeType, val Nodepo */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetKubernetesAttributeType = *NodepoolKubernetes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetKubernetesArgType = NodepoolKubernetes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetKubernetesRetType = NodepoolKubernetes +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetKubernetesAttributeTypeOk(arg NodepoolGetKubernetesAttributeType) (ret NodepoolGetKubernetesRetType, ok bool) { if arg == nil { return ret, false @@ -93,6 +121,7 @@ func getNodepoolGetKubernetesAttributeTypeOk(arg NodepoolGetKubernetesAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetKubernetesAttributeType(arg *NodepoolGetKubernetesAttributeType, val NodepoolGetKubernetesRetType) { *arg = &val } @@ -102,10 +131,16 @@ func setNodepoolGetKubernetesAttributeType(arg *NodepoolGetKubernetesAttributeTy */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetLabelsAttributeTypeOk(arg NodepoolGetLabelsAttributeType) (ret NodepoolGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -113,6 +148,7 @@ func getNodepoolGetLabelsAttributeTypeOk(arg NodepoolGetLabelsAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetLabelsAttributeType(arg *NodepoolGetLabelsAttributeType, val NodepoolGetLabelsRetType) { *arg = &val } @@ -122,10 +158,16 @@ func setNodepoolGetLabelsAttributeType(arg *NodepoolGetLabelsAttributeType, val */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMachineAttributeType = *Machine + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMachineArgType = Machine + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMachineRetType = Machine +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetMachineAttributeTypeOk(arg NodepoolGetMachineAttributeType) (ret NodepoolGetMachineRetType, ok bool) { if arg == nil { return ret, false @@ -133,6 +175,7 @@ func getNodepoolGetMachineAttributeTypeOk(arg NodepoolGetMachineAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetMachineAttributeType(arg *NodepoolGetMachineAttributeType, val NodepoolGetMachineRetType) { *arg = &val } @@ -142,10 +185,16 @@ func setNodepoolGetMachineAttributeType(arg *NodepoolGetMachineAttributeType, va */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaxSurgeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaxSurgeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaxSurgeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetMaxSurgeAttributeTypeOk(arg NodepoolGetMaxSurgeAttributeType) (ret NodepoolGetMaxSurgeRetType, ok bool) { if arg == nil { return ret, false @@ -153,6 +202,7 @@ func getNodepoolGetMaxSurgeAttributeTypeOk(arg NodepoolGetMaxSurgeAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetMaxSurgeAttributeType(arg *NodepoolGetMaxSurgeAttributeType, val NodepoolGetMaxSurgeRetType) { *arg = &val } @@ -162,10 +212,16 @@ func setNodepoolGetMaxSurgeAttributeType(arg *NodepoolGetMaxSurgeAttributeType, */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaxUnavailableAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaxUnavailableArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaxUnavailableRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetMaxUnavailableAttributeTypeOk(arg NodepoolGetMaxUnavailableAttributeType) (ret NodepoolGetMaxUnavailableRetType, ok bool) { if arg == nil { return ret, false @@ -173,6 +229,7 @@ func getNodepoolGetMaxUnavailableAttributeTypeOk(arg NodepoolGetMaxUnavailableAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetMaxUnavailableAttributeType(arg *NodepoolGetMaxUnavailableAttributeType, val NodepoolGetMaxUnavailableRetType) { *arg = &val } @@ -182,10 +239,16 @@ func setNodepoolGetMaxUnavailableAttributeType(arg *NodepoolGetMaxUnavailableAtt */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaximumAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaximumArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMaximumRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetMaximumAttributeTypeOk(arg NodepoolGetMaximumAttributeType) (ret NodepoolGetMaximumRetType, ok bool) { if arg == nil { return ret, false @@ -193,6 +256,7 @@ func getNodepoolGetMaximumAttributeTypeOk(arg NodepoolGetMaximumAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetMaximumAttributeType(arg *NodepoolGetMaximumAttributeType, val NodepoolGetMaximumRetType) { *arg = &val } @@ -202,10 +266,16 @@ func setNodepoolGetMaximumAttributeType(arg *NodepoolGetMaximumAttributeType, va */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMinimumAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMinimumArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetMinimumRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetMinimumAttributeTypeOk(arg NodepoolGetMinimumAttributeType) (ret NodepoolGetMinimumRetType, ok bool) { if arg == nil { return ret, false @@ -213,6 +283,7 @@ func getNodepoolGetMinimumAttributeTypeOk(arg NodepoolGetMinimumAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetMinimumAttributeType(arg *NodepoolGetMinimumAttributeType, val NodepoolGetMinimumRetType) { *arg = &val } @@ -222,8 +293,10 @@ func setNodepoolGetMinimumAttributeType(arg *NodepoolGetMinimumAttributeType, va */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetNameAttributeTypeOk(arg NodepoolGetNameAttributeType) (ret NodepoolGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -231,11 +304,15 @@ func getNodepoolGetNameAttributeTypeOk(arg NodepoolGetNameAttributeType) (ret No return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetNameAttributeType(arg *NodepoolGetNameAttributeType, val NodepoolGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetNameRetType = string /* @@ -243,10 +320,16 @@ type NodepoolGetNameRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetTaintsAttributeType = *[]Taint + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetTaintsArgType = []Taint + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetTaintsRetType = []Taint +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetTaintsAttributeTypeOk(arg NodepoolGetTaintsAttributeType) (ret NodepoolGetTaintsRetType, ok bool) { if arg == nil { return ret, false @@ -254,6 +337,7 @@ func getNodepoolGetTaintsAttributeTypeOk(arg NodepoolGetTaintsAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetTaintsAttributeType(arg *NodepoolGetTaintsAttributeType, val NodepoolGetTaintsRetType) { *arg = &val } @@ -263,10 +347,16 @@ func setNodepoolGetTaintsAttributeType(arg *NodepoolGetTaintsAttributeType, val */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetVolumeAttributeType = *Volume + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetVolumeArgType = Volume + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolGetVolumeRetType = Volume +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolGetVolumeAttributeTypeOk(arg NodepoolGetVolumeAttributeType) (ret NodepoolGetVolumeRetType, ok bool) { if arg == nil { return ret, false @@ -274,11 +364,13 @@ func getNodepoolGetVolumeAttributeTypeOk(arg NodepoolGetVolumeAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolGetVolumeAttributeType(arg *NodepoolGetVolumeAttributeType, val NodepoolGetVolumeRetType) { *arg = &val } // Nodepool struct for Nodepool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Nodepool struct { // This needs to be true for at least one node pool. AllowSystemComponents NodepoolgetAllowSystemComponentsAttributeType `json:"allowSystemComponents,omitempty"` @@ -309,12 +401,14 @@ type Nodepool struct { Volume NodepoolGetVolumeAttributeType `json:"volume" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Nodepool Nodepool // NewNodepool instantiates a new Nodepool 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 NewNodepool(availabilityZones NodepoolGetAvailabilityZonesArgType, machine NodepoolGetMachineArgType, maximum NodepoolGetMaximumArgType, minimum NodepoolGetMinimumArgType, name NodepoolGetNameArgType, volume NodepoolGetVolumeArgType) *Nodepool { this := Nodepool{} setNodepoolGetAvailabilityZonesAttributeType(&this.AvailabilityZones, availabilityZones) @@ -329,12 +423,14 @@ func NewNodepool(availabilityZones NodepoolGetAvailabilityZonesArgType, machine // NewNodepoolWithDefaults instantiates a new Nodepool 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 NewNodepoolWithDefaults() *Nodepool { this := Nodepool{} return &this } // GetAllowSystemComponents returns the AllowSystemComponents 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 *Nodepool) GetAllowSystemComponents() (res NodepoolgetAllowSystemComponentsRetType) { res, _ = o.GetAllowSystemComponentsOk() return @@ -342,22 +438,26 @@ func (o *Nodepool) GetAllowSystemComponents() (res NodepoolgetAllowSystemCompone // GetAllowSystemComponentsOk returns a tuple with the AllowSystemComponents 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 *Nodepool) GetAllowSystemComponentsOk() (ret NodepoolgetAllowSystemComponentsRetType, ok bool) { return getNodepoolgetAllowSystemComponentsAttributeTypeOk(o.AllowSystemComponents) } // HasAllowSystemComponents 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 *Nodepool) HasAllowSystemComponents() bool { _, ok := o.GetAllowSystemComponentsOk() return ok } // SetAllowSystemComponents gets a reference to the given bool and assigns it to the AllowSystemComponents field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetAllowSystemComponents(v NodepoolgetAllowSystemComponentsRetType) { setNodepoolgetAllowSystemComponentsAttributeType(&o.AllowSystemComponents, v) } // GetAvailabilityZones returns the AvailabilityZones field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetAvailabilityZones() (ret NodepoolGetAvailabilityZonesRetType) { ret, _ = o.GetAvailabilityZonesOk() return ret @@ -365,16 +465,19 @@ func (o *Nodepool) GetAvailabilityZones() (ret NodepoolGetAvailabilityZonesRetTy // GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetAvailabilityZonesOk() (ret NodepoolGetAvailabilityZonesRetType, ok bool) { return getNodepoolGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones) } // SetAvailabilityZones sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetAvailabilityZones(v NodepoolGetAvailabilityZonesRetType) { setNodepoolGetAvailabilityZonesAttributeType(&o.AvailabilityZones, v) } // GetCri returns the Cri 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 *Nodepool) GetCri() (res NodepoolGetCriRetType) { res, _ = o.GetCriOk() return @@ -382,22 +485,26 @@ func (o *Nodepool) GetCri() (res NodepoolGetCriRetType) { // GetCriOk returns a tuple with the Cri 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 *Nodepool) GetCriOk() (ret NodepoolGetCriRetType, ok bool) { return getNodepoolGetCriAttributeTypeOk(o.Cri) } // HasCri 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 *Nodepool) HasCri() bool { _, ok := o.GetCriOk() return ok } // SetCri gets a reference to the given CRI and assigns it to the Cri field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetCri(v NodepoolGetCriRetType) { setNodepoolGetCriAttributeType(&o.Cri, v) } // GetKubernetes returns the Kubernetes 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 *Nodepool) GetKubernetes() (res NodepoolGetKubernetesRetType) { res, _ = o.GetKubernetesOk() return @@ -405,22 +512,26 @@ func (o *Nodepool) GetKubernetes() (res NodepoolGetKubernetesRetType) { // GetKubernetesOk returns a tuple with the Kubernetes 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 *Nodepool) GetKubernetesOk() (ret NodepoolGetKubernetesRetType, ok bool) { return getNodepoolGetKubernetesAttributeTypeOk(o.Kubernetes) } // HasKubernetes 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 *Nodepool) HasKubernetes() bool { _, ok := o.GetKubernetesOk() return ok } // SetKubernetes gets a reference to the given NodepoolKubernetes and assigns it to the Kubernetes field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetKubernetes(v NodepoolGetKubernetesRetType) { setNodepoolGetKubernetesAttributeType(&o.Kubernetes, v) } // GetLabels returns the Labels 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 *Nodepool) GetLabels() (res NodepoolGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -428,22 +539,26 @@ func (o *Nodepool) GetLabels() (res NodepoolGetLabelsRetType) { // GetLabelsOk returns a tuple with the Labels 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 *Nodepool) GetLabelsOk() (ret NodepoolGetLabelsRetType, ok bool) { return getNodepoolGetLabelsAttributeTypeOk(o.Labels) } // HasLabels 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 *Nodepool) HasLabels() bool { _, ok := o.GetLabelsOk() return ok } // SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetLabels(v NodepoolGetLabelsRetType) { setNodepoolGetLabelsAttributeType(&o.Labels, v) } // GetMachine returns the Machine field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetMachine() (ret NodepoolGetMachineRetType) { ret, _ = o.GetMachineOk() return ret @@ -451,16 +566,19 @@ func (o *Nodepool) GetMachine() (ret NodepoolGetMachineRetType) { // GetMachineOk returns a tuple with the Machine field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetMachineOk() (ret NodepoolGetMachineRetType, ok bool) { return getNodepoolGetMachineAttributeTypeOk(o.Machine) } // SetMachine sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetMachine(v NodepoolGetMachineRetType) { setNodepoolGetMachineAttributeType(&o.Machine, v) } // GetMaxSurge returns the MaxSurge 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 *Nodepool) GetMaxSurge() (res NodepoolGetMaxSurgeRetType) { res, _ = o.GetMaxSurgeOk() return @@ -468,22 +586,26 @@ func (o *Nodepool) GetMaxSurge() (res NodepoolGetMaxSurgeRetType) { // GetMaxSurgeOk returns a tuple with the MaxSurge 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 *Nodepool) GetMaxSurgeOk() (ret NodepoolGetMaxSurgeRetType, ok bool) { return getNodepoolGetMaxSurgeAttributeTypeOk(o.MaxSurge) } // HasMaxSurge 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 *Nodepool) HasMaxSurge() bool { _, ok := o.GetMaxSurgeOk() return ok } // SetMaxSurge gets a reference to the given int64 and assigns it to the MaxSurge field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetMaxSurge(v NodepoolGetMaxSurgeRetType) { setNodepoolGetMaxSurgeAttributeType(&o.MaxSurge, v) } // GetMaxUnavailable returns the MaxUnavailable 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 *Nodepool) GetMaxUnavailable() (res NodepoolGetMaxUnavailableRetType) { res, _ = o.GetMaxUnavailableOk() return @@ -491,22 +613,26 @@ func (o *Nodepool) GetMaxUnavailable() (res NodepoolGetMaxUnavailableRetType) { // GetMaxUnavailableOk returns a tuple with the MaxUnavailable 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 *Nodepool) GetMaxUnavailableOk() (ret NodepoolGetMaxUnavailableRetType, ok bool) { return getNodepoolGetMaxUnavailableAttributeTypeOk(o.MaxUnavailable) } // HasMaxUnavailable 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 *Nodepool) HasMaxUnavailable() bool { _, ok := o.GetMaxUnavailableOk() return ok } // SetMaxUnavailable gets a reference to the given int64 and assigns it to the MaxUnavailable field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetMaxUnavailable(v NodepoolGetMaxUnavailableRetType) { setNodepoolGetMaxUnavailableAttributeType(&o.MaxUnavailable, v) } // GetMaximum returns the Maximum field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetMaximum() (ret NodepoolGetMaximumRetType) { ret, _ = o.GetMaximumOk() return ret @@ -514,16 +640,19 @@ func (o *Nodepool) GetMaximum() (ret NodepoolGetMaximumRetType) { // GetMaximumOk returns a tuple with the Maximum field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetMaximumOk() (ret NodepoolGetMaximumRetType, ok bool) { return getNodepoolGetMaximumAttributeTypeOk(o.Maximum) } // SetMaximum sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetMaximum(v NodepoolGetMaximumRetType) { setNodepoolGetMaximumAttributeType(&o.Maximum, v) } // GetMinimum returns the Minimum field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetMinimum() (ret NodepoolGetMinimumRetType) { ret, _ = o.GetMinimumOk() return ret @@ -531,16 +660,19 @@ func (o *Nodepool) GetMinimum() (ret NodepoolGetMinimumRetType) { // GetMinimumOk returns a tuple with the Minimum field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetMinimumOk() (ret NodepoolGetMinimumRetType, ok bool) { return getNodepoolGetMinimumAttributeTypeOk(o.Minimum) } // SetMinimum sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetMinimum(v NodepoolGetMinimumRetType) { setNodepoolGetMinimumAttributeType(&o.Minimum, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetName() (ret NodepoolGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -548,16 +680,19 @@ func (o *Nodepool) GetName() (ret NodepoolGetNameRetType) { // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetNameOk() (ret NodepoolGetNameRetType, ok bool) { return getNodepoolGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetName(v NodepoolGetNameRetType) { setNodepoolGetNameAttributeType(&o.Name, v) } // GetTaints returns the Taints 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 *Nodepool) GetTaints() (res NodepoolGetTaintsRetType) { res, _ = o.GetTaintsOk() return @@ -565,22 +700,26 @@ func (o *Nodepool) GetTaints() (res NodepoolGetTaintsRetType) { // GetTaintsOk returns a tuple with the Taints 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 *Nodepool) GetTaintsOk() (ret NodepoolGetTaintsRetType, ok bool) { return getNodepoolGetTaintsAttributeTypeOk(o.Taints) } // HasTaints 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 *Nodepool) HasTaints() bool { _, ok := o.GetTaintsOk() return ok } // SetTaints gets a reference to the given []Taint and assigns it to the Taints field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetTaints(v NodepoolGetTaintsRetType) { setNodepoolGetTaintsAttributeType(&o.Taints, v) } // GetVolume returns the Volume field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetVolume() (ret NodepoolGetVolumeRetType) { ret, _ = o.GetVolumeOk() return ret @@ -588,15 +727,18 @@ func (o *Nodepool) GetVolume() (ret NodepoolGetVolumeRetType) { // GetVolumeOk returns a tuple with the Volume field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) GetVolumeOk() (ret NodepoolGetVolumeRetType, ok bool) { return getNodepoolGetVolumeAttributeTypeOk(o.Volume) } // SetVolume sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Nodepool) SetVolume(v NodepoolGetVolumeRetType) { setNodepoolGetVolumeAttributeType(&o.Volume, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Nodepool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getNodepoolgetAllowSystemComponentsAttributeTypeOk(o.AllowSystemComponents); ok { @@ -641,37 +783,45 @@ func (o Nodepool) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableNodepool struct { value *Nodepool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableNodepool) Get() *Nodepool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableNodepool) Set(val *Nodepool) { 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 NullableNodepool) 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 *NullableNodepool) 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 NewNullableNodepool(val *Nodepool) *NullableNodepool { return &NullableNodepool{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 NullableNodepool) 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 *NullableNodepool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_nodepool_kubernetes.go b/services/ske/model_nodepool_kubernetes.go index ff90f3a6d..023017937 100644 --- a/services/ske/model_nodepool_kubernetes.go +++ b/services/ske/model_nodepool_kubernetes.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &NodepoolKubernetes{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolKubernetesGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNodepoolKubernetesGetVersionAttributeTypeOk(arg NodepoolKubernetesGetVersionAttributeType) (ret NodepoolKubernetesGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getNodepoolKubernetesGetVersionAttributeTypeOk(arg NodepoolKubernetesGetVer return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNodepoolKubernetesGetVersionAttributeType(arg *NodepoolKubernetesGetVersionAttributeType, val NodepoolKubernetesGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolKubernetesGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolKubernetesGetVersionRetType = string // NodepoolKubernetes struct for NodepoolKubernetes +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NodepoolKubernetes struct { // Override the Kubernetes version for the Kubelet of this Nodepool. Version must be equal or lower than the version of the cluster. Only one minor version difference to the version of the cluster is allowed. Downgrade of existing Nodepools is prohibited. Version NodepoolKubernetesGetVersionAttributeType `json:"version,omitempty"` @@ -48,6 +56,7 @@ type NodepoolKubernetes struct { // 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 NewNodepoolKubernetes() *NodepoolKubernetes { this := NodepoolKubernetes{} return &this @@ -56,12 +65,14 @@ func NewNodepoolKubernetes() *NodepoolKubernetes { // NewNodepoolKubernetesWithDefaults instantiates a new NodepoolKubernetes 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 NewNodepoolKubernetesWithDefaults() *NodepoolKubernetes { this := NodepoolKubernetes{} return &this } // GetVersion returns the Version 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 *NodepoolKubernetes) GetVersion() (res NodepoolKubernetesGetVersionRetType) { res, _ = o.GetVersionOk() return @@ -69,21 +80,25 @@ func (o *NodepoolKubernetes) GetVersion() (res NodepoolKubernetesGetVersionRetTy // GetVersionOk returns a tuple with the Version 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 *NodepoolKubernetes) GetVersionOk() (ret NodepoolKubernetesGetVersionRetType, ok bool) { return getNodepoolKubernetesGetVersionAttributeTypeOk(o.Version) } // HasVersion 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 *NodepoolKubernetes) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *NodepoolKubernetes) SetVersion(v NodepoolKubernetesGetVersionRetType) { setNodepoolKubernetesGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o NodepoolKubernetes) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getNodepoolKubernetesGetVersionAttributeTypeOk(o.Version); ok { @@ -92,37 +107,45 @@ func (o NodepoolKubernetes) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableNodepoolKubernetes struct { value *NodepoolKubernetes isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableNodepoolKubernetes) Get() *NodepoolKubernetes { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableNodepoolKubernetes) Set(val *NodepoolKubernetes) { 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 NullableNodepoolKubernetes) 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 *NullableNodepoolKubernetes) 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 NewNullableNodepoolKubernetes(val *NodepoolKubernetes) *NullableNodepoolKubernetes { return &NullableNodepoolKubernetes{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 NullableNodepoolKubernetes) 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 *NullableNodepoolKubernetes) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_observability.go b/services/ske/model_observability.go index 2309acb85..31632d02b 100644 --- a/services/ske/model_observability.go +++ b/services/ske/model_observability.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Observability{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ObservabilitygetEnabledAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ObservabilitygetEnabledArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ObservabilitygetEnabledRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getObservabilitygetEnabledAttributeTypeOk(arg ObservabilitygetEnabledAttributeType) (ret ObservabilitygetEnabledRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getObservabilitygetEnabledAttributeTypeOk(arg ObservabilitygetEnabledAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setObservabilitygetEnabledAttributeType(arg *ObservabilitygetEnabledAttributeType, val ObservabilitygetEnabledRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setObservabilitygetEnabledAttributeType(arg *ObservabilitygetEnabledAttribu */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ObservabilityGetInstanceIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getObservabilityGetInstanceIdAttributeTypeOk(arg ObservabilityGetInstanceIdAttributeType) (ret ObservabilityGetInstanceIdRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getObservabilityGetInstanceIdAttributeTypeOk(arg ObservabilityGetInstanceId return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setObservabilityGetInstanceIdAttributeType(arg *ObservabilityGetInstanceIdAttributeType, val ObservabilityGetInstanceIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ObservabilityGetInstanceIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ObservabilityGetInstanceIdRetType = string // Observability struct for Observability +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Observability struct { // Enables the Observability extension. // REQUIRED @@ -68,12 +83,14 @@ type Observability struct { InstanceId ObservabilityGetInstanceIdAttributeType `json:"instanceId" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Observability Observability // NewObservability instantiates a new Observability 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 NewObservability(enabled ObservabilitygetEnabledArgType, instanceId ObservabilityGetInstanceIdArgType) *Observability { this := Observability{} setObservabilitygetEnabledAttributeType(&this.Enabled, enabled) @@ -84,12 +101,14 @@ func NewObservability(enabled ObservabilitygetEnabledArgType, instanceId Observa // NewObservabilityWithDefaults instantiates a new Observability 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 NewObservabilityWithDefaults() *Observability { this := Observability{} return &this } // GetEnabled returns the Enabled field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Observability) GetEnabled() (ret ObservabilitygetEnabledRetType) { ret, _ = o.GetEnabledOk() return ret @@ -97,16 +116,19 @@ func (o *Observability) GetEnabled() (ret ObservabilitygetEnabledRetType) { // GetEnabledOk returns a tuple with the Enabled field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Observability) GetEnabledOk() (ret ObservabilitygetEnabledRetType, ok bool) { return getObservabilitygetEnabledAttributeTypeOk(o.Enabled) } // SetEnabled sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Observability) SetEnabled(v ObservabilitygetEnabledRetType) { setObservabilitygetEnabledAttributeType(&o.Enabled, v) } // GetInstanceId returns the InstanceId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Observability) GetInstanceId() (ret ObservabilityGetInstanceIdRetType) { ret, _ = o.GetInstanceIdOk() return ret @@ -114,15 +136,18 @@ func (o *Observability) GetInstanceId() (ret ObservabilityGetInstanceIdRetType) // GetInstanceIdOk returns a tuple with the InstanceId field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Observability) GetInstanceIdOk() (ret ObservabilityGetInstanceIdRetType, ok bool) { return getObservabilityGetInstanceIdAttributeTypeOk(o.InstanceId) } // SetInstanceId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Observability) SetInstanceId(v ObservabilityGetInstanceIdRetType) { setObservabilityGetInstanceIdAttributeType(&o.InstanceId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Observability) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getObservabilitygetEnabledAttributeTypeOk(o.Enabled); ok { @@ -134,37 +159,45 @@ func (o Observability) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableObservability struct { value *Observability isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableObservability) Get() *Observability { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableObservability) Set(val *Observability) { 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 NullableObservability) 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 *NullableObservability) 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 NewNullableObservability(val *Observability) *NullableObservability { return &NullableObservability{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 NullableObservability) 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 *NullableObservability) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_provider_options.go b/services/ske/model_provider_options.go index 5cfeffec8..186e66d96 100644 --- a/services/ske/model_provider_options.go +++ b/services/ske/model_provider_options.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ProviderOptions{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetAvailabilityZonesAttributeType = *[]AvailabilityZone + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetAvailabilityZonesArgType = []AvailabilityZone + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetAvailabilityZonesRetType = []AvailabilityZone +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getProviderOptionsGetAvailabilityZonesAttributeTypeOk(arg ProviderOptionsGetAvailabilityZonesAttributeType) (ret ProviderOptionsGetAvailabilityZonesRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getProviderOptionsGetAvailabilityZonesAttributeTypeOk(arg ProviderOptionsGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setProviderOptionsGetAvailabilityZonesAttributeType(arg *ProviderOptionsGetAvailabilityZonesAttributeType, val ProviderOptionsGetAvailabilityZonesRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setProviderOptionsGetAvailabilityZonesAttributeType(arg *ProviderOptionsGet */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetKubernetesVersionsAttributeType = *[]KubernetesVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetKubernetesVersionsArgType = []KubernetesVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetKubernetesVersionsRetType = []KubernetesVersion +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getProviderOptionsGetKubernetesVersionsAttributeTypeOk(arg ProviderOptionsGetKubernetesVersionsAttributeType) (ret ProviderOptionsGetKubernetesVersionsRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getProviderOptionsGetKubernetesVersionsAttributeTypeOk(arg ProviderOptionsG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setProviderOptionsGetKubernetesVersionsAttributeType(arg *ProviderOptionsGetKubernetesVersionsAttributeType, val ProviderOptionsGetKubernetesVersionsRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setProviderOptionsGetKubernetesVersionsAttributeType(arg *ProviderOptionsGe */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetMachineImagesAttributeType = *[]MachineImage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetMachineImagesArgType = []MachineImage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetMachineImagesRetType = []MachineImage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getProviderOptionsGetMachineImagesAttributeTypeOk(arg ProviderOptionsGetMachineImagesAttributeType) (ret ProviderOptionsGetMachineImagesRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getProviderOptionsGetMachineImagesAttributeTypeOk(arg ProviderOptionsGetMac return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setProviderOptionsGetMachineImagesAttributeType(arg *ProviderOptionsGetMachineImagesAttributeType, val ProviderOptionsGetMachineImagesRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setProviderOptionsGetMachineImagesAttributeType(arg *ProviderOptionsGetMach */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetMachineTypesAttributeType = *[]MachineType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetMachineTypesArgType = []MachineType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetMachineTypesRetType = []MachineType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getProviderOptionsGetMachineTypesAttributeTypeOk(arg ProviderOptionsGetMachineTypesAttributeType) (ret ProviderOptionsGetMachineTypesRetType, ok bool) { if arg == nil { return ret, false @@ -93,6 +121,7 @@ func getProviderOptionsGetMachineTypesAttributeTypeOk(arg ProviderOptionsGetMach return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setProviderOptionsGetMachineTypesAttributeType(arg *ProviderOptionsGetMachineTypesAttributeType, val ProviderOptionsGetMachineTypesRetType) { *arg = &val } @@ -102,10 +131,16 @@ func setProviderOptionsGetMachineTypesAttributeType(arg *ProviderOptionsGetMachi */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetVolumeTypesAttributeType = *[]VolumeType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetVolumeTypesArgType = []VolumeType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptionsGetVolumeTypesRetType = []VolumeType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getProviderOptionsGetVolumeTypesAttributeTypeOk(arg ProviderOptionsGetVolumeTypesAttributeType) (ret ProviderOptionsGetVolumeTypesRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +148,13 @@ func getProviderOptionsGetVolumeTypesAttributeTypeOk(arg ProviderOptionsGetVolum return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setProviderOptionsGetVolumeTypesAttributeType(arg *ProviderOptionsGetVolumeTypesAttributeType, val ProviderOptionsGetVolumeTypesRetType) { *arg = &val } // ProviderOptions struct for ProviderOptions +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ProviderOptions struct { AvailabilityZones ProviderOptionsGetAvailabilityZonesAttributeType `json:"availabilityZones,omitempty"` KubernetesVersions ProviderOptionsGetKubernetesVersionsAttributeType `json:"kubernetesVersions,omitempty"` @@ -130,6 +167,7 @@ type ProviderOptions struct { // 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 NewProviderOptions() *ProviderOptions { this := ProviderOptions{} return &this @@ -138,12 +176,14 @@ func NewProviderOptions() *ProviderOptions { // NewProviderOptionsWithDefaults instantiates a new ProviderOptions 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 NewProviderOptionsWithDefaults() *ProviderOptions { this := ProviderOptions{} return &this } // GetAvailabilityZones returns the AvailabilityZones 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 *ProviderOptions) GetAvailabilityZones() (res ProviderOptionsGetAvailabilityZonesRetType) { res, _ = o.GetAvailabilityZonesOk() return @@ -151,22 +191,26 @@ func (o *ProviderOptions) GetAvailabilityZones() (res ProviderOptionsGetAvailabi // GetAvailabilityZonesOk returns a tuple with the AvailabilityZones 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 *ProviderOptions) GetAvailabilityZonesOk() (ret ProviderOptionsGetAvailabilityZonesRetType, ok bool) { return getProviderOptionsGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones) } // HasAvailabilityZones 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 *ProviderOptions) HasAvailabilityZones() bool { _, ok := o.GetAvailabilityZonesOk() return ok } // SetAvailabilityZones gets a reference to the given []AvailabilityZone and assigns it to the AvailabilityZones field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ProviderOptions) SetAvailabilityZones(v ProviderOptionsGetAvailabilityZonesRetType) { setProviderOptionsGetAvailabilityZonesAttributeType(&o.AvailabilityZones, v) } // GetKubernetesVersions returns the KubernetesVersions 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 *ProviderOptions) GetKubernetesVersions() (res ProviderOptionsGetKubernetesVersionsRetType) { res, _ = o.GetKubernetesVersionsOk() return @@ -174,22 +218,26 @@ func (o *ProviderOptions) GetKubernetesVersions() (res ProviderOptionsGetKuberne // GetKubernetesVersionsOk returns a tuple with the KubernetesVersions 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 *ProviderOptions) GetKubernetesVersionsOk() (ret ProviderOptionsGetKubernetesVersionsRetType, ok bool) { return getProviderOptionsGetKubernetesVersionsAttributeTypeOk(o.KubernetesVersions) } // HasKubernetesVersions 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 *ProviderOptions) HasKubernetesVersions() bool { _, ok := o.GetKubernetesVersionsOk() return ok } // SetKubernetesVersions gets a reference to the given []KubernetesVersion and assigns it to the KubernetesVersions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ProviderOptions) SetKubernetesVersions(v ProviderOptionsGetKubernetesVersionsRetType) { setProviderOptionsGetKubernetesVersionsAttributeType(&o.KubernetesVersions, v) } // GetMachineImages returns the MachineImages 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 *ProviderOptions) GetMachineImages() (res ProviderOptionsGetMachineImagesRetType) { res, _ = o.GetMachineImagesOk() return @@ -197,22 +245,26 @@ func (o *ProviderOptions) GetMachineImages() (res ProviderOptionsGetMachineImage // GetMachineImagesOk returns a tuple with the MachineImages 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 *ProviderOptions) GetMachineImagesOk() (ret ProviderOptionsGetMachineImagesRetType, ok bool) { return getProviderOptionsGetMachineImagesAttributeTypeOk(o.MachineImages) } // HasMachineImages 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 *ProviderOptions) HasMachineImages() bool { _, ok := o.GetMachineImagesOk() return ok } // SetMachineImages gets a reference to the given []MachineImage and assigns it to the MachineImages field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ProviderOptions) SetMachineImages(v ProviderOptionsGetMachineImagesRetType) { setProviderOptionsGetMachineImagesAttributeType(&o.MachineImages, v) } // GetMachineTypes returns the MachineTypes 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 *ProviderOptions) GetMachineTypes() (res ProviderOptionsGetMachineTypesRetType) { res, _ = o.GetMachineTypesOk() return @@ -220,22 +272,26 @@ func (o *ProviderOptions) GetMachineTypes() (res ProviderOptionsGetMachineTypesR // GetMachineTypesOk returns a tuple with the MachineTypes 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 *ProviderOptions) GetMachineTypesOk() (ret ProviderOptionsGetMachineTypesRetType, ok bool) { return getProviderOptionsGetMachineTypesAttributeTypeOk(o.MachineTypes) } // HasMachineTypes 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 *ProviderOptions) HasMachineTypes() bool { _, ok := o.GetMachineTypesOk() return ok } // SetMachineTypes gets a reference to the given []MachineType and assigns it to the MachineTypes field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ProviderOptions) SetMachineTypes(v ProviderOptionsGetMachineTypesRetType) { setProviderOptionsGetMachineTypesAttributeType(&o.MachineTypes, v) } // GetVolumeTypes returns the VolumeTypes 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 *ProviderOptions) GetVolumeTypes() (res ProviderOptionsGetVolumeTypesRetType) { res, _ = o.GetVolumeTypesOk() return @@ -243,21 +299,25 @@ func (o *ProviderOptions) GetVolumeTypes() (res ProviderOptionsGetVolumeTypesRet // GetVolumeTypesOk returns a tuple with the VolumeTypes 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 *ProviderOptions) GetVolumeTypesOk() (ret ProviderOptionsGetVolumeTypesRetType, ok bool) { return getProviderOptionsGetVolumeTypesAttributeTypeOk(o.VolumeTypes) } // HasVolumeTypes 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 *ProviderOptions) HasVolumeTypes() bool { _, ok := o.GetVolumeTypesOk() return ok } // SetVolumeTypes gets a reference to the given []VolumeType and assigns it to the VolumeTypes field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ProviderOptions) SetVolumeTypes(v ProviderOptionsGetVolumeTypesRetType) { setProviderOptionsGetVolumeTypesAttributeType(&o.VolumeTypes, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ProviderOptions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getProviderOptionsGetAvailabilityZonesAttributeTypeOk(o.AvailabilityZones); ok { @@ -278,37 +338,45 @@ func (o ProviderOptions) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableProviderOptions struct { value *ProviderOptions isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableProviderOptions) Get() *ProviderOptions { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableProviderOptions) Set(val *ProviderOptions) { 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 NullableProviderOptions) 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 *NullableProviderOptions) 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 NewNullableProviderOptions(val *ProviderOptions) *NullableProviderOptions { return &NullableProviderOptions{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 NullableProviderOptions) 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 *NullableProviderOptions) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_runtime_error.go b/services/ske/model_runtime_error.go index e6ed93266..f06d7f08c 100644 --- a/services/ske/model_runtime_error.go +++ b/services/ske/model_runtime_error.go @@ -8,6 +8,7 @@ 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 ( @@ -26,24 +27,37 @@ var _ MappedNullable = &RuntimeError{} // RuntimeErrorCode - Code: `SKE_UNSPECIFIED` Message: \"An error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_TMP_AUTH_ERROR` Message: \"Authentication failed. This is a temporary error. Please wait while the system recovers.\" - Code: `SKE_QUOTA_EXCEEDED` Message: \"Your project's resource quotas are exhausted. Please make sure your quota is sufficient for the ordered cluster.\" - Code: `SKE_OBSERVABILITY_INSTANCE_NOT_FOUND` Message: \"The provided Observability instance could not be found.\" - Code: `SKE_RATE_LIMITS` Message: \"While provisioning your cluster, request rate limits where incurred. Please wait while the system recovers.\" - Code: `SKE_INFRA_ERROR` Message: \"An error occurred with the underlying infrastructure. Please open a support ticket if this error persists.\" - Code: `SKE_REMAINING_RESOURCES` Message: \"There are remaining Kubernetes resources in your cluster that prevent deletion. Please make sure to remove them.\" - Code: `SKE_CONFIGURATION_PROBLEM` Message: \"A configuration error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_UNREADY_NODES` Message: \"Not all worker nodes are ready. Please open a support ticket if this error persists.\" - Code: `SKE_API_SERVER_ERROR` Message: \"The Kubernetes API server is not reporting readiness. Please open a support ticket if this error persists.\" - Code: `SKE_DNS_ZONE_NOT_FOUND` Message: \"The provided DNS zone for the STACKIT DNS extension could not be found. Please ensure you defined a valid domain that belongs to a STACKIT DNS zone.\" // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorCode string // List of Code const ( - RUNTIMEERRORCODE_UNSPECIFIED RuntimeErrorCode = "SKE_UNSPECIFIED" - RUNTIMEERRORCODE_TMP_AUTH_ERROR RuntimeErrorCode = "SKE_TMP_AUTH_ERROR" - RUNTIMEERRORCODE_QUOTA_EXCEEDED RuntimeErrorCode = "SKE_QUOTA_EXCEEDED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_UNSPECIFIED RuntimeErrorCode = "SKE_UNSPECIFIED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_TMP_AUTH_ERROR RuntimeErrorCode = "SKE_TMP_AUTH_ERROR" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_QUOTA_EXCEEDED RuntimeErrorCode = "SKE_QUOTA_EXCEEDED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead RUNTIMEERRORCODE_OBSERVABILITY_INSTANCE_NOT_FOUND RuntimeErrorCode = "SKE_OBSERVABILITY_INSTANCE_NOT_FOUND" - RUNTIMEERRORCODE_RATE_LIMITS RuntimeErrorCode = "SKE_RATE_LIMITS" - RUNTIMEERRORCODE_INFRA_ERROR RuntimeErrorCode = "SKE_INFRA_ERROR" - RUNTIMEERRORCODE_REMAINING_RESOURCES RuntimeErrorCode = "SKE_REMAINING_RESOURCES" - RUNTIMEERRORCODE_CONFIGURATION_PROBLEM RuntimeErrorCode = "SKE_CONFIGURATION_PROBLEM" - RUNTIMEERRORCODE_UNREADY_NODES RuntimeErrorCode = "SKE_UNREADY_NODES" - RUNTIMEERRORCODE_API_SERVER_ERROR RuntimeErrorCode = "SKE_API_SERVER_ERROR" - RUNTIMEERRORCODE_DNS_ZONE_NOT_FOUND RuntimeErrorCode = "SKE_DNS_ZONE_NOT_FOUND" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_RATE_LIMITS RuntimeErrorCode = "SKE_RATE_LIMITS" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_INFRA_ERROR RuntimeErrorCode = "SKE_INFRA_ERROR" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_REMAINING_RESOURCES RuntimeErrorCode = "SKE_REMAINING_RESOURCES" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_CONFIGURATION_PROBLEM RuntimeErrorCode = "SKE_CONFIGURATION_PROBLEM" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_UNREADY_NODES RuntimeErrorCode = "SKE_UNREADY_NODES" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_API_SERVER_ERROR RuntimeErrorCode = "SKE_API_SERVER_ERROR" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RUNTIMEERRORCODE_DNS_ZONE_NOT_FOUND RuntimeErrorCode = "SKE_DNS_ZONE_NOT_FOUND" ) // All allowed values of RuntimeError enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedRuntimeErrorCodeEnumValues = []RuntimeErrorCode{ "SKE_UNSPECIFIED", "SKE_TMP_AUTH_ERROR", @@ -58,6 +72,7 @@ var AllowedRuntimeErrorCodeEnumValues = []RuntimeErrorCode{ "SKE_DNS_ZONE_NOT_FOUND", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *RuntimeErrorCode) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -85,6 +100,7 @@ func (v *RuntimeErrorCode) UnmarshalJSON(src []byte) error { // NewRuntimeErrorCodeFromValue returns a pointer to a valid RuntimeErrorCode // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewRuntimeErrorCodeFromValue(v RuntimeErrorCode) (*RuntimeErrorCode, error) { ev := RuntimeErrorCode(v) if ev.IsValid() { @@ -95,6 +111,7 @@ func NewRuntimeErrorCodeFromValue(v RuntimeErrorCode) (*RuntimeErrorCode, error) } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v RuntimeErrorCode) IsValid() bool { for _, existing := range AllowedRuntimeErrorCodeEnumValues { if existing == v { @@ -105,50 +122,65 @@ func (v RuntimeErrorCode) IsValid() bool { } // Ptr returns reference to CodeCode value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v RuntimeErrorCode) Ptr() *RuntimeErrorCode { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableRuntimeErrorCode struct { value *RuntimeErrorCode isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableRuntimeErrorCode) Get() *RuntimeErrorCode { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableRuntimeErrorCode) Set(val *RuntimeErrorCode) { 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 NullableRuntimeErrorCode) 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 *NullableRuntimeErrorCode) 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 NewNullableRuntimeErrorCode(val *RuntimeErrorCode) *NullableRuntimeErrorCode { return &NullableRuntimeErrorCode{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 NullableRuntimeErrorCode) 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 *NullableRuntimeErrorCode) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetCodeAttributeType = *RuntimeErrorCode + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetCodeArgType = RuntimeErrorCode + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetCodeRetType = RuntimeErrorCode +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRuntimeErrorGetCodeAttributeTypeOk(arg RuntimeErrorGetCodeAttributeType) (ret RuntimeErrorGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -156,6 +188,7 @@ func getRuntimeErrorGetCodeAttributeTypeOk(arg RuntimeErrorGetCodeAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRuntimeErrorGetCodeAttributeType(arg *RuntimeErrorGetCodeAttributeType, val RuntimeErrorGetCodeRetType) { *arg = &val } @@ -165,8 +198,10 @@ func setRuntimeErrorGetCodeAttributeType(arg *RuntimeErrorGetCodeAttributeType, */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetDetailsAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRuntimeErrorGetDetailsAttributeTypeOk(arg RuntimeErrorGetDetailsAttributeType) (ret RuntimeErrorGetDetailsRetType, ok bool) { if arg == nil { return ret, false @@ -174,11 +209,15 @@ func getRuntimeErrorGetDetailsAttributeTypeOk(arg RuntimeErrorGetDetailsAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRuntimeErrorGetDetailsAttributeType(arg *RuntimeErrorGetDetailsAttributeType, val RuntimeErrorGetDetailsRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetDetailsArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetDetailsRetType = string /* @@ -186,8 +225,10 @@ type RuntimeErrorGetDetailsRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRuntimeErrorGetMessageAttributeTypeOk(arg RuntimeErrorGetMessageAttributeType) (ret RuntimeErrorGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -195,14 +236,19 @@ func getRuntimeErrorGetMessageAttributeTypeOk(arg RuntimeErrorGetMessageAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRuntimeErrorGetMessageAttributeType(arg *RuntimeErrorGetMessageAttributeType, val RuntimeErrorGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeErrorGetMessageRetType = string // RuntimeError struct for RuntimeError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RuntimeError struct { // - Code: `SKE_UNSPECIFIED` Message: \"An error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_TMP_AUTH_ERROR` Message: \"Authentication failed. This is a temporary error. Please wait while the system recovers.\" - Code: `SKE_QUOTA_EXCEEDED` Message: \"Your project's resource quotas are exhausted. Please make sure your quota is sufficient for the ordered cluster.\" - Code: `SKE_OBSERVABILITY_INSTANCE_NOT_FOUND` Message: \"The provided Observability instance could not be found.\" - Code: `SKE_RATE_LIMITS` Message: \"While provisioning your cluster, request rate limits where incurred. Please wait while the system recovers.\" - Code: `SKE_INFRA_ERROR` Message: \"An error occurred with the underlying infrastructure. Please open a support ticket if this error persists.\" - Code: `SKE_REMAINING_RESOURCES` Message: \"There are remaining Kubernetes resources in your cluster that prevent deletion. Please make sure to remove them.\" - Code: `SKE_CONFIGURATION_PROBLEM` Message: \"A configuration error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_UNREADY_NODES` Message: \"Not all worker nodes are ready. Please open a support ticket if this error persists.\" - Code: `SKE_API_SERVER_ERROR` Message: \"The Kubernetes API server is not reporting readiness. Please open a support ticket if this error persists.\" - Code: `SKE_DNS_ZONE_NOT_FOUND` Message: \"The provided DNS zone for the STACKIT DNS extension could not be found. Please ensure you defined a valid domain that belongs to a STACKIT DNS zone.\" Code RuntimeErrorGetCodeAttributeType `json:"code,omitempty"` @@ -214,6 +260,7 @@ type RuntimeError struct { // 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 NewRuntimeError() *RuntimeError { this := RuntimeError{} return &this @@ -222,12 +269,14 @@ func NewRuntimeError() *RuntimeError { // NewRuntimeErrorWithDefaults instantiates a new RuntimeError 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 NewRuntimeErrorWithDefaults() *RuntimeError { this := RuntimeError{} return &this } // GetCode returns the Code 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 *RuntimeError) GetCode() (res RuntimeErrorGetCodeRetType) { res, _ = o.GetCodeOk() return @@ -235,22 +284,26 @@ func (o *RuntimeError) GetCode() (res RuntimeErrorGetCodeRetType) { // GetCodeOk returns a tuple with the Code 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 *RuntimeError) GetCodeOk() (ret RuntimeErrorGetCodeRetType, ok bool) { return getRuntimeErrorGetCodeAttributeTypeOk(o.Code) } // HasCode 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 *RuntimeError) HasCode() bool { _, ok := o.GetCodeOk() return ok } // SetCode gets a reference to the given string and assigns it to the Code field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RuntimeError) SetCode(v RuntimeErrorGetCodeRetType) { setRuntimeErrorGetCodeAttributeType(&o.Code, v) } // GetDetails returns the Details 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 *RuntimeError) GetDetails() (res RuntimeErrorGetDetailsRetType) { res, _ = o.GetDetailsOk() return @@ -258,22 +311,26 @@ func (o *RuntimeError) GetDetails() (res RuntimeErrorGetDetailsRetType) { // GetDetailsOk returns a tuple with the Details 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 *RuntimeError) GetDetailsOk() (ret RuntimeErrorGetDetailsRetType, ok bool) { return getRuntimeErrorGetDetailsAttributeTypeOk(o.Details) } // HasDetails 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 *RuntimeError) HasDetails() bool { _, ok := o.GetDetailsOk() return ok } // SetDetails gets a reference to the given string and assigns it to the Details field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RuntimeError) SetDetails(v RuntimeErrorGetDetailsRetType) { setRuntimeErrorGetDetailsAttributeType(&o.Details, v) } // GetMessage returns the Message 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 *RuntimeError) GetMessage() (res RuntimeErrorGetMessageRetType) { res, _ = o.GetMessageOk() return @@ -281,21 +338,25 @@ func (o *RuntimeError) GetMessage() (res RuntimeErrorGetMessageRetType) { // GetMessageOk returns a tuple with the Message 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 *RuntimeError) GetMessageOk() (ret RuntimeErrorGetMessageRetType, ok bool) { return getRuntimeErrorGetMessageAttributeTypeOk(o.Message) } // HasMessage 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 *RuntimeError) HasMessage() bool { _, ok := o.GetMessageOk() return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RuntimeError) SetMessage(v RuntimeErrorGetMessageRetType) { setRuntimeErrorGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o RuntimeError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getRuntimeErrorGetCodeAttributeTypeOk(o.Code); ok { @@ -310,37 +371,45 @@ func (o RuntimeError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableRuntimeError struct { value *RuntimeError isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableRuntimeError) Get() *RuntimeError { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableRuntimeError) Set(val *RuntimeError) { 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 NullableRuntimeError) 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 *NullableRuntimeError) 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 NewNullableRuntimeError(val *RuntimeError) *NullableRuntimeError { return &NullableRuntimeError{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 NullableRuntimeError) 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 *NullableRuntimeError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_taint.go b/services/ske/model_taint.go index 1480de6d5..08d69879f 100644 --- a/services/ske/model_taint.go +++ b/services/ske/model_taint.go @@ -8,6 +8,7 @@ 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 ( @@ -26,22 +27,28 @@ var _ MappedNullable = &Taint{} // TaintEffect the model 'Taint' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintEffect string // List of Effect const ( - TAINTEFFECT_NO_SCHEDULE TaintEffect = "NoSchedule" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + TAINTEFFECT_NO_SCHEDULE TaintEffect = "NoSchedule" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead TAINTEFFECT_PREFER_NO_SCHEDULE TaintEffect = "PreferNoSchedule" - TAINTEFFECT_NO_EXECUTE TaintEffect = "NoExecute" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + TAINTEFFECT_NO_EXECUTE TaintEffect = "NoExecute" ) // All allowed values of Taint enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedTaintEffectEnumValues = []TaintEffect{ "NoSchedule", "PreferNoSchedule", "NoExecute", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *TaintEffect) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -69,6 +76,7 @@ func (v *TaintEffect) UnmarshalJSON(src []byte) error { // NewTaintEffectFromValue returns a pointer to a valid TaintEffect // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewTaintEffectFromValue(v TaintEffect) (*TaintEffect, error) { ev := TaintEffect(v) if ev.IsValid() { @@ -79,6 +87,7 @@ func NewTaintEffectFromValue(v TaintEffect) (*TaintEffect, error) { } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v TaintEffect) IsValid() bool { for _, existing := range AllowedTaintEffectEnumValues { if existing == v { @@ -89,50 +98,65 @@ func (v TaintEffect) IsValid() bool { } // Ptr returns reference to EffectEffect value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v TaintEffect) Ptr() *TaintEffect { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTaintEffect struct { value *TaintEffect isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTaintEffect) Get() *TaintEffect { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTaintEffect) Set(val *TaintEffect) { 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 NullableTaintEffect) 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 *NullableTaintEffect) 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 NewNullableTaintEffect(val *TaintEffect) *NullableTaintEffect { return &NullableTaintEffect{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 NullableTaintEffect) 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 *NullableTaintEffect) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetEffectAttributeType = *TaintEffect + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetEffectArgType = TaintEffect + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetEffectRetType = TaintEffect +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getTaintGetEffectAttributeTypeOk(arg TaintGetEffectAttributeType) (ret TaintGetEffectRetType, ok bool) { if arg == nil { return ret, false @@ -140,6 +164,7 @@ func getTaintGetEffectAttributeTypeOk(arg TaintGetEffectAttributeType) (ret Tain return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setTaintGetEffectAttributeType(arg *TaintGetEffectAttributeType, val TaintGetEffectRetType) { *arg = &val } @@ -149,8 +174,10 @@ func setTaintGetEffectAttributeType(arg *TaintGetEffectAttributeType, val TaintG */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetKeyAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getTaintGetKeyAttributeTypeOk(arg TaintGetKeyAttributeType) (ret TaintGetKeyRetType, ok bool) { if arg == nil { return ret, false @@ -158,11 +185,15 @@ func getTaintGetKeyAttributeTypeOk(arg TaintGetKeyAttributeType) (ret TaintGetKe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setTaintGetKeyAttributeType(arg *TaintGetKeyAttributeType, val TaintGetKeyRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetKeyArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetKeyRetType = string /* @@ -170,8 +201,10 @@ type TaintGetKeyRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetValueAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getTaintGetValueAttributeTypeOk(arg TaintGetValueAttributeType) (ret TaintGetValueRetType, ok bool) { if arg == nil { return ret, false @@ -179,14 +212,19 @@ func getTaintGetValueAttributeTypeOk(arg TaintGetValueAttributeType) (ret TaintG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setTaintGetValueAttributeType(arg *TaintGetValueAttributeType, val TaintGetValueRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetValueArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TaintGetValueRetType = string // Taint struct for Taint +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Taint struct { // REQUIRED Effect TaintGetEffectAttributeType `json:"effect" required:"true"` @@ -195,12 +233,14 @@ type Taint struct { Value TaintGetValueAttributeType `json:"value,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Taint Taint // NewTaint instantiates a new Taint 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 NewTaint(effect TaintGetEffectArgType, key TaintGetKeyArgType) *Taint { this := Taint{} setTaintGetEffectAttributeType(&this.Effect, effect) @@ -211,12 +251,14 @@ func NewTaint(effect TaintGetEffectArgType, key TaintGetKeyArgType) *Taint { // NewTaintWithDefaults instantiates a new Taint 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 NewTaintWithDefaults() *Taint { this := Taint{} return &this } // GetEffect returns the Effect field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) GetEffect() (ret TaintGetEffectRetType) { ret, _ = o.GetEffectOk() return ret @@ -224,16 +266,19 @@ func (o *Taint) GetEffect() (ret TaintGetEffectRetType) { // GetEffectOk returns a tuple with the Effect field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) GetEffectOk() (ret TaintGetEffectRetType, ok bool) { return getTaintGetEffectAttributeTypeOk(o.Effect) } // SetEffect sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) SetEffect(v TaintGetEffectRetType) { setTaintGetEffectAttributeType(&o.Effect, v) } // GetKey returns the Key field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) GetKey() (ret TaintGetKeyRetType) { ret, _ = o.GetKeyOk() return ret @@ -241,16 +286,19 @@ func (o *Taint) GetKey() (ret TaintGetKeyRetType) { // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) GetKeyOk() (ret TaintGetKeyRetType, ok bool) { return getTaintGetKeyAttributeTypeOk(o.Key) } // SetKey sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) SetKey(v TaintGetKeyRetType) { setTaintGetKeyAttributeType(&o.Key, v) } // GetValue returns the Value 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 *Taint) GetValue() (res TaintGetValueRetType) { res, _ = o.GetValueOk() return @@ -258,21 +306,25 @@ func (o *Taint) GetValue() (res TaintGetValueRetType) { // GetValueOk returns a tuple with the Value 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 *Taint) GetValueOk() (ret TaintGetValueRetType, ok bool) { return getTaintGetValueAttributeTypeOk(o.Value) } // HasValue 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 *Taint) HasValue() bool { _, ok := o.GetValueOk() return ok } // SetValue gets a reference to the given string and assigns it to the Value field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Taint) SetValue(v TaintGetValueRetType) { setTaintGetValueAttributeType(&o.Value, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Taint) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getTaintGetEffectAttributeTypeOk(o.Effect); ok { @@ -287,37 +339,45 @@ func (o Taint) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTaint struct { value *Taint isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTaint) Get() *Taint { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTaint) Set(val *Taint) { 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 NullableTaint) 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 *NullableTaint) 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 NewNullableTaint(val *Taint) *NullableTaint { return &NullableTaint{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 NullableTaint) 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 *NullableTaint) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_time_window.go b/services/ske/model_time_window.go index af11e22c2..a75f581e5 100644 --- a/services/ske/model_time_window.go +++ b/services/ske/model_time_window.go @@ -8,6 +8,7 @@ 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 ( @@ -23,10 +24,16 @@ var _ MappedNullable = &TimeWindow{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindowGetEndAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindowGetEndArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindowGetEndRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getTimeWindowGetEndAttributeTypeOk(arg TimeWindowGetEndAttributeType) (ret TimeWindowGetEndRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getTimeWindowGetEndAttributeTypeOk(arg TimeWindowGetEndAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setTimeWindowGetEndAttributeType(arg *TimeWindowGetEndAttributeType, val TimeWindowGetEndRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setTimeWindowGetEndAttributeType(arg *TimeWindowGetEndAttributeType, val Ti */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindowGetStartAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindowGetStartArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindowGetStartRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getTimeWindowGetStartAttributeTypeOk(arg TimeWindowGetStartAttributeType) (ret TimeWindowGetStartRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +68,13 @@ func getTimeWindowGetStartAttributeTypeOk(arg TimeWindowGetStartAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setTimeWindowGetStartAttributeType(arg *TimeWindowGetStartAttributeType, val TimeWindowGetStartRetType) { *arg = &val } // TimeWindow struct for TimeWindow +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TimeWindow struct { // REQUIRED End TimeWindowGetEndAttributeType `json:"end" required:"true"` @@ -66,12 +82,14 @@ type TimeWindow struct { Start TimeWindowGetStartAttributeType `json:"start" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _TimeWindow TimeWindow // NewTimeWindow instantiates a new TimeWindow 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 NewTimeWindow(end TimeWindowGetEndArgType, start TimeWindowGetStartArgType) *TimeWindow { this := TimeWindow{} setTimeWindowGetEndAttributeType(&this.End, end) @@ -82,12 +100,14 @@ func NewTimeWindow(end TimeWindowGetEndArgType, start TimeWindowGetStartArgType) // NewTimeWindowWithDefaults instantiates a new TimeWindow 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 NewTimeWindowWithDefaults() *TimeWindow { this := TimeWindow{} return &this } // GetEnd returns the End field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TimeWindow) GetEnd() (ret TimeWindowGetEndRetType) { ret, _ = o.GetEndOk() return ret @@ -95,16 +115,19 @@ func (o *TimeWindow) GetEnd() (ret TimeWindowGetEndRetType) { // GetEndOk returns a tuple with the End field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TimeWindow) GetEndOk() (ret TimeWindowGetEndRetType, ok bool) { return getTimeWindowGetEndAttributeTypeOk(o.End) } // SetEnd sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TimeWindow) SetEnd(v TimeWindowGetEndRetType) { setTimeWindowGetEndAttributeType(&o.End, v) } // GetStart returns the Start field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TimeWindow) GetStart() (ret TimeWindowGetStartRetType) { ret, _ = o.GetStartOk() return ret @@ -112,15 +135,18 @@ func (o *TimeWindow) GetStart() (ret TimeWindowGetStartRetType) { // GetStartOk returns a tuple with the Start field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TimeWindow) GetStartOk() (ret TimeWindowGetStartRetType, ok bool) { return getTimeWindowGetStartAttributeTypeOk(o.Start) } // SetStart sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *TimeWindow) SetStart(v TimeWindowGetStartRetType) { setTimeWindowGetStartAttributeType(&o.Start, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o TimeWindow) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getTimeWindowGetEndAttributeTypeOk(o.End); ok { @@ -132,37 +158,45 @@ func (o TimeWindow) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTimeWindow struct { value *TimeWindow isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTimeWindow) Get() *TimeWindow { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTimeWindow) Set(val *TimeWindow) { 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 NullableTimeWindow) 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 *NullableTimeWindow) 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 NewNullableTimeWindow(val *TimeWindow) *NullableTimeWindow { return &NullableTimeWindow{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 NullableTimeWindow) 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 *NullableTimeWindow) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_v2_control_plane_network.go b/services/ske/model_v2_control_plane_network.go index c838baef2..ef5d4cc5d 100644 --- a/services/ske/model_v2_control_plane_network.go +++ b/services/ske/model_v2_control_plane_network.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &V2ControlPlaneNetwork{} */ // isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type V2ControlPlaneNetworkGetAccessScopeAttributeType = *AccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type V2ControlPlaneNetworkGetAccessScopeArgType = AccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type V2ControlPlaneNetworkGetAccessScopeRetType = AccessScope +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getV2ControlPlaneNetworkGetAccessScopeAttributeTypeOk(arg V2ControlPlaneNetworkGetAccessScopeAttributeType) (ret V2ControlPlaneNetworkGetAccessScopeRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getV2ControlPlaneNetworkGetAccessScopeAttributeTypeOk(arg V2ControlPlaneNet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setV2ControlPlaneNetworkGetAccessScopeAttributeType(arg *V2ControlPlaneNetworkGetAccessScopeAttributeType, val V2ControlPlaneNetworkGetAccessScopeRetType) { *arg = &val } // V2ControlPlaneNetwork struct for V2ControlPlaneNetwork +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type V2ControlPlaneNetwork struct { AccessScope V2ControlPlaneNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"` } @@ -46,6 +55,7 @@ type V2ControlPlaneNetwork struct { // 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 NewV2ControlPlaneNetwork() *V2ControlPlaneNetwork { this := V2ControlPlaneNetwork{} return &this @@ -54,12 +64,14 @@ func NewV2ControlPlaneNetwork() *V2ControlPlaneNetwork { // NewV2ControlPlaneNetworkWithDefaults instantiates a new V2ControlPlaneNetwork 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 NewV2ControlPlaneNetworkWithDefaults() *V2ControlPlaneNetwork { this := V2ControlPlaneNetwork{} return &this } // GetAccessScope returns the AccessScope 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 *V2ControlPlaneNetwork) GetAccessScope() (res V2ControlPlaneNetworkGetAccessScopeRetType) { res, _ = o.GetAccessScopeOk() return @@ -67,21 +79,25 @@ func (o *V2ControlPlaneNetwork) GetAccessScope() (res V2ControlPlaneNetworkGetAc // GetAccessScopeOk returns a tuple with the AccessScope 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 *V2ControlPlaneNetwork) GetAccessScopeOk() (ret V2ControlPlaneNetworkGetAccessScopeRetType, ok bool) { return getV2ControlPlaneNetworkGetAccessScopeAttributeTypeOk(o.AccessScope) } // HasAccessScope 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 *V2ControlPlaneNetwork) HasAccessScope() bool { _, ok := o.GetAccessScopeOk() return ok } // SetAccessScope gets a reference to the given AccessScope and assigns it to the AccessScope field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *V2ControlPlaneNetwork) SetAccessScope(v V2ControlPlaneNetworkGetAccessScopeRetType) { setV2ControlPlaneNetworkGetAccessScopeAttributeType(&o.AccessScope, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o V2ControlPlaneNetwork) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getV2ControlPlaneNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok { @@ -90,37 +106,45 @@ func (o V2ControlPlaneNetwork) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableV2ControlPlaneNetwork struct { value *V2ControlPlaneNetwork isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableV2ControlPlaneNetwork) Get() *V2ControlPlaneNetwork { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableV2ControlPlaneNetwork) Set(val *V2ControlPlaneNetwork) { 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 NullableV2ControlPlaneNetwork) 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 *NullableV2ControlPlaneNetwork) 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 NewNullableV2ControlPlaneNetwork(val *V2ControlPlaneNetwork) *NullableV2ControlPlaneNetwork { return &NullableV2ControlPlaneNetwork{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 NullableV2ControlPlaneNetwork) 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 *NullableV2ControlPlaneNetwork) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_volume.go b/services/ske/model_volume.go index c13b4c5b8..0feb40196 100644 --- a/services/ske/model_volume.go +++ b/services/ske/model_volume.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Volume{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeGetSizeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeGetSizeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeGetSizeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getVolumeGetSizeAttributeTypeOk(arg VolumeGetSizeAttributeType) (ret VolumeGetSizeRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getVolumeGetSizeAttributeTypeOk(arg VolumeGetSizeAttributeType) (ret Volume return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setVolumeGetSizeAttributeType(arg *VolumeGetSizeAttributeType, val VolumeGetSizeRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setVolumeGetSizeAttributeType(arg *VolumeGetSizeAttributeType, val VolumeGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeGetTypeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getVolumeGetTypeAttributeTypeOk(arg VolumeGetTypeAttributeType) (ret VolumeGetTypeRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getVolumeGetTypeAttributeTypeOk(arg VolumeGetTypeAttributeType) (ret Volume return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setVolumeGetTypeAttributeType(arg *VolumeGetTypeAttributeType, val VolumeGetTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeGetTypeRetType = string // Volume struct for Volume +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Volume struct { // Can be cast to int32 without loss of precision. // REQUIRED @@ -67,12 +82,14 @@ type Volume struct { Type VolumeGetTypeAttributeType `json:"type,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Volume Volume // NewVolume instantiates a new Volume 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 NewVolume(size VolumeGetSizeArgType) *Volume { this := Volume{} setVolumeGetSizeAttributeType(&this.Size, size) @@ -82,12 +99,14 @@ func NewVolume(size VolumeGetSizeArgType) *Volume { // NewVolumeWithDefaults instantiates a new Volume 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 NewVolumeWithDefaults() *Volume { this := Volume{} return &this } // GetSize returns the Size field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Volume) GetSize() (ret VolumeGetSizeRetType) { ret, _ = o.GetSizeOk() return ret @@ -95,16 +114,19 @@ func (o *Volume) GetSize() (ret VolumeGetSizeRetType) { // GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Volume) GetSizeOk() (ret VolumeGetSizeRetType, ok bool) { return getVolumeGetSizeAttributeTypeOk(o.Size) } // SetSize sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Volume) SetSize(v VolumeGetSizeRetType) { setVolumeGetSizeAttributeType(&o.Size, v) } // GetType returns the Type 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 *Volume) GetType() (res VolumeGetTypeRetType) { res, _ = o.GetTypeOk() return @@ -112,21 +134,25 @@ func (o *Volume) GetType() (res VolumeGetTypeRetType) { // GetTypeOk returns a tuple with the Type 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 *Volume) GetTypeOk() (ret VolumeGetTypeRetType, ok bool) { return getVolumeGetTypeAttributeTypeOk(o.Type) } // HasType 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 *Volume) HasType() bool { _, ok := o.GetTypeOk() return ok } // SetType gets a reference to the given string and assigns it to the Type field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Volume) SetType(v VolumeGetTypeRetType) { setVolumeGetTypeAttributeType(&o.Type, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Volume) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getVolumeGetSizeAttributeTypeOk(o.Size); ok { @@ -138,37 +164,45 @@ func (o Volume) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableVolume struct { value *Volume isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableVolume) Get() *Volume { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableVolume) Set(val *Volume) { 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 NullableVolume) 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 *NullableVolume) 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 NewNullableVolume(val *Volume) *NullableVolume { return &NullableVolume{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 NullableVolume) 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 *NullableVolume) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/model_volume_type.go b/services/ske/model_volume_type.go index 7ea304ef4..cbcbde939 100644 --- a/services/ske/model_volume_type.go +++ b/services/ske/model_volume_type.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &VolumeType{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeTypeGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getVolumeTypeGetNameAttributeTypeOk(arg VolumeTypeGetNameAttributeType) (ret VolumeTypeGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getVolumeTypeGetNameAttributeTypeOk(arg VolumeTypeGetNameAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setVolumeTypeGetNameAttributeType(arg *VolumeTypeGetNameAttributeType, val VolumeTypeGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeTypeGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeTypeGetNameRetType = string // VolumeType struct for VolumeType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type VolumeType struct { Name VolumeTypeGetNameAttributeType `json:"name,omitempty"` } @@ -47,6 +55,7 @@ type VolumeType struct { // 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 NewVolumeType() *VolumeType { this := VolumeType{} return &this @@ -55,12 +64,14 @@ func NewVolumeType() *VolumeType { // NewVolumeTypeWithDefaults instantiates a new VolumeType 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 NewVolumeTypeWithDefaults() *VolumeType { this := VolumeType{} return &this } // GetName returns the Name 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 *VolumeType) GetName() (res VolumeTypeGetNameRetType) { res, _ = o.GetNameOk() return @@ -68,21 +79,25 @@ func (o *VolumeType) GetName() (res VolumeTypeGetNameRetType) { // GetNameOk returns a tuple with the Name 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 *VolumeType) GetNameOk() (ret VolumeTypeGetNameRetType, ok bool) { return getVolumeTypeGetNameAttributeTypeOk(o.Name) } // HasName 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 *VolumeType) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *VolumeType) SetName(v VolumeTypeGetNameRetType) { setVolumeTypeGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o VolumeType) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getVolumeTypeGetNameAttributeTypeOk(o.Name); ok { @@ -91,37 +106,45 @@ func (o VolumeType) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableVolumeType struct { value *VolumeType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableVolumeType) Get() *VolumeType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableVolumeType) Set(val *VolumeType) { 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 NullableVolumeType) 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 *NullableVolumeType) 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 NewNullableVolumeType(val *VolumeType) *NullableVolumeType { return &NullableVolumeType{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 NullableVolumeType) 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 *NullableVolumeType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/ske/oas_commit b/services/ske/oas_commit index 588ee296b..853627d06 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -964ac4ce34f0b6417f2496a1d48585c4926dee3a +335aa32af4d6c0d2a036b8567773da2f051f7efb diff --git a/services/ske/utils.go b/services/ske/utils.go index 59b087426..85041ff9c 100644 --- a/services/ske/utils.go +++ b/services/ske/utils.go @@ -18,341 +18,419 @@ import ( ) // PtrBool is a helper routine that returns a pointer to given boolean value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrBool(v bool) *bool { return &v } // PtrInt is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt(v int) *int { return &v } // PtrInt32 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt64(v int64) *int64 { return &v } // PtrFloat32 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat32(v float32) *float32 { return &v } // PtrFloat64 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat64(v float64) *float64 { return &v } // PtrString is a helper routine that returns a pointer to given string value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrTime(v time.Time) *time.Time { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValue[T any] struct { value *T isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) Get() *T { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Set(val *T) { 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 NullableValue[T]) 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 *NullableValue[T]) 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 type NullableBool struct { value *bool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) Get() *bool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Set(val *bool) { 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 NullableBool) 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 *NullableBool) 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 NewNullableBool(val *bool) *NullableBool { return &NullableBool{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 NullableBool) 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 *NullableBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt struct { value *int isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) Get() *int { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Set(val *int) { 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 NullableInt) 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 *NullableInt) 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 NewNullableInt(val *int) *NullableInt { return &NullableInt{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 NullableInt) 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 *NullableInt) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt32 struct { value *int32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) Get() *int32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Set(val *int32) { 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 NullableInt32) 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 *NullableInt32) 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 NewNullableInt32(val *int32) *NullableInt32 { return &NullableInt32{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 NullableInt32) 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 *NullableInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt64 struct { value *int64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) Get() *int64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Set(val *int64) { 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 NullableInt64) 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 *NullableInt64) 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 NewNullableInt64(val *int64) *NullableInt64 { return &NullableInt64{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 NullableInt64) 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 *NullableInt64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat32 struct { value *float32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) Get() *float32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Set(val *float32) { 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 NullableFloat32) 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 *NullableFloat32) 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 NewNullableFloat32(val *float32) *NullableFloat32 { return &NullableFloat32{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 NullableFloat32) 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 *NullableFloat32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat64 struct { value *float64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) Get() *float64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Set(val *float64) { 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 NullableFloat64) 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 *NullableFloat64) 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 NewNullableFloat64(val *float64) *NullableFloat64 { return &NullableFloat64{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 NullableFloat64) 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 *NullableFloat64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableString struct { value *string isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) Get() *string { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Set(val *string) { 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 NullableString) 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 *NullableString) 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 NewNullableString(val *string) *NullableString { return &NullableString{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 NullableString) 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 *NullableString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTime struct { value *time.Time isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) Get() *time.Time { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Set(val *time.Time) { 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 NullableTime) 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 *NullableTime) 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 NewNullableTime(val *time.Time) *NullableTime { return &NullableTime{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 NullableTime) MarshalJSON() ([]byte, error) { return v.value.MarshalJSON() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } // IsNil checks if an input is nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func IsNil(i interface{}) bool { if i == nil { return true @@ -369,13 +447,16 @@ func IsNil(i interface{}) bool { return false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MappedNullable interface { ToMap() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // randString returns a random string with a specified length. It panics if n <= 0. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func randString(n int) string { b := make([]byte, n) for i := range b { diff --git a/services/ske/v1api/api_default.go b/services/ske/v1api/api_default.go new file mode 100644 index 000000000..5cd64d0a2 --- /dev/null +++ b/services/ske/v1api/api_default.go @@ -0,0 +1,2051 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CompleteCredentialsRotation Complete cluster credentials rotation + + Complete cluster credentials rotation. This is step 2 of a two-step process. Start the rotation using [start-credentials-rotation](#tag/Credentials/operation/SkeService_StartClusterCredentialsRotation). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiCompleteCredentialsRotationRequest + */ + CompleteCredentialsRotation(ctx context.Context, projectId string, clusterName string) ApiCompleteCredentialsRotationRequest + + // CompleteCredentialsRotationExecute executes the request + // @return map[string]interface{} + CompleteCredentialsRotationExecute(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) + + /* + CreateKubeconfig Create a kubeconfig + + Create a new kubeconfig for the cluster. You can specify the expiration (in seconds) in the request body. Its value must be in the range from 600 (10 min) to 15552000 (6 months). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiCreateKubeconfigRequest + */ + CreateKubeconfig(ctx context.Context, projectId string, clusterName string) ApiCreateKubeconfigRequest + + // CreateKubeconfigExecute executes the request + // @return Kubeconfig + CreateKubeconfigExecute(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) + + /* + CreateOrUpdateCluster Create or update a cluster + + Create a new cluster in your project or modify an existing one. To get valid values for certain properties please check the [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiCreateOrUpdateClusterRequest + */ + CreateOrUpdateCluster(ctx context.Context, projectId string, clusterName string) ApiCreateOrUpdateClusterRequest + + // CreateOrUpdateClusterExecute executes the request + // @return Cluster + CreateOrUpdateClusterExecute(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) + + /* + DeleteCluster Delete a cluster + + Delete Kubernetes cluster specified by the identifier, belonging to the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiDeleteClusterRequest + */ + DeleteCluster(ctx context.Context, projectId string, clusterName string) ApiDeleteClusterRequest + + // DeleteClusterExecute executes the request + // @return map[string]interface{} + DeleteClusterExecute(r ApiDeleteClusterRequest) (map[string]interface{}, error) + + /* + GetCluster Get a cluster + + Get Kubernetes cluster for the specified identifier, belonging to the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiGetClusterRequest + */ + GetCluster(ctx context.Context, projectId string, clusterName string) ApiGetClusterRequest + + // GetClusterExecute executes the request + // @return Cluster + GetClusterExecute(r ApiGetClusterRequest) (*Cluster, error) + + /* + GetLoginKubeconfig Get a kubeconfig 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiGetLoginKubeconfigRequest + */ + GetLoginKubeconfig(ctx context.Context, projectId string, clusterName string) ApiGetLoginKubeconfigRequest + + // GetLoginKubeconfigExecute executes the request + // @return LoginKubeconfig + GetLoginKubeconfigExecute(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) + + /* + ListClusters List all clusters + + Return a list of Kubernetes clusters in the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiListClustersRequest + */ + ListClusters(ctx context.Context, projectId string) ApiListClustersRequest + + // ListClustersExecute executes the request + // @return ListClustersResponse + ListClustersExecute(r ApiListClustersRequest) (*ListClustersResponse, error) + + /* + ListProviderOptions List provider options + + Returns a list of supported Kubernetes versions and a list of supported machine types for the cluster nodes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListProviderOptionsRequest + */ + ListProviderOptions(ctx context.Context) ApiListProviderOptionsRequest + + // ListProviderOptionsExecute executes the request + // @return ProviderOptions + ListProviderOptionsExecute(r ApiListProviderOptionsRequest) (*ProviderOptions, error) + + /* + StartCredentialsRotation Start cluster credentials rotation + + Start cluster credentials rotation. This is step 1 of a two-step process. Complete the rotation using [complete-credentials-rotation](#tag/Credentials/operation/SkeService_CompleteClusterCredentialsRotation). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiStartCredentialsRotationRequest + */ + StartCredentialsRotation(ctx context.Context, projectId string, clusterName string) ApiStartCredentialsRotationRequest + + // StartCredentialsRotationExecute executes the request + // @return map[string]interface{} + StartCredentialsRotationExecute(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) + + /* + TriggerHibernate Trigger cluster hibernation + + Trigger immediate hibernation of the cluster. If the cluster is already in hibernation state, the method does nothing. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerHibernateRequest + */ + TriggerHibernate(ctx context.Context, projectId string, clusterName string) ApiTriggerHibernateRequest + + // TriggerHibernateExecute executes the request + // @return map[string]interface{} + TriggerHibernateExecute(r ApiTriggerHibernateRequest) (map[string]interface{}, error) + + /* + TriggerMaintenance Trigger cluster maintenance + + Trigger immediate maintenance of the cluster. The autoUpdate configuration specified in the Maintenance object of the cluster spec defines what is updated during the immediate maintenance operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerMaintenanceRequest + */ + TriggerMaintenance(ctx context.Context, projectId string, clusterName string) ApiTriggerMaintenanceRequest + + // TriggerMaintenanceExecute executes the request + // @return map[string]interface{} + TriggerMaintenanceExecute(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) + + /* + TriggerReconcile Trigger cluster reconciliation + + Trigger immediate reconciliation of the complete cluster without changing the cluster specification. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerReconcileRequest + */ + TriggerReconcile(ctx context.Context, projectId string, clusterName string) ApiTriggerReconcileRequest + + // TriggerReconcileExecute executes the request + // @return map[string]interface{} + TriggerReconcileExecute(r ApiTriggerReconcileRequest) (map[string]interface{}, error) + + /* + TriggerWakeup Trigger cluster wakeup + + Trigger immediate wake up of the cluster. If the cluster is already in running state, the method does nothing. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerWakeupRequest + */ + TriggerWakeup(ctx context.Context, projectId string, clusterName string) ApiTriggerWakeupRequest + + // TriggerWakeupExecute executes the request + // @return map[string]interface{} + TriggerWakeupExecute(r ApiTriggerWakeupRequest) (map[string]interface{}, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCompleteCredentialsRotationRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiCompleteCredentialsRotationRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.CompleteCredentialsRotationExecute(r) +} + +/* +CompleteCredentialsRotation Complete cluster credentials rotation + +Complete cluster credentials rotation. This is step 2 of a two-step process. Start the rotation using [start-credentials-rotation](#tag/Credentials/operation/SkeService_StartClusterCredentialsRotation). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiCompleteCredentialsRotationRequest +*/ +func (a *DefaultAPIService) CompleteCredentialsRotation(ctx context.Context, projectId string, clusterName string) ApiCompleteCredentialsRotationRequest { + return ApiCompleteCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) CompleteCredentialsRotationExecute(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CompleteCredentialsRotation") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/complete-credentials-rotation" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiCreateKubeconfigRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string + createKubeconfigPayload *CreateKubeconfigPayload +} + +func (r ApiCreateKubeconfigRequest) CreateKubeconfigPayload(createKubeconfigPayload CreateKubeconfigPayload) ApiCreateKubeconfigRequest { + r.createKubeconfigPayload = &createKubeconfigPayload + return r +} + +func (r ApiCreateKubeconfigRequest) Execute() (*Kubeconfig, error) { + return r.ApiService.CreateKubeconfigExecute(r) +} + +/* +CreateKubeconfig Create a kubeconfig + +Create a new kubeconfig for the cluster. You can specify the expiration (in seconds) in the request body. Its value must be in the range from 600 (10 min) to 15552000 (6 months). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiCreateKubeconfigRequest +*/ +func (a *DefaultAPIService) CreateKubeconfig(ctx context.Context, projectId string, clusterName string) ApiCreateKubeconfigRequest { + return ApiCreateKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return Kubeconfig +func (a *DefaultAPIService) CreateKubeconfigExecute(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Kubeconfig + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateKubeconfig") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/kubeconfig" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", url.PathEscape(parameterValueToString(r.clusterName, "clusterName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createKubeconfigPayload == nil { + return localVarReturnValue, reportError("createKubeconfigPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createKubeconfigPayload + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiCreateOrUpdateClusterRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string + createOrUpdateClusterPayload *CreateOrUpdateClusterPayload +} + +func (r ApiCreateOrUpdateClusterRequest) CreateOrUpdateClusterPayload(createOrUpdateClusterPayload CreateOrUpdateClusterPayload) ApiCreateOrUpdateClusterRequest { + r.createOrUpdateClusterPayload = &createOrUpdateClusterPayload + return r +} + +func (r ApiCreateOrUpdateClusterRequest) Execute() (*Cluster, error) { + return r.ApiService.CreateOrUpdateClusterExecute(r) +} + +/* +CreateOrUpdateCluster Create or update a cluster + +Create a new cluster in your project or modify an existing one. To get valid values for certain properties please check the [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiCreateOrUpdateClusterRequest +*/ +func (a *DefaultAPIService) CreateOrUpdateCluster(ctx context.Context, projectId string, clusterName string) ApiCreateOrUpdateClusterRequest { + return ApiCreateOrUpdateClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *DefaultAPIService) CreateOrUpdateClusterExecute(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateOrUpdateCluster") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", url.PathEscape(parameterValueToString(r.clusterName, "clusterName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createOrUpdateClusterPayload == nil { + return localVarReturnValue, reportError("createOrUpdateClusterPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createOrUpdateClusterPayload + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiDeleteClusterRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiDeleteClusterRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteClusterExecute(r) +} + +/* +DeleteCluster Delete a cluster + +Delete Kubernetes cluster specified by the identifier, belonging to the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiDeleteClusterRequest +*/ +func (a *DefaultAPIService) DeleteCluster(ctx context.Context, projectId string, clusterName string) ApiDeleteClusterRequest { + return ApiDeleteClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteClusterExecute(r ApiDeleteClusterRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteCluster") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiGetClusterRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiGetClusterRequest) Execute() (*Cluster, error) { + return r.ApiService.GetClusterExecute(r) +} + +/* +GetCluster Get a cluster + +Get Kubernetes cluster for the specified identifier, belonging to the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiGetClusterRequest +*/ +func (a *DefaultAPIService) GetCluster(ctx context.Context, projectId string, clusterName string) ApiGetClusterRequest { + return ApiGetClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *DefaultAPIService) GetClusterExecute(r ApiGetClusterRequest) (*Cluster, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetCluster") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiGetLoginKubeconfigRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiGetLoginKubeconfigRequest) Execute() (*LoginKubeconfig, error) { + return r.ApiService.GetLoginKubeconfigExecute(r) +} + +/* +GetLoginKubeconfig Get a kubeconfig 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiGetLoginKubeconfigRequest +*/ +func (a *DefaultAPIService) GetLoginKubeconfig(ctx context.Context, projectId string, clusterName string) ApiGetLoginKubeconfigRequest { + return ApiGetLoginKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return LoginKubeconfig +func (a *DefaultAPIService) GetLoginKubeconfigExecute(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoginKubeconfig + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetLoginKubeconfig") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/kubeconfig/login" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiListClustersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListClustersRequest) Execute() (*ListClustersResponse, error) { + return r.ApiService.ListClustersExecute(r) +} + +/* +ListClusters List all clusters + +Return a list of Kubernetes clusters in the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiListClustersRequest +*/ +func (a *DefaultAPIService) ListClusters(ctx context.Context, projectId string) ApiListClustersRequest { + return ApiListClustersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListClustersResponse +func (a *DefaultAPIService) ListClustersExecute(r ApiListClustersRequest) (*ListClustersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListClustersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListClusters") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiListProviderOptionsRequest struct { + ctx context.Context + ApiService DefaultAPI +} + +func (r ApiListProviderOptionsRequest) Execute() (*ProviderOptions, error) { + return r.ApiService.ListProviderOptionsExecute(r) +} + +/* +ListProviderOptions List provider options + +Returns a list of supported Kubernetes versions and a list of supported machine types for the cluster nodes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListProviderOptionsRequest +*/ +func (a *DefaultAPIService) ListProviderOptions(ctx context.Context) ApiListProviderOptionsRequest { + return ApiListProviderOptionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProviderOptions +func (a *DefaultAPIService) ListProviderOptionsExecute(r ApiListProviderOptionsRequest) (*ProviderOptions, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProviderOptions + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListProviderOptions") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/provider-options" + + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiStartCredentialsRotationRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiStartCredentialsRotationRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.StartCredentialsRotationExecute(r) +} + +/* +StartCredentialsRotation Start cluster credentials rotation + +Start cluster credentials rotation. This is step 1 of a two-step process. Complete the rotation using [complete-credentials-rotation](#tag/Credentials/operation/SkeService_CompleteClusterCredentialsRotation). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiStartCredentialsRotationRequest +*/ +func (a *DefaultAPIService) StartCredentialsRotation(ctx context.Context, projectId string, clusterName string) ApiStartCredentialsRotationRequest { + return ApiStartCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) StartCredentialsRotationExecute(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.StartCredentialsRotation") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/start-credentials-rotation" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerHibernateRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiTriggerHibernateRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerHibernateExecute(r) +} + +/* +TriggerHibernate Trigger cluster hibernation + +Trigger immediate hibernation of the cluster. If the cluster is already in hibernation state, the method does nothing. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerHibernateRequest +*/ +func (a *DefaultAPIService) TriggerHibernate(ctx context.Context, projectId string, clusterName string) ApiTriggerHibernateRequest { + return ApiTriggerHibernateRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerHibernateExecute(r ApiTriggerHibernateRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerHibernate") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/hibernate" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerMaintenanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiTriggerMaintenanceRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerMaintenanceExecute(r) +} + +/* +TriggerMaintenance Trigger cluster maintenance + +Trigger immediate maintenance of the cluster. The autoUpdate configuration specified in the Maintenance object of the cluster spec defines what is updated during the immediate maintenance operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerMaintenanceRequest +*/ +func (a *DefaultAPIService) TriggerMaintenance(ctx context.Context, projectId string, clusterName string) ApiTriggerMaintenanceRequest { + return ApiTriggerMaintenanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerMaintenanceExecute(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerMaintenance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/maintenance" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerReconcileRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiTriggerReconcileRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerReconcileExecute(r) +} + +/* +TriggerReconcile Trigger cluster reconciliation + +Trigger immediate reconciliation of the complete cluster without changing the cluster specification. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerReconcileRequest +*/ +func (a *DefaultAPIService) TriggerReconcile(ctx context.Context, projectId string, clusterName string) ApiTriggerReconcileRequest { + return ApiTriggerReconcileRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerReconcileExecute(r ApiTriggerReconcileRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerReconcile") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/reconcile" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerWakeupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + clusterName string +} + +func (r ApiTriggerWakeupRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerWakeupExecute(r) +} + +/* +TriggerWakeup Trigger cluster wakeup + +Trigger immediate wake up of the cluster. If the cluster is already in running state, the method does nothing. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param clusterName + @return ApiTriggerWakeupRequest +*/ +func (a *DefaultAPIService) TriggerWakeup(ctx context.Context, projectId string, clusterName string) ApiTriggerWakeupRequest { + return ApiTriggerWakeupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerWakeupExecute(r ApiTriggerWakeupRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerWakeup") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/clusters/{clusterName}/wakeup" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} diff --git a/services/ske/v1api/api_default_mock.go b/services/ske/v1api/api_default_mock.go new file mode 100644 index 000000000..c3f7da09c --- /dev/null +++ b/services/ske/v1api/api_default_mock.go @@ -0,0 +1,293 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CompleteCredentialsRotationExecuteMock can be populated to implement the behavior of the CompleteCredentialsRotationExecute function of this mock + CompleteCredentialsRotationExecuteMock *func(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) + // CreateKubeconfigExecuteMock can be populated to implement the behavior of the CreateKubeconfigExecute function of this mock + CreateKubeconfigExecuteMock *func(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) + // CreateOrUpdateClusterExecuteMock can be populated to implement the behavior of the CreateOrUpdateClusterExecute function of this mock + CreateOrUpdateClusterExecuteMock *func(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) + // DeleteClusterExecuteMock can be populated to implement the behavior of the DeleteClusterExecute function of this mock + DeleteClusterExecuteMock *func(r ApiDeleteClusterRequest) (map[string]interface{}, error) + // GetClusterExecuteMock can be populated to implement the behavior of the GetClusterExecute function of this mock + GetClusterExecuteMock *func(r ApiGetClusterRequest) (*Cluster, error) + // GetLoginKubeconfigExecuteMock can be populated to implement the behavior of the GetLoginKubeconfigExecute function of this mock + GetLoginKubeconfigExecuteMock *func(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) + // ListClustersExecuteMock can be populated to implement the behavior of the ListClustersExecute function of this mock + ListClustersExecuteMock *func(r ApiListClustersRequest) (*ListClustersResponse, error) + // ListProviderOptionsExecuteMock can be populated to implement the behavior of the ListProviderOptionsExecute function of this mock + ListProviderOptionsExecuteMock *func(r ApiListProviderOptionsRequest) (*ProviderOptions, error) + // StartCredentialsRotationExecuteMock can be populated to implement the behavior of the StartCredentialsRotationExecute function of this mock + StartCredentialsRotationExecuteMock *func(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) + // TriggerHibernateExecuteMock can be populated to implement the behavior of the TriggerHibernateExecute function of this mock + TriggerHibernateExecuteMock *func(r ApiTriggerHibernateRequest) (map[string]interface{}, error) + // TriggerMaintenanceExecuteMock can be populated to implement the behavior of the TriggerMaintenanceExecute function of this mock + TriggerMaintenanceExecuteMock *func(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) + // TriggerReconcileExecuteMock can be populated to implement the behavior of the TriggerReconcileExecute function of this mock + TriggerReconcileExecuteMock *func(r ApiTriggerReconcileRequest) (map[string]interface{}, error) + // TriggerWakeupExecuteMock can be populated to implement the behavior of the TriggerWakeupExecute function of this mock + TriggerWakeupExecuteMock *func(r ApiTriggerWakeupRequest) (map[string]interface{}, error) +} + +func (a DefaultAPIServiceMock) CompleteCredentialsRotation(ctx context.Context, projectId string, clusterName string) ApiCompleteCredentialsRotationRequest { + return ApiCompleteCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// CompleteCredentialsRotationExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CompleteCredentialsRotationExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CompleteCredentialsRotationExecute(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) { + if a.CompleteCredentialsRotationExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.CompleteCredentialsRotationExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateKubeconfig(ctx context.Context, projectId string, clusterName string) ApiCreateKubeconfigRequest { + return ApiCreateKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// CreateKubeconfigExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateKubeconfigExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateKubeconfigExecute(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) { + if a.CreateKubeconfigExecuteMock == nil { + var localVarReturnValue *Kubeconfig + return localVarReturnValue, nil + } + + return (*a.CreateKubeconfigExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateOrUpdateCluster(ctx context.Context, projectId string, clusterName string) ApiCreateOrUpdateClusterRequest { + return ApiCreateOrUpdateClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// CreateOrUpdateClusterExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateOrUpdateClusterExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateOrUpdateClusterExecute(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) { + if a.CreateOrUpdateClusterExecuteMock == nil { + var localVarReturnValue *Cluster + return localVarReturnValue, nil + } + + return (*a.CreateOrUpdateClusterExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteCluster(ctx context.Context, projectId string, clusterName string) ApiDeleteClusterRequest { + return ApiDeleteClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// DeleteClusterExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteClusterExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteClusterExecute(r ApiDeleteClusterRequest) (map[string]interface{}, error) { + if a.DeleteClusterExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteClusterExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetCluster(ctx context.Context, projectId string, clusterName string) ApiGetClusterRequest { + return ApiGetClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// GetClusterExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetClusterExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetClusterExecute(r ApiGetClusterRequest) (*Cluster, error) { + if a.GetClusterExecuteMock == nil { + var localVarReturnValue *Cluster + return localVarReturnValue, nil + } + + return (*a.GetClusterExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetLoginKubeconfig(ctx context.Context, projectId string, clusterName string) ApiGetLoginKubeconfigRequest { + return ApiGetLoginKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// GetLoginKubeconfigExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetLoginKubeconfigExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetLoginKubeconfigExecute(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) { + if a.GetLoginKubeconfigExecuteMock == nil { + var localVarReturnValue *LoginKubeconfig + return localVarReturnValue, nil + } + + return (*a.GetLoginKubeconfigExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListClusters(ctx context.Context, projectId string) ApiListClustersRequest { + return ApiListClustersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListClustersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListClustersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListClustersExecute(r ApiListClustersRequest) (*ListClustersResponse, error) { + if a.ListClustersExecuteMock == nil { + var localVarReturnValue *ListClustersResponse + return localVarReturnValue, nil + } + + return (*a.ListClustersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListProviderOptions(ctx context.Context) ApiListProviderOptionsRequest { + return ApiListProviderOptionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// ListProviderOptionsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListProviderOptionsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListProviderOptionsExecute(r ApiListProviderOptionsRequest) (*ProviderOptions, error) { + if a.ListProviderOptionsExecuteMock == nil { + var localVarReturnValue *ProviderOptions + return localVarReturnValue, nil + } + + return (*a.ListProviderOptionsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) StartCredentialsRotation(ctx context.Context, projectId string, clusterName string) ApiStartCredentialsRotationRequest { + return ApiStartCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// StartCredentialsRotationExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the StartCredentialsRotationExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) StartCredentialsRotationExecute(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) { + if a.StartCredentialsRotationExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.StartCredentialsRotationExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerHibernate(ctx context.Context, projectId string, clusterName string) ApiTriggerHibernateRequest { + return ApiTriggerHibernateRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// TriggerHibernateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerHibernateExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerHibernateExecute(r ApiTriggerHibernateRequest) (map[string]interface{}, error) { + if a.TriggerHibernateExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerHibernateExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerMaintenance(ctx context.Context, projectId string, clusterName string) ApiTriggerMaintenanceRequest { + return ApiTriggerMaintenanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// TriggerMaintenanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerMaintenanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerMaintenanceExecute(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) { + if a.TriggerMaintenanceExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerMaintenanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerReconcile(ctx context.Context, projectId string, clusterName string) ApiTriggerReconcileRequest { + return ApiTriggerReconcileRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// TriggerReconcileExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerReconcileExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerReconcileExecute(r ApiTriggerReconcileRequest) (map[string]interface{}, error) { + if a.TriggerReconcileExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerReconcileExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerWakeup(ctx context.Context, projectId string, clusterName string) ApiTriggerWakeupRequest { + return ApiTriggerWakeupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + clusterName: clusterName, + } +} + +// TriggerWakeupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerWakeupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerWakeupExecute(r ApiTriggerWakeupRequest) (map[string]interface{}, error) { + if a.TriggerWakeupExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerWakeupExecuteMock)(r) +} diff --git a/services/ske/v1api/client.go b/services/ske/v1api/client.go new file mode 100644 index 000000000..79666ddab --- /dev/null +++ b/services/ske/v1api/client.go @@ -0,0 +1,658 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT Kubernetes Engine API API v1.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/ske/v1api/configuration.go b/services/ske/v1api/configuration.go new file mode 100644 index 000000000..2eedfc21d --- /dev/null +++ b/services/ske/v1api/configuration.go @@ -0,0 +1,40 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/ske", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://ske.api.{region}stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "eu01.", + EnumValues: []string{ + "eu01.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/ske/v1api/model_acl.go b/services/ske/v1api/model_acl.go new file mode 100644 index 000000000..88498dc8c --- /dev/null +++ b/services/ske/v1api/model_acl.go @@ -0,0 +1,186 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + +// ACL struct for ACL +type ACL struct { + // Array of CIDRs to allow access to the kubernetes API. + AllowedCidrs []string `json:"allowedCidrs"` + // Enables the acl extension. + Enabled bool `json:"enabled"` +} + +type _ACL ACL + +// NewACL instantiates a new ACL 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 NewACL(allowedCidrs []string, enabled bool) *ACL { + this := ACL{} + this.AllowedCidrs = allowedCidrs + this.Enabled = enabled + return &this +} + +// NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetAllowedCidrs returns the AllowedCidrs field value +func (o *ACL) GetAllowedCidrs() []string { + if o == nil { + var ret []string + return ret + } + + return o.AllowedCidrs +} + +// GetAllowedCidrsOk returns a tuple with the AllowedCidrs field value +// and a boolean to check if the value has been set. +func (o *ACL) GetAllowedCidrsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.AllowedCidrs, true +} + +// SetAllowedCidrs sets field value +func (o *ACL) SetAllowedCidrs(v []string) { + o.AllowedCidrs = v +} + +// GetEnabled returns the Enabled field value +func (o *ACL) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ACL) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *ACL) SetEnabled(v bool) { + o.Enabled = v +} + +func (o ACL) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["allowedCidrs"] = o.AllowedCidrs + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +func (o *ACL) 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{ + "allowedCidrs", + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varACL := _ACL{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varACL) + + if err != nil { + return err + } + + *o = ACL(varACL) + + return err +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_argus.go b/services/ske/v1api/model_argus.go new file mode 100644 index 000000000..abefc8132 --- /dev/null +++ b/services/ske/v1api/model_argus.go @@ -0,0 +1,186 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Argus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Argus{} + +// Argus struct for Argus +type Argus struct { + // Argus instance ID to choose which Argus instance is used. + ArgusInstanceId string `json:"argusInstanceId"` + // Enables the argus extension. + Enabled bool `json:"enabled"` +} + +type _Argus Argus + +// NewArgus instantiates a new Argus 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 NewArgus(argusInstanceId string, enabled bool) *Argus { + this := Argus{} + this.ArgusInstanceId = argusInstanceId + this.Enabled = enabled + return &this +} + +// NewArgusWithDefaults instantiates a new Argus 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 NewArgusWithDefaults() *Argus { + this := Argus{} + return &this +} + +// GetArgusInstanceId returns the ArgusInstanceId field value +func (o *Argus) GetArgusInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.ArgusInstanceId +} + +// GetArgusInstanceIdOk returns a tuple with the ArgusInstanceId field value +// and a boolean to check if the value has been set. +func (o *Argus) GetArgusInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ArgusInstanceId, true +} + +// SetArgusInstanceId sets field value +func (o *Argus) SetArgusInstanceId(v string) { + o.ArgusInstanceId = v +} + +// GetEnabled returns the Enabled field value +func (o *Argus) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *Argus) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *Argus) SetEnabled(v bool) { + o.Enabled = v +} + +func (o Argus) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Argus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["argusInstanceId"] = o.ArgusInstanceId + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +func (o *Argus) 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{ + "argusInstanceId", + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varArgus := _Argus{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varArgus) + + if err != nil { + return err + } + + *o = Argus(varArgus) + + return err +} + +type NullableArgus struct { + value *Argus + isSet bool +} + +func (v NullableArgus) Get() *Argus { + return v.value +} + +func (v *NullableArgus) Set(val *Argus) { + v.value = val + v.isSet = true +} + +func (v NullableArgus) IsSet() bool { + return v.isSet +} + +func (v *NullableArgus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArgus(val *Argus) *NullableArgus { + return &NullableArgus{value: val, isSet: true} +} + +func (v NullableArgus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArgus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_availability_zone.go b/services/ske/v1api/model_availability_zone.go new file mode 100644 index 000000000..a0e33fda8 --- /dev/null +++ b/services/ske/v1api/model_availability_zone.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the AvailabilityZone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AvailabilityZone{} + +// AvailabilityZone struct for AvailabilityZone +type AvailabilityZone struct { + Name *string `json:"name,omitempty"` +} + +// NewAvailabilityZone instantiates a new AvailabilityZone 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 NewAvailabilityZone() *AvailabilityZone { + this := AvailabilityZone{} + return &this +} + +// NewAvailabilityZoneWithDefaults instantiates a new AvailabilityZone 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 NewAvailabilityZoneWithDefaults() *AvailabilityZone { + this := AvailabilityZone{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AvailabilityZone) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *AvailabilityZone) GetNameOk() (*string, 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 *AvailabilityZone) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AvailabilityZone) SetName(v string) { + o.Name = &v +} + +func (o AvailabilityZone) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AvailabilityZone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableAvailabilityZone struct { + value *AvailabilityZone + isSet bool +} + +func (v NullableAvailabilityZone) Get() *AvailabilityZone { + return v.value +} + +func (v *NullableAvailabilityZone) Set(val *AvailabilityZone) { + v.value = val + v.isSet = true +} + +func (v NullableAvailabilityZone) IsSet() bool { + return v.isSet +} + +func (v *NullableAvailabilityZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAvailabilityZone(val *AvailabilityZone) *NullableAvailabilityZone { + return &NullableAvailabilityZone{value: val, isSet: true} +} + +func (v NullableAvailabilityZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAvailabilityZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_cluster.go b/services/ske/v1api/model_cluster.go new file mode 100644 index 000000000..8121cdcba --- /dev/null +++ b/services/ske/v1api/model_cluster.go @@ -0,0 +1,400 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Cluster type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cluster{} + +// Cluster struct for Cluster +type Cluster struct { + Extensions *Extension `json:"extensions,omitempty"` + Hibernation *Hibernation `json:"hibernation,omitempty"` + Kubernetes Kubernetes `json:"kubernetes"` + Maintenance *Maintenance `json:"maintenance,omitempty"` + Name *string `json:"name,omitempty"` + Network *Network `json:"network,omitempty"` + Nodepools []Nodepool `json:"nodepools"` + Status *ClusterStatus `json:"status,omitempty"` +} + +type _Cluster Cluster + +// NewCluster instantiates a new Cluster 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 NewCluster(kubernetes Kubernetes, nodepools []Nodepool) *Cluster { + this := Cluster{} + this.Kubernetes = kubernetes + this.Nodepools = nodepools + return &this +} + +// NewClusterWithDefaults instantiates a new Cluster 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 NewClusterWithDefaults() *Cluster { + this := Cluster{} + return &this +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *Cluster) GetExtensions() Extension { + if o == nil || IsNil(o.Extensions) { + var ret Extension + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetExtensionsOk() (*Extension, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *Cluster) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +func (o *Cluster) SetExtensions(v Extension) { + o.Extensions = &v +} + +// GetHibernation returns the Hibernation field value if set, zero value otherwise. +func (o *Cluster) GetHibernation() Hibernation { + if o == nil || IsNil(o.Hibernation) { + var ret Hibernation + return ret + } + return *o.Hibernation +} + +// GetHibernationOk returns a tuple with the Hibernation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetHibernationOk() (*Hibernation, bool) { + if o == nil || IsNil(o.Hibernation) { + return nil, false + } + return o.Hibernation, true +} + +// HasHibernation returns a boolean if a field has been set. +func (o *Cluster) HasHibernation() bool { + if o != nil && !IsNil(o.Hibernation) { + return true + } + + return false +} + +// SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +func (o *Cluster) SetHibernation(v Hibernation) { + o.Hibernation = &v +} + +// GetKubernetes returns the Kubernetes field value +func (o *Cluster) GetKubernetes() Kubernetes { + if o == nil { + var ret Kubernetes + return ret + } + + return o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value +// and a boolean to check if the value has been set. +func (o *Cluster) GetKubernetesOk() (*Kubernetes, bool) { + if o == nil { + return nil, false + } + return &o.Kubernetes, true +} + +// SetKubernetes sets field value +func (o *Cluster) SetKubernetes(v Kubernetes) { + o.Kubernetes = v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *Cluster) GetMaintenance() Maintenance { + if o == nil || IsNil(o.Maintenance) { + var ret Maintenance + return ret + } + return *o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetMaintenanceOk() (*Maintenance, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *Cluster) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +func (o *Cluster) SetMaintenance(v Maintenance) { + o.Maintenance = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Cluster) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *Cluster) GetNameOk() (*string, 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 *Cluster) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Cluster) SetName(v string) { + o.Name = &v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *Cluster) GetNetwork() Network { + if o == nil || IsNil(o.Network) { + var ret Network + return ret + } + return *o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetNetworkOk() (*Network, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *Cluster) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given Network and assigns it to the Network field. +func (o *Cluster) SetNetwork(v Network) { + o.Network = &v +} + +// GetNodepools returns the Nodepools field value +func (o *Cluster) GetNodepools() []Nodepool { + if o == nil { + var ret []Nodepool + return ret + } + + return o.Nodepools +} + +// GetNodepoolsOk returns a tuple with the Nodepools field value +// and a boolean to check if the value has been set. +func (o *Cluster) GetNodepoolsOk() ([]Nodepool, bool) { + if o == nil { + return nil, false + } + return o.Nodepools, true +} + +// SetNodepools sets field value +func (o *Cluster) SetNodepools(v []Nodepool) { + o.Nodepools = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Cluster) GetStatus() ClusterStatus { + if o == nil || IsNil(o.Status) { + var ret ClusterStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetStatusOk() (*ClusterStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Cluster) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +func (o *Cluster) SetStatus(v ClusterStatus) { + o.Status = &v +} + +func (o Cluster) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Cluster) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + if !IsNil(o.Hibernation) { + toSerialize["hibernation"] = o.Hibernation + } + toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + toSerialize["nodepools"] = o.Nodepools + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +func (o *Cluster) 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{ + "kubernetes", + "nodepools", + } + + 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) + } + } + + varCluster := _Cluster{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCluster) + + if err != nil { + return err + } + + *o = Cluster(varCluster) + + return err +} + +type NullableCluster struct { + value *Cluster + isSet bool +} + +func (v NullableCluster) Get() *Cluster { + return v.value +} + +func (v *NullableCluster) Set(val *Cluster) { + v.value = val + v.isSet = true +} + +func (v NullableCluster) IsSet() bool { + return v.isSet +} + +func (v *NullableCluster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCluster(val *Cluster) *NullableCluster { + return &NullableCluster{value: val, isSet: true} +} + +func (v NullableCluster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCluster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_cluster_error.go b/services/ske/v1api/model_cluster_error.go new file mode 100644 index 000000000..a9b02f3a5 --- /dev/null +++ b/services/ske/v1api/model_cluster_error.go @@ -0,0 +1,161 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ClusterError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterError{} + +// ClusterError struct for ClusterError +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\"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewClusterError instantiates a new ClusterError 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 NewClusterError() *ClusterError { + this := ClusterError{} + return &this +} + +// NewClusterErrorWithDefaults instantiates a new ClusterError 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 NewClusterErrorWithDefaults() *ClusterError { + this := ClusterError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ClusterError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ClusterError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ClusterError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ClusterError) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterError) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ClusterError) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ClusterError) SetMessage(v string) { + o.Message = &v +} + +func (o ClusterError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClusterError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableClusterError struct { + value *ClusterError + isSet bool +} + +func (v NullableClusterError) Get() *ClusterError { + return v.value +} + +func (v *NullableClusterError) Set(val *ClusterError) { + v.value = val + v.isSet = true +} + +func (v NullableClusterError) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterError(val *ClusterError) *NullableClusterError { + return &NullableClusterError{value: val, isSet: true} +} + +func (v NullableClusterError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_cluster_status.go b/services/ske/v1api/model_cluster_status.go new file mode 100644 index 000000000..5a65fe461 --- /dev/null +++ b/services/ske/v1api/model_cluster_status.go @@ -0,0 +1,380 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the ClusterStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterStatus{} + +// ClusterStatus struct for ClusterStatus +type ClusterStatus struct { + Aggregated *ClusterStatusState `json:"aggregated,omitempty"` + // Format: `2024-02-15T11:06:29Z` + CreationTime *time.Time `json:"creationTime,omitempty"` + CredentialsRotation *CredentialsRotationState `json:"credentialsRotation,omitempty"` + // The outgoing network ranges (in CIDR notation) of traffic originating from workload on the cluster. + EgressAddressRanges []string `json:"egressAddressRanges,omitempty"` + Error *RuntimeError `json:"error,omitempty"` + Errors []ClusterError `json:"errors,omitempty"` + Hibernated *bool `json:"hibernated,omitempty"` + // The network ranges (in CIDR notation) used by pods of the cluster. + PodAddressRanges []string `json:"podAddressRanges,omitempty"` +} + +// NewClusterStatus instantiates a new ClusterStatus 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 NewClusterStatus() *ClusterStatus { + this := ClusterStatus{} + return &this +} + +// NewClusterStatusWithDefaults instantiates a new ClusterStatus 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 NewClusterStatusWithDefaults() *ClusterStatus { + this := ClusterStatus{} + return &this +} + +// GetAggregated returns the Aggregated field value if set, zero value otherwise. +func (o *ClusterStatus) GetAggregated() ClusterStatusState { + if o == nil || IsNil(o.Aggregated) { + var ret ClusterStatusState + return ret + } + return *o.Aggregated +} + +// GetAggregatedOk returns a tuple with the Aggregated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetAggregatedOk() (*ClusterStatusState, bool) { + if o == nil || IsNil(o.Aggregated) { + return nil, false + } + return o.Aggregated, true +} + +// HasAggregated returns a boolean if a field has been set. +func (o *ClusterStatus) HasAggregated() bool { + if o != nil && !IsNil(o.Aggregated) { + return true + } + + return false +} + +// SetAggregated gets a reference to the given ClusterStatusState and assigns it to the Aggregated field. +func (o *ClusterStatus) SetAggregated(v ClusterStatusState) { + o.Aggregated = &v +} + +// GetCreationTime returns the CreationTime field value if set, zero value otherwise. +func (o *ClusterStatus) GetCreationTime() time.Time { + if o == nil || IsNil(o.CreationTime) { + var ret time.Time + return ret + } + return *o.CreationTime +} + +// GetCreationTimeOk returns a tuple with the CreationTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetCreationTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreationTime) { + return nil, false + } + return o.CreationTime, true +} + +// HasCreationTime returns a boolean if a field has been set. +func (o *ClusterStatus) HasCreationTime() bool { + if o != nil && !IsNil(o.CreationTime) { + return true + } + + return false +} + +// SetCreationTime gets a reference to the given time.Time and assigns it to the CreationTime field. +func (o *ClusterStatus) SetCreationTime(v time.Time) { + o.CreationTime = &v +} + +// GetCredentialsRotation returns the CredentialsRotation field value if set, zero value otherwise. +func (o *ClusterStatus) GetCredentialsRotation() CredentialsRotationState { + if o == nil || IsNil(o.CredentialsRotation) { + var ret CredentialsRotationState + return ret + } + return *o.CredentialsRotation +} + +// GetCredentialsRotationOk returns a tuple with the CredentialsRotation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetCredentialsRotationOk() (*CredentialsRotationState, bool) { + if o == nil || IsNil(o.CredentialsRotation) { + return nil, false + } + return o.CredentialsRotation, true +} + +// HasCredentialsRotation returns a boolean if a field has been set. +func (o *ClusterStatus) HasCredentialsRotation() bool { + if o != nil && !IsNil(o.CredentialsRotation) { + return true + } + + return false +} + +// SetCredentialsRotation gets a reference to the given CredentialsRotationState and assigns it to the CredentialsRotation field. +func (o *ClusterStatus) SetCredentialsRotation(v CredentialsRotationState) { + o.CredentialsRotation = &v +} + +// GetEgressAddressRanges returns the EgressAddressRanges field value if set, zero value otherwise. +func (o *ClusterStatus) GetEgressAddressRanges() []string { + if o == nil || IsNil(o.EgressAddressRanges) { + var ret []string + return ret + } + return o.EgressAddressRanges +} + +// GetEgressAddressRangesOk returns a tuple with the EgressAddressRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetEgressAddressRangesOk() ([]string, bool) { + if o == nil || IsNil(o.EgressAddressRanges) { + return nil, false + } + return o.EgressAddressRanges, true +} + +// HasEgressAddressRanges returns a boolean if a field has been set. +func (o *ClusterStatus) HasEgressAddressRanges() bool { + if o != nil && !IsNil(o.EgressAddressRanges) { + return true + } + + return false +} + +// SetEgressAddressRanges gets a reference to the given []string and assigns it to the EgressAddressRanges field. +func (o *ClusterStatus) SetEgressAddressRanges(v []string) { + o.EgressAddressRanges = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ClusterStatus) GetError() RuntimeError { + if o == nil || IsNil(o.Error) { + var ret RuntimeError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorOk() (*RuntimeError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ClusterStatus) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given RuntimeError and assigns it to the Error field. +func (o *ClusterStatus) SetError(v RuntimeError) { + o.Error = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ClusterStatus) GetErrors() []ClusterError { + if o == nil || IsNil(o.Errors) { + var ret []ClusterError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorsOk() ([]ClusterError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *ClusterStatus) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []ClusterError and assigns it to the Errors field. +func (o *ClusterStatus) SetErrors(v []ClusterError) { + o.Errors = v +} + +// GetHibernated returns the Hibernated field value if set, zero value otherwise. +func (o *ClusterStatus) GetHibernated() bool { + if o == nil || IsNil(o.Hibernated) { + var ret bool + return ret + } + return *o.Hibernated +} + +// GetHibernatedOk returns a tuple with the Hibernated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetHibernatedOk() (*bool, bool) { + if o == nil || IsNil(o.Hibernated) { + return nil, false + } + return o.Hibernated, true +} + +// HasHibernated returns a boolean if a field has been set. +func (o *ClusterStatus) HasHibernated() bool { + if o != nil && !IsNil(o.Hibernated) { + return true + } + + return false +} + +// SetHibernated gets a reference to the given bool and assigns it to the Hibernated field. +func (o *ClusterStatus) SetHibernated(v bool) { + o.Hibernated = &v +} + +// GetPodAddressRanges returns the PodAddressRanges field value if set, zero value otherwise. +func (o *ClusterStatus) GetPodAddressRanges() []string { + if o == nil || IsNil(o.PodAddressRanges) { + var ret []string + return ret + } + return o.PodAddressRanges +} + +// GetPodAddressRangesOk returns a tuple with the PodAddressRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetPodAddressRangesOk() ([]string, bool) { + if o == nil || IsNil(o.PodAddressRanges) { + return nil, false + } + return o.PodAddressRanges, true +} + +// HasPodAddressRanges returns a boolean if a field has been set. +func (o *ClusterStatus) HasPodAddressRanges() bool { + if o != nil && !IsNil(o.PodAddressRanges) { + return true + } + + return false +} + +// SetPodAddressRanges gets a reference to the given []string and assigns it to the PodAddressRanges field. +func (o *ClusterStatus) SetPodAddressRanges(v []string) { + o.PodAddressRanges = v +} + +func (o ClusterStatus) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClusterStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Aggregated) { + toSerialize["aggregated"] = o.Aggregated + } + if !IsNil(o.CreationTime) { + toSerialize["creationTime"] = o.CreationTime + } + if !IsNil(o.CredentialsRotation) { + toSerialize["credentialsRotation"] = o.CredentialsRotation + } + if !IsNil(o.EgressAddressRanges) { + toSerialize["egressAddressRanges"] = o.EgressAddressRanges + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.Hibernated) { + toSerialize["hibernated"] = o.Hibernated + } + if !IsNil(o.PodAddressRanges) { + toSerialize["podAddressRanges"] = o.PodAddressRanges + } + return toSerialize, nil +} + +type NullableClusterStatus struct { + value *ClusterStatus + isSet bool +} + +func (v NullableClusterStatus) Get() *ClusterStatus { + return v.value +} + +func (v *NullableClusterStatus) Set(val *ClusterStatus) { + v.value = val + v.isSet = true +} + +func (v NullableClusterStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterStatus(val *ClusterStatus) *NullableClusterStatus { + return &NullableClusterStatus{value: val, isSet: true} +} + +func (v NullableClusterStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_cluster_status_state.go b/services/ske/v1api/model_cluster_status_state.go new file mode 100644 index 000000000..8a29ca7eb --- /dev/null +++ b/services/ske/v1api/model_cluster_status_state.go @@ -0,0 +1,122 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// ClusterStatusState the model 'ClusterStatusState' +type ClusterStatusState string + +// List of ClusterStatusState +const ( + CLUSTERSTATUSSTATE_STATE_HEALTHY ClusterStatusState = "STATE_HEALTHY" + CLUSTERSTATUSSTATE_STATE_CREATING ClusterStatusState = "STATE_CREATING" + CLUSTERSTATUSSTATE_STATE_DELETING ClusterStatusState = "STATE_DELETING" + CLUSTERSTATUSSTATE_STATE_UNHEALTHY ClusterStatusState = "STATE_UNHEALTHY" + CLUSTERSTATUSSTATE_STATE_RECONCILING ClusterStatusState = "STATE_RECONCILING" + CLUSTERSTATUSSTATE_STATE_HIBERNATED ClusterStatusState = "STATE_HIBERNATED" + CLUSTERSTATUSSTATE_STATE_HIBERNATING ClusterStatusState = "STATE_HIBERNATING" + CLUSTERSTATUSSTATE_STATE_WAKINGUP ClusterStatusState = "STATE_WAKINGUP" +) + +// All allowed values of ClusterStatusState enum +var AllowedClusterStatusStateEnumValues = []ClusterStatusState{ + "STATE_HEALTHY", + "STATE_CREATING", + "STATE_DELETING", + "STATE_UNHEALTHY", + "STATE_RECONCILING", + "STATE_HIBERNATED", + "STATE_HIBERNATING", + "STATE_WAKINGUP", +} + +func (v *ClusterStatusState) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ClusterStatusState(value) + for _, existing := range AllowedClusterStatusStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ClusterStatusState", value) +} + +// NewClusterStatusStateFromValue returns a pointer to a valid ClusterStatusState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewClusterStatusStateFromValue(v string) (*ClusterStatusState, error) { + ev := ClusterStatusState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ClusterStatusState: valid values are %v", v, AllowedClusterStatusStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ClusterStatusState) IsValid() bool { + for _, existing := range AllowedClusterStatusStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ClusterStatusState value +func (v ClusterStatusState) Ptr() *ClusterStatusState { + return &v +} + +type NullableClusterStatusState struct { + value *ClusterStatusState + isSet bool +} + +func (v NullableClusterStatusState) Get() *ClusterStatusState { + return v.value +} + +func (v *NullableClusterStatusState) Set(val *ClusterStatusState) { + v.value = val + v.isSet = true +} + +func (v NullableClusterStatusState) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterStatusState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterStatusState(val *ClusterStatusState) *NullableClusterStatusState { + return &NullableClusterStatusState{value: val, isSet: true} +} + +func (v NullableClusterStatusState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterStatusState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_create_kubeconfig_payload.go b/services/ske/v1api/model_create_kubeconfig_payload.go new file mode 100644 index 000000000..c58cc72fc --- /dev/null +++ b/services/ske/v1api/model_create_kubeconfig_payload.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateKubeconfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateKubeconfigPayload{} + +// CreateKubeconfigPayload struct for CreateKubeconfigPayload +type CreateKubeconfigPayload struct { + ExpirationSeconds *string `json:"expirationSeconds,omitempty"` +} + +// NewCreateKubeconfigPayload instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayload() *CreateKubeconfigPayload { + this := CreateKubeconfigPayload{} + return &this +} + +// NewCreateKubeconfigPayloadWithDefaults instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayloadWithDefaults() *CreateKubeconfigPayload { + this := CreateKubeconfigPayload{} + return &this +} + +// GetExpirationSeconds returns the ExpirationSeconds field value if set, zero value otherwise. +func (o *CreateKubeconfigPayload) GetExpirationSeconds() string { + if o == nil || IsNil(o.ExpirationSeconds) { + var ret string + return ret + } + return *o.ExpirationSeconds +} + +// GetExpirationSecondsOk returns a tuple with the ExpirationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateKubeconfigPayload) GetExpirationSecondsOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationSeconds) { + return nil, false + } + return o.ExpirationSeconds, true +} + +// HasExpirationSeconds returns a boolean if a field has been set. +func (o *CreateKubeconfigPayload) HasExpirationSeconds() bool { + if o != nil && !IsNil(o.ExpirationSeconds) { + return true + } + + return false +} + +// SetExpirationSeconds gets a reference to the given string and assigns it to the ExpirationSeconds field. +func (o *CreateKubeconfigPayload) SetExpirationSeconds(v string) { + o.ExpirationSeconds = &v +} + +func (o CreateKubeconfigPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateKubeconfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationSeconds) { + toSerialize["expirationSeconds"] = o.ExpirationSeconds + } + return toSerialize, nil +} + +type NullableCreateKubeconfigPayload struct { + value *CreateKubeconfigPayload + isSet bool +} + +func (v NullableCreateKubeconfigPayload) Get() *CreateKubeconfigPayload { + return v.value +} + +func (v *NullableCreateKubeconfigPayload) Set(val *CreateKubeconfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateKubeconfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateKubeconfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateKubeconfigPayload(val *CreateKubeconfigPayload) *NullableCreateKubeconfigPayload { + return &NullableCreateKubeconfigPayload{value: val, isSet: true} +} + +func (v NullableCreateKubeconfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateKubeconfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_create_or_update_cluster_payload.go b/services/ske/v1api/model_create_or_update_cluster_payload.go new file mode 100644 index 000000000..c50589609 --- /dev/null +++ b/services/ske/v1api/model_create_or_update_cluster_payload.go @@ -0,0 +1,364 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateOrUpdateClusterPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOrUpdateClusterPayload{} + +// CreateOrUpdateClusterPayload struct for CreateOrUpdateClusterPayload +type CreateOrUpdateClusterPayload struct { + Extensions *Extension `json:"extensions,omitempty"` + Hibernation *Hibernation `json:"hibernation,omitempty"` + Kubernetes Kubernetes `json:"kubernetes"` + Maintenance *Maintenance `json:"maintenance,omitempty"` + Network *Network `json:"network,omitempty"` + Nodepools []Nodepool `json:"nodepools"` + Status *ClusterStatus `json:"status,omitempty"` +} + +type _CreateOrUpdateClusterPayload CreateOrUpdateClusterPayload + +// NewCreateOrUpdateClusterPayload instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayload(kubernetes Kubernetes, nodepools []Nodepool) *CreateOrUpdateClusterPayload { + this := CreateOrUpdateClusterPayload{} + this.Kubernetes = kubernetes + this.Nodepools = nodepools + return &this +} + +// NewCreateOrUpdateClusterPayloadWithDefaults instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayloadWithDefaults() *CreateOrUpdateClusterPayload { + this := CreateOrUpdateClusterPayload{} + return &this +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetExtensions() Extension { + if o == nil || IsNil(o.Extensions) { + var ret Extension + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetExtensionsOk() (*Extension, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +func (o *CreateOrUpdateClusterPayload) SetExtensions(v Extension) { + o.Extensions = &v +} + +// GetHibernation returns the Hibernation field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetHibernation() Hibernation { + if o == nil || IsNil(o.Hibernation) { + var ret Hibernation + return ret + } + return *o.Hibernation +} + +// GetHibernationOk returns a tuple with the Hibernation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetHibernationOk() (*Hibernation, bool) { + if o == nil || IsNil(o.Hibernation) { + return nil, false + } + return o.Hibernation, true +} + +// HasHibernation returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasHibernation() bool { + if o != nil && !IsNil(o.Hibernation) { + return true + } + + return false +} + +// SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +func (o *CreateOrUpdateClusterPayload) SetHibernation(v Hibernation) { + o.Hibernation = &v +} + +// GetKubernetes returns the Kubernetes field value +func (o *CreateOrUpdateClusterPayload) GetKubernetes() Kubernetes { + if o == nil { + var ret Kubernetes + return ret + } + + return o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetKubernetesOk() (*Kubernetes, bool) { + if o == nil { + return nil, false + } + return &o.Kubernetes, true +} + +// SetKubernetes sets field value +func (o *CreateOrUpdateClusterPayload) SetKubernetes(v Kubernetes) { + o.Kubernetes = v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetMaintenance() Maintenance { + if o == nil || IsNil(o.Maintenance) { + var ret Maintenance + return ret + } + return *o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetMaintenanceOk() (*Maintenance, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +func (o *CreateOrUpdateClusterPayload) SetMaintenance(v Maintenance) { + o.Maintenance = &v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetNetwork() Network { + if o == nil || IsNil(o.Network) { + var ret Network + return ret + } + return *o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetNetworkOk() (*Network, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given Network and assigns it to the Network field. +func (o *CreateOrUpdateClusterPayload) SetNetwork(v Network) { + o.Network = &v +} + +// GetNodepools returns the Nodepools field value +func (o *CreateOrUpdateClusterPayload) GetNodepools() []Nodepool { + if o == nil { + var ret []Nodepool + return ret + } + + return o.Nodepools +} + +// GetNodepoolsOk returns a tuple with the Nodepools field value +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetNodepoolsOk() ([]Nodepool, bool) { + if o == nil { + return nil, false + } + return o.Nodepools, true +} + +// SetNodepools sets field value +func (o *CreateOrUpdateClusterPayload) SetNodepools(v []Nodepool) { + o.Nodepools = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetStatus() ClusterStatus { + if o == nil || IsNil(o.Status) { + var ret ClusterStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetStatusOk() (*ClusterStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +func (o *CreateOrUpdateClusterPayload) SetStatus(v ClusterStatus) { + o.Status = &v +} + +func (o CreateOrUpdateClusterPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + if !IsNil(o.Hibernation) { + toSerialize["hibernation"] = o.Hibernation + } + toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + toSerialize["nodepools"] = o.Nodepools + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +func (o *CreateOrUpdateClusterPayload) 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{ + "kubernetes", + "nodepools", + } + + 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) + } + } + + varCreateOrUpdateClusterPayload := _CreateOrUpdateClusterPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateOrUpdateClusterPayload) + + if err != nil { + return err + } + + *o = CreateOrUpdateClusterPayload(varCreateOrUpdateClusterPayload) + + return err +} + +type NullableCreateOrUpdateClusterPayload struct { + value *CreateOrUpdateClusterPayload + isSet bool +} + +func (v NullableCreateOrUpdateClusterPayload) Get() *CreateOrUpdateClusterPayload { + return v.value +} + +func (v *NullableCreateOrUpdateClusterPayload) Set(val *CreateOrUpdateClusterPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOrUpdateClusterPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOrUpdateClusterPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOrUpdateClusterPayload(val *CreateOrUpdateClusterPayload) *NullableCreateOrUpdateClusterPayload { + return &NullableCreateOrUpdateClusterPayload{value: val, isSet: true} +} + +func (v NullableCreateOrUpdateClusterPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOrUpdateClusterPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_credentials_rotation_state.go b/services/ske/v1api/model_credentials_rotation_state.go new file mode 100644 index 000000000..c877bae43 --- /dev/null +++ b/services/ske/v1api/model_credentials_rotation_state.go @@ -0,0 +1,200 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the CredentialsRotationState type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsRotationState{} + +// CredentialsRotationState struct for CredentialsRotationState +type CredentialsRotationState struct { + // Format: `2024-02-15T11:06:29Z` + LastCompletionTime *time.Time `json:"lastCompletionTime,omitempty"` + // Format: `2024-02-15T11:06:29Z` + LastInitiationTime *time.Time `json:"lastInitiationTime,omitempty"` + // Phase of the credentials rotation. `NEVER` indicates that no credentials rotation has been performed using the new credentials rotation endpoints yet. + Phase *string `json:"phase,omitempty"` +} + +// NewCredentialsRotationState instantiates a new CredentialsRotationState 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 NewCredentialsRotationState() *CredentialsRotationState { + this := CredentialsRotationState{} + return &this +} + +// NewCredentialsRotationStateWithDefaults instantiates a new CredentialsRotationState 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 NewCredentialsRotationStateWithDefaults() *CredentialsRotationState { + this := CredentialsRotationState{} + return &this +} + +// GetLastCompletionTime returns the LastCompletionTime field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetLastCompletionTime() time.Time { + if o == nil || IsNil(o.LastCompletionTime) { + var ret time.Time + return ret + } + return *o.LastCompletionTime +} + +// GetLastCompletionTimeOk returns a tuple with the LastCompletionTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetLastCompletionTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastCompletionTime) { + return nil, false + } + return o.LastCompletionTime, true +} + +// HasLastCompletionTime returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasLastCompletionTime() bool { + if o != nil && !IsNil(o.LastCompletionTime) { + return true + } + + return false +} + +// SetLastCompletionTime gets a reference to the given time.Time and assigns it to the LastCompletionTime field. +func (o *CredentialsRotationState) SetLastCompletionTime(v time.Time) { + o.LastCompletionTime = &v +} + +// GetLastInitiationTime returns the LastInitiationTime field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetLastInitiationTime() time.Time { + if o == nil || IsNil(o.LastInitiationTime) { + var ret time.Time + return ret + } + return *o.LastInitiationTime +} + +// GetLastInitiationTimeOk returns a tuple with the LastInitiationTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetLastInitiationTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastInitiationTime) { + return nil, false + } + return o.LastInitiationTime, true +} + +// HasLastInitiationTime returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasLastInitiationTime() bool { + if o != nil && !IsNil(o.LastInitiationTime) { + return true + } + + return false +} + +// SetLastInitiationTime gets a reference to the given time.Time and assigns it to the LastInitiationTime field. +func (o *CredentialsRotationState) SetLastInitiationTime(v time.Time) { + o.LastInitiationTime = &v +} + +// GetPhase returns the Phase field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetPhase() string { + if o == nil || IsNil(o.Phase) { + var ret string + return ret + } + return *o.Phase +} + +// GetPhaseOk returns a tuple with the Phase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetPhaseOk() (*string, bool) { + if o == nil || IsNil(o.Phase) { + return nil, false + } + return o.Phase, true +} + +// HasPhase returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasPhase() bool { + if o != nil && !IsNil(o.Phase) { + return true + } + + return false +} + +// SetPhase gets a reference to the given string and assigns it to the Phase field. +func (o *CredentialsRotationState) SetPhase(v string) { + o.Phase = &v +} + +func (o CredentialsRotationState) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialsRotationState) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LastCompletionTime) { + toSerialize["lastCompletionTime"] = o.LastCompletionTime + } + if !IsNil(o.LastInitiationTime) { + toSerialize["lastInitiationTime"] = o.LastInitiationTime + } + if !IsNil(o.Phase) { + toSerialize["phase"] = o.Phase + } + return toSerialize, nil +} + +type NullableCredentialsRotationState struct { + value *CredentialsRotationState + isSet bool +} + +func (v NullableCredentialsRotationState) Get() *CredentialsRotationState { + return v.value +} + +func (v *NullableCredentialsRotationState) Set(val *CredentialsRotationState) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsRotationState) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsRotationState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsRotationState(val *CredentialsRotationState) *NullableCredentialsRotationState { + return &NullableCredentialsRotationState{value: val, isSet: true} +} + +func (v NullableCredentialsRotationState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsRotationState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_cri.go b/services/ske/v1api/model_cri.go new file mode 100644 index 000000000..60f64ef16 --- /dev/null +++ b/services/ske/v1api/model_cri.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CRI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CRI{} + +// CRI struct for CRI +type CRI struct { + Name *string `json:"name,omitempty"` +} + +// NewCRI instantiates a new CRI 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 NewCRI() *CRI { + this := CRI{} + return &this +} + +// NewCRIWithDefaults instantiates a new CRI 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 NewCRIWithDefaults() *CRI { + this := CRI{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CRI) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *CRI) GetNameOk() (*string, 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 *CRI) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CRI) SetName(v string) { + o.Name = &v +} + +func (o CRI) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CRI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableCRI struct { + value *CRI + isSet bool +} + +func (v NullableCRI) Get() *CRI { + return v.value +} + +func (v *NullableCRI) Set(val *CRI) { + v.value = val + v.isSet = true +} + +func (v NullableCRI) IsSet() bool { + return v.isSet +} + +func (v *NullableCRI) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCRI(val *CRI) *NullableCRI { + return &NullableCRI{value: val, isSet: true} +} + +func (v NullableCRI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCRI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_dns.go b/services/ske/v1api/model_dns.go new file mode 100644 index 000000000..1fb36e711 --- /dev/null +++ b/services/ske/v1api/model_dns.go @@ -0,0 +1,194 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DNS type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DNS{} + +// DNS struct for DNS +type DNS struct { + // Enables the dns extension. + Enabled bool `json:"enabled"` + // Array of domain filters for externalDNS, e.g., *.runs.onstackit.cloud. + Zones []string `json:"zones,omitempty"` +} + +type _DNS DNS + +// NewDNS instantiates a new DNS 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 NewDNS(enabled bool) *DNS { + this := DNS{} + this.Enabled = enabled + return &this +} + +// NewDNSWithDefaults instantiates a new DNS 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 NewDNSWithDefaults() *DNS { + this := DNS{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *DNS) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *DNS) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *DNS) SetEnabled(v bool) { + o.Enabled = v +} + +// GetZones returns the Zones field value if set, zero value otherwise. +func (o *DNS) GetZones() []string { + if o == nil || IsNil(o.Zones) { + var ret []string + return ret + } + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DNS) GetZonesOk() ([]string, bool) { + if o == nil || IsNil(o.Zones) { + return nil, false + } + return o.Zones, true +} + +// HasZones returns a boolean if a field has been set. +func (o *DNS) HasZones() bool { + if o != nil && !IsNil(o.Zones) { + return true + } + + return false +} + +// SetZones gets a reference to the given []string and assigns it to the Zones field. +func (o *DNS) SetZones(v []string) { + o.Zones = v +} + +func (o DNS) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DNS) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Zones) { + toSerialize["zones"] = o.Zones + } + return toSerialize, nil +} + +func (o *DNS) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDNS := _DNS{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDNS) + + if err != nil { + return err + } + + *o = DNS(varDNS) + + return err +} + +type NullableDNS struct { + value *DNS + isSet bool +} + +func (v NullableDNS) Get() *DNS { + return v.value +} + +func (v *NullableDNS) Set(val *DNS) { + v.value = val + v.isSet = true +} + +func (v NullableDNS) IsSet() bool { + return v.isSet +} + +func (v *NullableDNS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDNS(val *DNS) *NullableDNS { + return &NullableDNS{value: val, isSet: true} +} + +func (v NullableDNS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDNS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_extension.go b/services/ske/v1api/model_extension.go new file mode 100644 index 000000000..2652dd0e3 --- /dev/null +++ b/services/ske/v1api/model_extension.go @@ -0,0 +1,196 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Extension type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Extension{} + +// Extension struct for Extension +type Extension struct { + Acl *ACL `json:"acl,omitempty"` + Argus *Argus `json:"argus,omitempty"` + Dns *DNS `json:"dns,omitempty"` +} + +// NewExtension instantiates a new Extension 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 NewExtension() *Extension { + this := Extension{} + return &this +} + +// NewExtensionWithDefaults instantiates a new Extension 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 NewExtensionWithDefaults() *Extension { + this := Extension{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Extension) GetAcl() ACL { + if o == nil || IsNil(o.Acl) { + var ret ACL + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Extension) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Extension) SetAcl(v ACL) { + o.Acl = &v +} + +// GetArgus returns the Argus field value if set, zero value otherwise. +func (o *Extension) GetArgus() Argus { + if o == nil || IsNil(o.Argus) { + var ret Argus + return ret + } + return *o.Argus +} + +// GetArgusOk returns a tuple with the Argus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetArgusOk() (*Argus, bool) { + if o == nil || IsNil(o.Argus) { + return nil, false + } + return o.Argus, true +} + +// HasArgus returns a boolean if a field has been set. +func (o *Extension) HasArgus() bool { + if o != nil && !IsNil(o.Argus) { + return true + } + + return false +} + +// SetArgus gets a reference to the given Argus and assigns it to the Argus field. +func (o *Extension) SetArgus(v Argus) { + o.Argus = &v +} + +// GetDns returns the Dns field value if set, zero value otherwise. +func (o *Extension) GetDns() DNS { + if o == nil || IsNil(o.Dns) { + var ret DNS + return ret + } + return *o.Dns +} + +// GetDnsOk returns a tuple with the Dns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetDnsOk() (*DNS, bool) { + if o == nil || IsNil(o.Dns) { + return nil, false + } + return o.Dns, true +} + +// HasDns returns a boolean if a field has been set. +func (o *Extension) HasDns() bool { + if o != nil && !IsNil(o.Dns) { + return true + } + + return false +} + +// SetDns gets a reference to the given DNS and assigns it to the Dns field. +func (o *Extension) SetDns(v DNS) { + o.Dns = &v +} + +func (o Extension) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Extension) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.Argus) { + toSerialize["argus"] = o.Argus + } + if !IsNil(o.Dns) { + toSerialize["dns"] = o.Dns + } + return toSerialize, nil +} + +type NullableExtension struct { + value *Extension + isSet bool +} + +func (v NullableExtension) Get() *Extension { + return v.value +} + +func (v *NullableExtension) Set(val *Extension) { + v.value = val + v.isSet = true +} + +func (v NullableExtension) IsSet() bool { + return v.isSet +} + +func (v *NullableExtension) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtension(val *Extension) *NullableExtension { + return &NullableExtension{value: val, isSet: true} +} + +func (v NullableExtension) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtension) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_hibernation.go b/services/ske/v1api/model_hibernation.go new file mode 100644 index 000000000..a0b998ff2 --- /dev/null +++ b/services/ske/v1api/model_hibernation.go @@ -0,0 +1,156 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Hibernation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Hibernation{} + +// Hibernation struct for Hibernation +type Hibernation struct { + Schedules []HibernationSchedule `json:"schedules"` +} + +type _Hibernation Hibernation + +// NewHibernation instantiates a new Hibernation 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 NewHibernation(schedules []HibernationSchedule) *Hibernation { + this := Hibernation{} + this.Schedules = schedules + return &this +} + +// NewHibernationWithDefaults instantiates a new Hibernation 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 NewHibernationWithDefaults() *Hibernation { + this := Hibernation{} + return &this +} + +// GetSchedules returns the Schedules field value +func (o *Hibernation) GetSchedules() []HibernationSchedule { + if o == nil { + var ret []HibernationSchedule + return ret + } + + return o.Schedules +} + +// GetSchedulesOk returns a tuple with the Schedules field value +// and a boolean to check if the value has been set. +func (o *Hibernation) GetSchedulesOk() ([]HibernationSchedule, bool) { + if o == nil { + return nil, false + } + return o.Schedules, true +} + +// SetSchedules sets field value +func (o *Hibernation) SetSchedules(v []HibernationSchedule) { + o.Schedules = v +} + +func (o Hibernation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Hibernation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["schedules"] = o.Schedules + return toSerialize, nil +} + +func (o *Hibernation) 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{ + "schedules", + } + + 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) + } + } + + varHibernation := _Hibernation{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHibernation) + + if err != nil { + return err + } + + *o = Hibernation(varHibernation) + + return err +} + +type NullableHibernation struct { + value *Hibernation + isSet bool +} + +func (v NullableHibernation) Get() *Hibernation { + return v.value +} + +func (v *NullableHibernation) Set(val *Hibernation) { + v.value = val + v.isSet = true +} + +func (v NullableHibernation) IsSet() bool { + return v.isSet +} + +func (v *NullableHibernation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHibernation(val *Hibernation) *NullableHibernation { + return &NullableHibernation{value: val, isSet: true} +} + +func (v NullableHibernation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHibernation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_hibernation_schedule.go b/services/ske/v1api/model_hibernation_schedule.go new file mode 100644 index 000000000..e64cff1f7 --- /dev/null +++ b/services/ske/v1api/model_hibernation_schedule.go @@ -0,0 +1,220 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HibernationSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HibernationSchedule{} + +// HibernationSchedule struct for HibernationSchedule +type HibernationSchedule struct { + End string `json:"end" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` + Start string `json:"start" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` + Timezone *string `json:"timezone,omitempty"` +} + +type _HibernationSchedule HibernationSchedule + +// NewHibernationSchedule instantiates a new HibernationSchedule 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 NewHibernationSchedule(end string, start string) *HibernationSchedule { + this := HibernationSchedule{} + this.End = end + this.Start = start + return &this +} + +// NewHibernationScheduleWithDefaults instantiates a new HibernationSchedule 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 NewHibernationScheduleWithDefaults() *HibernationSchedule { + this := HibernationSchedule{} + return &this +} + +// GetEnd returns the End field value +func (o *HibernationSchedule) GetEnd() string { + if o == nil { + var ret string + return ret + } + + return o.End +} + +// GetEndOk returns a tuple with the End field value +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetEndOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.End, true +} + +// SetEnd sets field value +func (o *HibernationSchedule) SetEnd(v string) { + o.End = v +} + +// GetStart returns the Start field value +func (o *HibernationSchedule) GetStart() string { + if o == nil { + var ret string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *HibernationSchedule) SetStart(v string) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *HibernationSchedule) GetTimezone() string { + if o == nil || IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetTimezoneOk() (*string, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *HibernationSchedule) HasTimezone() bool { + if o != nil && !IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *HibernationSchedule) SetTimezone(v string) { + o.Timezone = &v +} + +func (o HibernationSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HibernationSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["end"] = o.End + toSerialize["start"] = o.Start + if !IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + return toSerialize, nil +} + +func (o *HibernationSchedule) 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{ + "end", + "start", + } + + 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) + } + } + + varHibernationSchedule := _HibernationSchedule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHibernationSchedule) + + if err != nil { + return err + } + + *o = HibernationSchedule(varHibernationSchedule) + + return err +} + +type NullableHibernationSchedule struct { + value *HibernationSchedule + isSet bool +} + +func (v NullableHibernationSchedule) Get() *HibernationSchedule { + return v.value +} + +func (v *NullableHibernationSchedule) Set(val *HibernationSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableHibernationSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableHibernationSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHibernationSchedule(val *HibernationSchedule) *NullableHibernationSchedule { + return &NullableHibernationSchedule{value: val, isSet: true} +} + +func (v NullableHibernationSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHibernationSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_image.go b/services/ske/v1api/model_image.go new file mode 100644 index 000000000..ee328fe06 --- /dev/null +++ b/services/ske/v1api/model_image.go @@ -0,0 +1,184 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Image type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Image{} + +// Image For valid names and versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `machineImages`. +type Image struct { + Name string `json:"name"` + Version string `json:"version"` +} + +type _Image Image + +// NewImage instantiates a new Image 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 NewImage(name string, version string) *Image { + this := Image{} + this.Name = name + this.Version = version + return &this +} + +// NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image { + this := Image{} + return &this +} + +// GetName returns the Name field value +func (o *Image) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Image) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Image) SetName(v string) { + o.Name = v +} + +// GetVersion returns the Version field value +func (o *Image) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Image) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Image) SetVersion(v string) { + o.Version = v +} + +func (o Image) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Image) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *Image) 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{ + "name", + "version", + } + + 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) + } + } + + varImage := _Image{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImage) + + if err != nil { + return err + } + + *o = Image(varImage) + + return err +} + +type NullableImage struct { + value *Image + isSet bool +} + +func (v NullableImage) Get() *Image { + return v.value +} + +func (v *NullableImage) Set(val *Image) { + v.value = val + v.isSet = true +} + +func (v NullableImage) IsSet() bool { + return v.isSet +} + +func (v *NullableImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImage(val *Image) *NullableImage { + return &NullableImage{value: val, isSet: true} +} + +func (v NullableImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_kubeconfig.go b/services/ske/v1api/model_kubeconfig.go new file mode 100644 index 000000000..865f422bd --- /dev/null +++ b/services/ske/v1api/model_kubeconfig.go @@ -0,0 +1,161 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the Kubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubeconfig{} + +// Kubeconfig struct for Kubeconfig +type Kubeconfig struct { + ExpirationTimestamp *time.Time `json:"expirationTimestamp,omitempty"` + Kubeconfig *string `json:"kubeconfig,omitempty"` +} + +// NewKubeconfig instantiates a new Kubeconfig 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 NewKubeconfig() *Kubeconfig { + this := Kubeconfig{} + return &this +} + +// NewKubeconfigWithDefaults instantiates a new Kubeconfig 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 NewKubeconfigWithDefaults() *Kubeconfig { + this := Kubeconfig{} + return &this +} + +// GetExpirationTimestamp returns the ExpirationTimestamp field value if set, zero value otherwise. +func (o *Kubeconfig) GetExpirationTimestamp() time.Time { + if o == nil || IsNil(o.ExpirationTimestamp) { + var ret time.Time + return ret + } + return *o.ExpirationTimestamp +} + +// GetExpirationTimestampOk returns a tuple with the ExpirationTimestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetExpirationTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationTimestamp) { + return nil, false + } + return o.ExpirationTimestamp, true +} + +// HasExpirationTimestamp returns a boolean if a field has been set. +func (o *Kubeconfig) HasExpirationTimestamp() bool { + if o != nil && !IsNil(o.ExpirationTimestamp) { + return true + } + + return false +} + +// SetExpirationTimestamp gets a reference to the given time.Time and assigns it to the ExpirationTimestamp field. +func (o *Kubeconfig) SetExpirationTimestamp(v time.Time) { + o.ExpirationTimestamp = &v +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *Kubeconfig) GetKubeconfig() string { + if o == nil || IsNil(o.Kubeconfig) { + var ret string + return ret + } + return *o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *Kubeconfig) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *Kubeconfig) SetKubeconfig(v string) { + o.Kubeconfig = &v +} + +func (o Kubeconfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Kubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationTimestamp) { + toSerialize["expirationTimestamp"] = o.ExpirationTimestamp + } + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + return toSerialize, nil +} + +type NullableKubeconfig struct { + value *Kubeconfig + isSet bool +} + +func (v NullableKubeconfig) Get() *Kubeconfig { + return v.value +} + +func (v *NullableKubeconfig) Set(val *Kubeconfig) { + v.value = val + v.isSet = true +} + +func (v NullableKubeconfig) IsSet() bool { + return v.isSet +} + +func (v *NullableKubeconfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubeconfig(val *Kubeconfig) *NullableKubeconfig { + return &NullableKubeconfig{value: val, isSet: true} +} + +func (v NullableKubeconfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_kubernetes.go b/services/ske/v1api/model_kubernetes.go new file mode 100644 index 000000000..8e4591591 --- /dev/null +++ b/services/ske/v1api/model_kubernetes.go @@ -0,0 +1,193 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Kubernetes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubernetes{} + +// Kubernetes For valid versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `kubernetesVersions`. +type Kubernetes struct { + // DEPRECATED as of Kubernetes 1.25+ Flag to specify if privileged mode for containers is enabled or not. This should be used with care since it also disables a couple of other features like the use of some volume type (e.g. PVCs). By default this is set to true. + AllowPrivilegedContainers *bool `json:"allowPrivilegedContainers,omitempty"` + Version string `json:"version" validate:"regexp=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +type _Kubernetes Kubernetes + +// NewKubernetes instantiates a new Kubernetes 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 NewKubernetes(version string) *Kubernetes { + this := Kubernetes{} + this.Version = version + return &this +} + +// NewKubernetesWithDefaults instantiates a new Kubernetes 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 NewKubernetesWithDefaults() *Kubernetes { + this := Kubernetes{} + return &this +} + +// GetAllowPrivilegedContainers returns the AllowPrivilegedContainers field value if set, zero value otherwise. +func (o *Kubernetes) GetAllowPrivilegedContainers() bool { + if o == nil || IsNil(o.AllowPrivilegedContainers) { + var ret bool + return ret + } + return *o.AllowPrivilegedContainers +} + +// GetAllowPrivilegedContainersOk returns a tuple with the AllowPrivilegedContainers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubernetes) GetAllowPrivilegedContainersOk() (*bool, bool) { + if o == nil || IsNil(o.AllowPrivilegedContainers) { + return nil, false + } + return o.AllowPrivilegedContainers, true +} + +// HasAllowPrivilegedContainers returns a boolean if a field has been set. +func (o *Kubernetes) HasAllowPrivilegedContainers() bool { + if o != nil && !IsNil(o.AllowPrivilegedContainers) { + return true + } + + return false +} + +// SetAllowPrivilegedContainers gets a reference to the given bool and assigns it to the AllowPrivilegedContainers field. +func (o *Kubernetes) SetAllowPrivilegedContainers(v bool) { + o.AllowPrivilegedContainers = &v +} + +// GetVersion returns the Version field value +func (o *Kubernetes) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Kubernetes) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Kubernetes) SetVersion(v string) { + o.Version = v +} + +func (o Kubernetes) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Kubernetes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowPrivilegedContainers) { + toSerialize["allowPrivilegedContainers"] = o.AllowPrivilegedContainers + } + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *Kubernetes) 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{ + "version", + } + + 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) + } + } + + varKubernetes := _Kubernetes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKubernetes) + + if err != nil { + return err + } + + *o = Kubernetes(varKubernetes) + + return err +} + +type NullableKubernetes struct { + value *Kubernetes + isSet bool +} + +func (v NullableKubernetes) Get() *Kubernetes { + return v.value +} + +func (v *NullableKubernetes) Set(val *Kubernetes) { + v.value = val + v.isSet = true +} + +func (v NullableKubernetes) IsSet() bool { + return v.isSet +} + +func (v *NullableKubernetes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubernetes(val *Kubernetes) *NullableKubernetes { + return &NullableKubernetes{value: val, isSet: true} +} + +func (v NullableKubernetes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubernetes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_kubernetes_version.go b/services/ske/v1api/model_kubernetes_version.go new file mode 100644 index 000000000..2f75b4bc3 --- /dev/null +++ b/services/ske/v1api/model_kubernetes_version.go @@ -0,0 +1,233 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the KubernetesVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KubernetesVersion{} + +// KubernetesVersion struct for KubernetesVersion +type KubernetesVersion struct { + ExpirationDate *time.Time `json:"expirationDate,omitempty"` + FeatureGates *map[string]string `json:"featureGates,omitempty"` + State *string `json:"state,omitempty"` + Version *string `json:"version,omitempty" validate:"regexp=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +// NewKubernetesVersion instantiates a new KubernetesVersion 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 NewKubernetesVersion() *KubernetesVersion { + this := KubernetesVersion{} + return &this +} + +// NewKubernetesVersionWithDefaults instantiates a new KubernetesVersion 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 NewKubernetesVersionWithDefaults() *KubernetesVersion { + this := KubernetesVersion{} + return &this +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *KubernetesVersion) GetExpirationDate() time.Time { + if o == nil || IsNil(o.ExpirationDate) { + var ret time.Time + return ret + } + return *o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetExpirationDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *KubernetesVersion) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +func (o *KubernetesVersion) SetExpirationDate(v time.Time) { + o.ExpirationDate = &v +} + +// GetFeatureGates returns the FeatureGates field value if set, zero value otherwise. +func (o *KubernetesVersion) GetFeatureGates() map[string]string { + if o == nil || IsNil(o.FeatureGates) { + var ret map[string]string + return ret + } + return *o.FeatureGates +} + +// GetFeatureGatesOk returns a tuple with the FeatureGates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetFeatureGatesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.FeatureGates) { + return nil, false + } + return o.FeatureGates, true +} + +// HasFeatureGates returns a boolean if a field has been set. +func (o *KubernetesVersion) HasFeatureGates() bool { + if o != nil && !IsNil(o.FeatureGates) { + return true + } + + return false +} + +// SetFeatureGates gets a reference to the given map[string]string and assigns it to the FeatureGates field. +func (o *KubernetesVersion) SetFeatureGates(v map[string]string) { + o.FeatureGates = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *KubernetesVersion) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *KubernetesVersion) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *KubernetesVersion) SetState(v string) { + o.State = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *KubernetesVersion) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *KubernetesVersion) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *KubernetesVersion) SetVersion(v string) { + o.Version = &v +} + +func (o KubernetesVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KubernetesVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationDate) { + toSerialize["expirationDate"] = o.ExpirationDate + } + if !IsNil(o.FeatureGates) { + toSerialize["featureGates"] = o.FeatureGates + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableKubernetesVersion struct { + value *KubernetesVersion + isSet bool +} + +func (v NullableKubernetesVersion) Get() *KubernetesVersion { + return v.value +} + +func (v *NullableKubernetesVersion) Set(val *KubernetesVersion) { + v.value = val + v.isSet = true +} + +func (v NullableKubernetesVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableKubernetesVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubernetesVersion(val *KubernetesVersion) *NullableKubernetesVersion { + return &NullableKubernetesVersion{value: val, isSet: true} +} + +func (v NullableKubernetesVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubernetesVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_list_clusters_response.go b/services/ske/v1api/model_list_clusters_response.go new file mode 100644 index 000000000..49963001a --- /dev/null +++ b/services/ske/v1api/model_list_clusters_response.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListClustersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListClustersResponse{} + +// ListClustersResponse struct for ListClustersResponse +type ListClustersResponse struct { + Items []Cluster `json:"items,omitempty"` +} + +// NewListClustersResponse instantiates a new ListClustersResponse 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 NewListClustersResponse() *ListClustersResponse { + this := ListClustersResponse{} + return &this +} + +// NewListClustersResponseWithDefaults instantiates a new ListClustersResponse 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 NewListClustersResponseWithDefaults() *ListClustersResponse { + this := ListClustersResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListClustersResponse) GetItems() []Cluster { + if o == nil || IsNil(o.Items) { + var ret []Cluster + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListClustersResponse) GetItemsOk() ([]Cluster, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListClustersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Cluster and assigns it to the Items field. +func (o *ListClustersResponse) SetItems(v []Cluster) { + o.Items = v +} + +func (o ListClustersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListClustersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListClustersResponse struct { + value *ListClustersResponse + isSet bool +} + +func (v NullableListClustersResponse) Get() *ListClustersResponse { + return v.value +} + +func (v *NullableListClustersResponse) Set(val *ListClustersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListClustersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListClustersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListClustersResponse(val *ListClustersResponse) *NullableListClustersResponse { + return &NullableListClustersResponse{value: val, isSet: true} +} + +func (v NullableListClustersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListClustersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_login_kubeconfig.go b/services/ske/v1api/model_login_kubeconfig.go new file mode 100644 index 000000000..bebb19ccb --- /dev/null +++ b/services/ske/v1api/model_login_kubeconfig.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the LoginKubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoginKubeconfig{} + +// LoginKubeconfig struct for LoginKubeconfig +type LoginKubeconfig struct { + Kubeconfig *string `json:"kubeconfig,omitempty"` +} + +// NewLoginKubeconfig instantiates a new LoginKubeconfig 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 NewLoginKubeconfig() *LoginKubeconfig { + this := LoginKubeconfig{} + return &this +} + +// NewLoginKubeconfigWithDefaults instantiates a new LoginKubeconfig 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 NewLoginKubeconfigWithDefaults() *LoginKubeconfig { + this := LoginKubeconfig{} + return &this +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *LoginKubeconfig) GetKubeconfig() string { + if o == nil || IsNil(o.Kubeconfig) { + var ret string + return ret + } + return *o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoginKubeconfig) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *LoginKubeconfig) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *LoginKubeconfig) SetKubeconfig(v string) { + o.Kubeconfig = &v +} + +func (o LoginKubeconfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoginKubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + return toSerialize, nil +} + +type NullableLoginKubeconfig struct { + value *LoginKubeconfig + isSet bool +} + +func (v NullableLoginKubeconfig) Get() *LoginKubeconfig { + return v.value +} + +func (v *NullableLoginKubeconfig) Set(val *LoginKubeconfig) { + v.value = val + v.isSet = true +} + +func (v NullableLoginKubeconfig) IsSet() bool { + return v.isSet +} + +func (v *NullableLoginKubeconfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoginKubeconfig(val *LoginKubeconfig) *NullableLoginKubeconfig { + return &NullableLoginKubeconfig{value: val, isSet: true} +} + +func (v NullableLoginKubeconfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoginKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_machine.go b/services/ske/v1api/model_machine.go new file mode 100644 index 000000000..f5db27bf2 --- /dev/null +++ b/services/ske/v1api/model_machine.go @@ -0,0 +1,185 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Machine type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Machine{} + +// Machine struct for Machine +type Machine struct { + Image Image `json:"image"` + // For valid types please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `machineTypes`. + Type string `json:"type"` +} + +type _Machine Machine + +// NewMachine instantiates a new Machine 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 NewMachine(image Image, types string) *Machine { + this := Machine{} + this.Image = image + this.Type = types + return &this +} + +// NewMachineWithDefaults instantiates a new Machine 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 NewMachineWithDefaults() *Machine { + this := Machine{} + return &this +} + +// GetImage returns the Image field value +func (o *Machine) GetImage() Image { + if o == nil { + var ret Image + return ret + } + + return o.Image +} + +// GetImageOk returns a tuple with the Image field value +// and a boolean to check if the value has been set. +func (o *Machine) GetImageOk() (*Image, bool) { + if o == nil { + return nil, false + } + return &o.Image, true +} + +// SetImage sets field value +func (o *Machine) SetImage(v Image) { + o.Image = v +} + +// GetType returns the Type field value +func (o *Machine) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Machine) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Machine) SetType(v string) { + o.Type = v +} + +func (o Machine) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Machine) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["image"] = o.Image + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Machine) 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{ + "image", + "type", + } + + 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) + } + } + + varMachine := _Machine{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMachine) + + if err != nil { + return err + } + + *o = Machine(varMachine) + + return err +} + +type NullableMachine struct { + value *Machine + isSet bool +} + +func (v NullableMachine) Get() *Machine { + return v.value +} + +func (v *NullableMachine) Set(val *Machine) { + v.value = val + v.isSet = true +} + +func (v NullableMachine) IsSet() bool { + return v.isSet +} + +func (v *NullableMachine) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachine(val *Machine) *NullableMachine { + return &NullableMachine{value: val, isSet: true} +} + +func (v NullableMachine) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachine) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_machine_image.go b/services/ske/v1api/model_machine_image.go new file mode 100644 index 000000000..91b9f3679 --- /dev/null +++ b/services/ske/v1api/model_machine_image.go @@ -0,0 +1,160 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MachineImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineImage{} + +// MachineImage struct for MachineImage +type MachineImage struct { + Name *string `json:"name,omitempty"` + Versions []MachineImageVersion `json:"versions,omitempty"` +} + +// NewMachineImage instantiates a new MachineImage 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 NewMachineImage() *MachineImage { + this := MachineImage{} + return &this +} + +// NewMachineImageWithDefaults instantiates a new MachineImage 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 NewMachineImageWithDefaults() *MachineImage { + this := MachineImage{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineImage) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *MachineImage) GetNameOk() (*string, 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 *MachineImage) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MachineImage) SetName(v string) { + o.Name = &v +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *MachineImage) GetVersions() []MachineImageVersion { + if o == nil || IsNil(o.Versions) { + var ret []MachineImageVersion + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImage) GetVersionsOk() ([]MachineImageVersion, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *MachineImage) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []MachineImageVersion and assigns it to the Versions field. +func (o *MachineImage) SetVersions(v []MachineImageVersion) { + o.Versions = v +} + +func (o MachineImage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableMachineImage struct { + value *MachineImage + isSet bool +} + +func (v NullableMachineImage) Get() *MachineImage { + return v.value +} + +func (v *NullableMachineImage) Set(val *MachineImage) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImage) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImage(val *MachineImage) *NullableMachineImage { + return &NullableMachineImage{value: val, isSet: true} +} + +func (v NullableMachineImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_machine_image_version.go b/services/ske/v1api/model_machine_image_version.go new file mode 100644 index 000000000..490885e33 --- /dev/null +++ b/services/ske/v1api/model_machine_image_version.go @@ -0,0 +1,233 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the MachineImageVersion type satisfies the MappedNullable interface at compile time +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=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +// NewMachineImageVersion instantiates a new MachineImageVersion 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 NewMachineImageVersion() *MachineImageVersion { + this := MachineImageVersion{} + return &this +} + +// NewMachineImageVersionWithDefaults instantiates a new MachineImageVersion 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 NewMachineImageVersionWithDefaults() *MachineImageVersion { + this := MachineImageVersion{} + return &this +} + +// GetCri returns the Cri field value if set, zero value otherwise. +func (o *MachineImageVersion) GetCri() []CRI { + if o == nil || IsNil(o.Cri) { + var ret []CRI + return ret + } + return o.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) { + if o == nil || IsNil(o.Cri) { + return nil, false + } + return o.Cri, true +} + +// HasCri returns a boolean if a field has been set. +func (o *MachineImageVersion) HasCri() bool { + if o != nil && !IsNil(o.Cri) { + return true + } + + return false +} + +// SetCri gets a reference to the given []CRI and assigns it to the Cri field. +func (o *MachineImageVersion) SetCri(v []CRI) { + o.Cri = v +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *MachineImageVersion) GetExpirationDate() time.Time { + if o == nil || IsNil(o.ExpirationDate) { + var ret time.Time + return ret + } + return *o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetExpirationDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *MachineImageVersion) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +func (o *MachineImageVersion) SetExpirationDate(v time.Time) { + o.ExpirationDate = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *MachineImageVersion) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *MachineImageVersion) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *MachineImageVersion) SetState(v string) { + o.State = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *MachineImageVersion) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *MachineImageVersion) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *MachineImageVersion) SetVersion(v string) { + o.Version = &v +} + +func (o MachineImageVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineImageVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cri) { + toSerialize["cri"] = o.Cri + } + if !IsNil(o.ExpirationDate) { + toSerialize["expirationDate"] = o.ExpirationDate + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableMachineImageVersion struct { + value *MachineImageVersion + isSet bool +} + +func (v NullableMachineImageVersion) Get() *MachineImageVersion { + return v.value +} + +func (v *NullableMachineImageVersion) Set(val *MachineImageVersion) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImageVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImageVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImageVersion(val *MachineImageVersion) *NullableMachineImageVersion { + return &NullableMachineImageVersion{value: val, isSet: true} +} + +func (v NullableMachineImageVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImageVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_machine_type.go b/services/ske/v1api/model_machine_type.go new file mode 100644 index 000000000..f87f844a3 --- /dev/null +++ b/services/ske/v1api/model_machine_type.go @@ -0,0 +1,268 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MachineType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineType{} + +// MachineType struct for MachineType +type MachineType struct { + Architecture *string `json:"architecture,omitempty"` + Cpu *int32 `json:"cpu,omitempty"` + Gpu *int32 `json:"gpu,omitempty"` + Memory *int32 `json:"memory,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewMachineType instantiates a new MachineType 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 NewMachineType() *MachineType { + this := MachineType{} + return &this +} + +// NewMachineTypeWithDefaults instantiates a new MachineType 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 NewMachineTypeWithDefaults() *MachineType { + this := MachineType{} + return &this +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *MachineType) GetArchitecture() string { + if o == nil || IsNil(o.Architecture) { + var ret string + return ret + } + return *o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *MachineType) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *MachineType) SetArchitecture(v string) { + o.Architecture = &v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *MachineType) GetCpu() int32 { + if o == nil || IsNil(o.Cpu) { + var ret int32 + return ret + } + return *o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetCpuOk() (*int32, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *MachineType) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int32 and assigns it to the Cpu field. +func (o *MachineType) SetCpu(v int32) { + o.Cpu = &v +} + +// GetGpu returns the Gpu field value if set, zero value otherwise. +func (o *MachineType) GetGpu() int32 { + if o == nil || IsNil(o.Gpu) { + var ret int32 + return ret + } + return *o.Gpu +} + +// GetGpuOk returns a tuple with the Gpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetGpuOk() (*int32, bool) { + if o == nil || IsNil(o.Gpu) { + return nil, false + } + return o.Gpu, true +} + +// HasGpu returns a boolean if a field has been set. +func (o *MachineType) HasGpu() bool { + if o != nil && !IsNil(o.Gpu) { + return true + } + + return false +} + +// SetGpu gets a reference to the given int32 and assigns it to the Gpu field. +func (o *MachineType) SetGpu(v int32) { + o.Gpu = &v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *MachineType) GetMemory() int32 { + if o == nil || IsNil(o.Memory) { + var ret int32 + return ret + } + return *o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetMemoryOk() (*int32, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *MachineType) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int32 and assigns it to the Memory field. +func (o *MachineType) SetMemory(v int32) { + o.Memory = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineType) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *MachineType) GetNameOk() (*string, 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 *MachineType) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MachineType) SetName(v string) { + o.Name = &v +} + +func (o MachineType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Gpu) { + toSerialize["gpu"] = o.Gpu + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableMachineType struct { + value *MachineType + isSet bool +} + +func (v NullableMachineType) Get() *MachineType { + return v.value +} + +func (v *NullableMachineType) Set(val *MachineType) { + v.value = val + v.isSet = true +} + +func (v NullableMachineType) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineType(val *MachineType) *NullableMachineType { + return &NullableMachineType{value: val, isSet: true} +} + +func (v NullableMachineType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_maintenance.go b/services/ske/v1api/model_maintenance.go new file mode 100644 index 000000000..0168d5d50 --- /dev/null +++ b/services/ske/v1api/model_maintenance.go @@ -0,0 +1,184 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Maintenance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Maintenance{} + +// Maintenance struct for Maintenance +type Maintenance struct { + AutoUpdate MaintenanceAutoUpdate `json:"autoUpdate"` + TimeWindow TimeWindow `json:"timeWindow"` +} + +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 +func NewMaintenance(autoUpdate MaintenanceAutoUpdate, timeWindow TimeWindow) *Maintenance { + this := Maintenance{} + this.AutoUpdate = autoUpdate + this.TimeWindow = timeWindow + return &this +} + +// NewMaintenanceWithDefaults instantiates a new Maintenance 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 NewMaintenanceWithDefaults() *Maintenance { + this := Maintenance{} + return &this +} + +// GetAutoUpdate returns the AutoUpdate field value +func (o *Maintenance) GetAutoUpdate() MaintenanceAutoUpdate { + if o == nil { + var ret MaintenanceAutoUpdate + return ret + } + + return o.AutoUpdate +} + +// GetAutoUpdateOk returns a tuple with the AutoUpdate field value +// and a boolean to check if the value has been set. +func (o *Maintenance) GetAutoUpdateOk() (*MaintenanceAutoUpdate, bool) { + if o == nil { + return nil, false + } + return &o.AutoUpdate, true +} + +// SetAutoUpdate sets field value +func (o *Maintenance) SetAutoUpdate(v MaintenanceAutoUpdate) { + o.AutoUpdate = v +} + +// GetTimeWindow returns the TimeWindow field value +func (o *Maintenance) GetTimeWindow() TimeWindow { + if o == nil { + var ret TimeWindow + return ret + } + + return o.TimeWindow +} + +// GetTimeWindowOk returns a tuple with the TimeWindow field value +// and a boolean to check if the value has been set. +func (o *Maintenance) GetTimeWindowOk() (*TimeWindow, bool) { + if o == nil { + return nil, false + } + return &o.TimeWindow, true +} + +// SetTimeWindow sets field value +func (o *Maintenance) SetTimeWindow(v TimeWindow) { + o.TimeWindow = v +} + +func (o Maintenance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Maintenance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["autoUpdate"] = o.AutoUpdate + toSerialize["timeWindow"] = o.TimeWindow + return toSerialize, nil +} + +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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMaintenance) + + if err != nil { + return err + } + + *o = Maintenance(varMaintenance) + + return err +} + +type NullableMaintenance struct { + value *Maintenance + isSet bool +} + +func (v NullableMaintenance) Get() *Maintenance { + return v.value +} + +func (v *NullableMaintenance) Set(val *Maintenance) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenance) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenance(val *Maintenance) *NullableMaintenance { + return &NullableMaintenance{value: val, isSet: true} +} + +func (v NullableMaintenance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_maintenance_auto_update.go b/services/ske/v1api/model_maintenance_auto_update.go new file mode 100644 index 000000000..e700ceda6 --- /dev/null +++ b/services/ske/v1api/model_maintenance_auto_update.go @@ -0,0 +1,160 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MaintenanceAutoUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceAutoUpdate{} + +// MaintenanceAutoUpdate struct for MaintenanceAutoUpdate +type MaintenanceAutoUpdate struct { + KubernetesVersion *bool `json:"kubernetesVersion,omitempty"` + MachineImageVersion *bool `json:"machineImageVersion,omitempty"` +} + +// NewMaintenanceAutoUpdate instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdate() *MaintenanceAutoUpdate { + this := MaintenanceAutoUpdate{} + return &this +} + +// NewMaintenanceAutoUpdateWithDefaults instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdateWithDefaults() *MaintenanceAutoUpdate { + this := MaintenanceAutoUpdate{} + return &this +} + +// GetKubernetesVersion returns the KubernetesVersion field value if set, zero value otherwise. +func (o *MaintenanceAutoUpdate) GetKubernetesVersion() bool { + if o == nil || IsNil(o.KubernetesVersion) { + var ret bool + return ret + } + return *o.KubernetesVersion +} + +// GetKubernetesVersionOk returns a tuple with the KubernetesVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceAutoUpdate) GetKubernetesVersionOk() (*bool, bool) { + if o == nil || IsNil(o.KubernetesVersion) { + return nil, false + } + return o.KubernetesVersion, true +} + +// HasKubernetesVersion returns a boolean if a field has been set. +func (o *MaintenanceAutoUpdate) HasKubernetesVersion() bool { + if o != nil && !IsNil(o.KubernetesVersion) { + return true + } + + return false +} + +// SetKubernetesVersion gets a reference to the given bool and assigns it to the KubernetesVersion field. +func (o *MaintenanceAutoUpdate) SetKubernetesVersion(v bool) { + o.KubernetesVersion = &v +} + +// GetMachineImageVersion returns the MachineImageVersion field value if set, zero value otherwise. +func (o *MaintenanceAutoUpdate) GetMachineImageVersion() bool { + if o == nil || IsNil(o.MachineImageVersion) { + var ret bool + return ret + } + return *o.MachineImageVersion +} + +// GetMachineImageVersionOk returns a tuple with the MachineImageVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceAutoUpdate) GetMachineImageVersionOk() (*bool, bool) { + if o == nil || IsNil(o.MachineImageVersion) { + return nil, false + } + return o.MachineImageVersion, true +} + +// HasMachineImageVersion returns a boolean if a field has been set. +func (o *MaintenanceAutoUpdate) HasMachineImageVersion() bool { + if o != nil && !IsNil(o.MachineImageVersion) { + return true + } + + return false +} + +// SetMachineImageVersion gets a reference to the given bool and assigns it to the MachineImageVersion field. +func (o *MaintenanceAutoUpdate) SetMachineImageVersion(v bool) { + o.MachineImageVersion = &v +} + +func (o MaintenanceAutoUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceAutoUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.KubernetesVersion) { + toSerialize["kubernetesVersion"] = o.KubernetesVersion + } + if !IsNil(o.MachineImageVersion) { + toSerialize["machineImageVersion"] = o.MachineImageVersion + } + return toSerialize, nil +} + +type NullableMaintenanceAutoUpdate struct { + value *MaintenanceAutoUpdate + isSet bool +} + +func (v NullableMaintenanceAutoUpdate) Get() *MaintenanceAutoUpdate { + return v.value +} + +func (v *NullableMaintenanceAutoUpdate) Set(val *MaintenanceAutoUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceAutoUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceAutoUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceAutoUpdate(val *MaintenanceAutoUpdate) *NullableMaintenanceAutoUpdate { + return &NullableMaintenanceAutoUpdate{value: val, isSet: true} +} + +func (v NullableMaintenanceAutoUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceAutoUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_network.go b/services/ske/v1api/model_network.go new file mode 100644 index 000000000..f7543a993 --- /dev/null +++ b/services/ske/v1api/model_network.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Network type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Network{} + +// Network struct for Network +type Network struct { + Id *string `json:"id,omitempty"` +} + +// NewNetwork instantiates a new Network 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 NewNetwork() *Network { + this := Network{} + return &this +} + +// NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { + this := Network{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Network) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Network) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Network) SetId(v string) { + o.Id = &v +} + +func (o Network) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableNetwork struct { + value *Network + isSet bool +} + +func (v NullableNetwork) Get() *Network { + return v.value +} + +func (v *NullableNetwork) Set(val *Network) { + v.value = val + v.isSet = true +} + +func (v NullableNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetwork(val *Network) *NullableNetwork { + return &NullableNetwork{value: val, isSet: true} +} + +func (v NullableNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_nodepool.go b/services/ske/v1api/model_nodepool.go new file mode 100644 index 000000000..7ade34afc --- /dev/null +++ b/services/ske/v1api/model_nodepool.go @@ -0,0 +1,516 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Nodepool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Nodepool{} + +// Nodepool struct for Nodepool +type Nodepool struct { + // This needs to be true for at least one node pool. + AllowSystemComponents *bool `json:"allowSystemComponents,omitempty"` + AvailabilityZones []string `json:"availabilityZones"` + Cri *CRI `json:"cri,omitempty"` + Labels *map[string]string `json:"labels,omitempty"` + Machine Machine `json:"machine"` + MaxSurge *int32 `json:"maxSurge,omitempty"` + MaxUnavailable *int32 `json:"maxUnavailable,omitempty"` + // Maximum number of nodes in the pool. During runtime, the cluster will never scale beyond 1000 nodes, even if the total maximum would allow for a larger cluster. + Maximum int32 `json:"maximum"` + // Minimum number of nodes in the pool. The sum of all minima must not exceed 1000. + Minimum int32 `json:"minimum"` + // Maximum 15 chars + Name string `json:"name"` + Taints []Taint `json:"taints,omitempty"` + Volume Volume `json:"volume"` +} + +type _Nodepool Nodepool + +// NewNodepool instantiates a new Nodepool 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 NewNodepool(availabilityZones []string, machine Machine, maximum int32, minimum int32, name string, volume Volume) *Nodepool { + this := Nodepool{} + this.AvailabilityZones = availabilityZones + this.Machine = machine + this.Maximum = maximum + this.Minimum = minimum + this.Name = name + this.Volume = volume + return &this +} + +// NewNodepoolWithDefaults instantiates a new Nodepool 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 NewNodepoolWithDefaults() *Nodepool { + this := Nodepool{} + return &this +} + +// GetAllowSystemComponents returns the AllowSystemComponents field value if set, zero value otherwise. +func (o *Nodepool) GetAllowSystemComponents() bool { + if o == nil || IsNil(o.AllowSystemComponents) { + var ret bool + return ret + } + return *o.AllowSystemComponents +} + +// GetAllowSystemComponentsOk returns a tuple with the AllowSystemComponents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetAllowSystemComponentsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowSystemComponents) { + return nil, false + } + return o.AllowSystemComponents, true +} + +// HasAllowSystemComponents returns a boolean if a field has been set. +func (o *Nodepool) HasAllowSystemComponents() bool { + if o != nil && !IsNil(o.AllowSystemComponents) { + return true + } + + return false +} + +// SetAllowSystemComponents gets a reference to the given bool and assigns it to the AllowSystemComponents field. +func (o *Nodepool) SetAllowSystemComponents(v bool) { + o.AllowSystemComponents = &v +} + +// GetAvailabilityZones returns the AvailabilityZones field value +func (o *Nodepool) GetAvailabilityZones() []string { + if o == nil { + var ret []string + return ret + } + + return o.AvailabilityZones +} + +// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetAvailabilityZonesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.AvailabilityZones, true +} + +// SetAvailabilityZones sets field value +func (o *Nodepool) SetAvailabilityZones(v []string) { + o.AvailabilityZones = v +} + +// GetCri returns the Cri field value if set, zero value otherwise. +func (o *Nodepool) GetCri() CRI { + if o == nil || IsNil(o.Cri) { + var ret CRI + return ret + } + return *o.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 *Nodepool) GetCriOk() (*CRI, bool) { + if o == nil || IsNil(o.Cri) { + return nil, false + } + return o.Cri, true +} + +// HasCri returns a boolean if a field has been set. +func (o *Nodepool) HasCri() bool { + if o != nil && !IsNil(o.Cri) { + return true + } + + return false +} + +// SetCri gets a reference to the given CRI and assigns it to the Cri field. +func (o *Nodepool) SetCri(v CRI) { + o.Cri = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Nodepool) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Nodepool) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Nodepool) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetMachine returns the Machine field value +func (o *Nodepool) GetMachine() Machine { + if o == nil { + var ret Machine + return ret + } + + return o.Machine +} + +// GetMachineOk returns a tuple with the Machine field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMachineOk() (*Machine, bool) { + if o == nil { + return nil, false + } + return &o.Machine, true +} + +// SetMachine sets field value +func (o *Nodepool) SetMachine(v Machine) { + o.Machine = v +} + +// GetMaxSurge returns the MaxSurge field value if set, zero value otherwise. +func (o *Nodepool) GetMaxSurge() int32 { + if o == nil || IsNil(o.MaxSurge) { + var ret int32 + return ret + } + return *o.MaxSurge +} + +// GetMaxSurgeOk returns a tuple with the MaxSurge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaxSurgeOk() (*int32, bool) { + if o == nil || IsNil(o.MaxSurge) { + return nil, false + } + return o.MaxSurge, true +} + +// HasMaxSurge returns a boolean if a field has been set. +func (o *Nodepool) HasMaxSurge() bool { + if o != nil && !IsNil(o.MaxSurge) { + return true + } + + return false +} + +// SetMaxSurge gets a reference to the given int32 and assigns it to the MaxSurge field. +func (o *Nodepool) SetMaxSurge(v int32) { + o.MaxSurge = &v +} + +// GetMaxUnavailable returns the MaxUnavailable field value if set, zero value otherwise. +func (o *Nodepool) GetMaxUnavailable() int32 { + if o == nil || IsNil(o.MaxUnavailable) { + var ret int32 + return ret + } + return *o.MaxUnavailable +} + +// GetMaxUnavailableOk returns a tuple with the MaxUnavailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaxUnavailableOk() (*int32, bool) { + if o == nil || IsNil(o.MaxUnavailable) { + return nil, false + } + return o.MaxUnavailable, true +} + +// HasMaxUnavailable returns a boolean if a field has been set. +func (o *Nodepool) HasMaxUnavailable() bool { + if o != nil && !IsNil(o.MaxUnavailable) { + return true + } + + return false +} + +// SetMaxUnavailable gets a reference to the given int32 and assigns it to the MaxUnavailable field. +func (o *Nodepool) SetMaxUnavailable(v int32) { + o.MaxUnavailable = &v +} + +// GetMaximum returns the Maximum field value +func (o *Nodepool) GetMaximum() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Maximum +} + +// GetMaximumOk returns a tuple with the Maximum field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaximumOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Maximum, true +} + +// SetMaximum sets field value +func (o *Nodepool) SetMaximum(v int32) { + o.Maximum = v +} + +// GetMinimum returns the Minimum field value +func (o *Nodepool) GetMinimum() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Minimum +} + +// GetMinimumOk returns a tuple with the Minimum field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMinimumOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Minimum, true +} + +// SetMinimum sets field value +func (o *Nodepool) SetMinimum(v int32) { + o.Minimum = v +} + +// GetName returns the Name field value +func (o *Nodepool) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Nodepool) SetName(v string) { + o.Name = v +} + +// GetTaints returns the Taints field value if set, zero value otherwise. +func (o *Nodepool) GetTaints() []Taint { + if o == nil || IsNil(o.Taints) { + var ret []Taint + return ret + } + return o.Taints +} + +// GetTaintsOk returns a tuple with the Taints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetTaintsOk() ([]Taint, bool) { + if o == nil || IsNil(o.Taints) { + return nil, false + } + return o.Taints, true +} + +// HasTaints returns a boolean if a field has been set. +func (o *Nodepool) HasTaints() bool { + if o != nil && !IsNil(o.Taints) { + return true + } + + return false +} + +// SetTaints gets a reference to the given []Taint and assigns it to the Taints field. +func (o *Nodepool) SetTaints(v []Taint) { + o.Taints = v +} + +// GetVolume returns the Volume field value +func (o *Nodepool) GetVolume() Volume { + if o == nil { + var ret Volume + return ret + } + + return o.Volume +} + +// GetVolumeOk returns a tuple with the Volume field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetVolumeOk() (*Volume, bool) { + if o == nil { + return nil, false + } + return &o.Volume, true +} + +// SetVolume sets field value +func (o *Nodepool) SetVolume(v Volume) { + o.Volume = v +} + +func (o Nodepool) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Nodepool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowSystemComponents) { + toSerialize["allowSystemComponents"] = o.AllowSystemComponents + } + toSerialize["availabilityZones"] = o.AvailabilityZones + if !IsNil(o.Cri) { + toSerialize["cri"] = o.Cri + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["machine"] = o.Machine + if !IsNil(o.MaxSurge) { + toSerialize["maxSurge"] = o.MaxSurge + } + if !IsNil(o.MaxUnavailable) { + toSerialize["maxUnavailable"] = o.MaxUnavailable + } + toSerialize["maximum"] = o.Maximum + toSerialize["minimum"] = o.Minimum + toSerialize["name"] = o.Name + if !IsNil(o.Taints) { + toSerialize["taints"] = o.Taints + } + toSerialize["volume"] = o.Volume + return toSerialize, nil +} + +func (o *Nodepool) 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{ + "availabilityZones", + "machine", + "maximum", + "minimum", + "name", + "volume", + } + + 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) + } + } + + varNodepool := _Nodepool{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodepool) + + if err != nil { + return err + } + + *o = Nodepool(varNodepool) + + return err +} + +type NullableNodepool struct { + value *Nodepool + isSet bool +} + +func (v NullableNodepool) Get() *Nodepool { + return v.value +} + +func (v *NullableNodepool) Set(val *Nodepool) { + v.value = val + v.isSet = true +} + +func (v NullableNodepool) IsSet() bool { + return v.isSet +} + +func (v *NullableNodepool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodepool(val *Nodepool) *NullableNodepool { + return &NullableNodepool{value: val, isSet: true} +} + +func (v NullableNodepool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodepool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_provider_options.go b/services/ske/v1api/model_provider_options.go new file mode 100644 index 000000000..e882e7721 --- /dev/null +++ b/services/ske/v1api/model_provider_options.go @@ -0,0 +1,268 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ProviderOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderOptions{} + +// ProviderOptions struct for ProviderOptions +type ProviderOptions struct { + AvailabilityZones []AvailabilityZone `json:"availabilityZones,omitempty"` + KubernetesVersions []KubernetesVersion `json:"kubernetesVersions,omitempty"` + MachineImages []MachineImage `json:"machineImages,omitempty"` + MachineTypes []MachineType `json:"machineTypes,omitempty"` + VolumeTypes []VolumeType `json:"volumeTypes,omitempty"` +} + +// NewProviderOptions instantiates a new ProviderOptions 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 NewProviderOptions() *ProviderOptions { + this := ProviderOptions{} + return &this +} + +// NewProviderOptionsWithDefaults instantiates a new ProviderOptions 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 NewProviderOptionsWithDefaults() *ProviderOptions { + this := ProviderOptions{} + return &this +} + +// GetAvailabilityZones returns the AvailabilityZones field value if set, zero value otherwise. +func (o *ProviderOptions) GetAvailabilityZones() []AvailabilityZone { + if o == nil || IsNil(o.AvailabilityZones) { + var ret []AvailabilityZone + return ret + } + return o.AvailabilityZones +} + +// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetAvailabilityZonesOk() ([]AvailabilityZone, bool) { + if o == nil || IsNil(o.AvailabilityZones) { + return nil, false + } + return o.AvailabilityZones, true +} + +// HasAvailabilityZones returns a boolean if a field has been set. +func (o *ProviderOptions) HasAvailabilityZones() bool { + if o != nil && !IsNil(o.AvailabilityZones) { + return true + } + + return false +} + +// SetAvailabilityZones gets a reference to the given []AvailabilityZone and assigns it to the AvailabilityZones field. +func (o *ProviderOptions) SetAvailabilityZones(v []AvailabilityZone) { + o.AvailabilityZones = v +} + +// GetKubernetesVersions returns the KubernetesVersions field value if set, zero value otherwise. +func (o *ProviderOptions) GetKubernetesVersions() []KubernetesVersion { + if o == nil || IsNil(o.KubernetesVersions) { + var ret []KubernetesVersion + return ret + } + return o.KubernetesVersions +} + +// GetKubernetesVersionsOk returns a tuple with the KubernetesVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetKubernetesVersionsOk() ([]KubernetesVersion, bool) { + if o == nil || IsNil(o.KubernetesVersions) { + return nil, false + } + return o.KubernetesVersions, true +} + +// HasKubernetesVersions returns a boolean if a field has been set. +func (o *ProviderOptions) HasKubernetesVersions() bool { + if o != nil && !IsNil(o.KubernetesVersions) { + return true + } + + return false +} + +// SetKubernetesVersions gets a reference to the given []KubernetesVersion and assigns it to the KubernetesVersions field. +func (o *ProviderOptions) SetKubernetesVersions(v []KubernetesVersion) { + o.KubernetesVersions = v +} + +// GetMachineImages returns the MachineImages field value if set, zero value otherwise. +func (o *ProviderOptions) GetMachineImages() []MachineImage { + if o == nil || IsNil(o.MachineImages) { + var ret []MachineImage + return ret + } + return o.MachineImages +} + +// GetMachineImagesOk returns a tuple with the MachineImages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetMachineImagesOk() ([]MachineImage, bool) { + if o == nil || IsNil(o.MachineImages) { + return nil, false + } + return o.MachineImages, true +} + +// HasMachineImages returns a boolean if a field has been set. +func (o *ProviderOptions) HasMachineImages() bool { + if o != nil && !IsNil(o.MachineImages) { + return true + } + + return false +} + +// SetMachineImages gets a reference to the given []MachineImage and assigns it to the MachineImages field. +func (o *ProviderOptions) SetMachineImages(v []MachineImage) { + o.MachineImages = v +} + +// GetMachineTypes returns the MachineTypes field value if set, zero value otherwise. +func (o *ProviderOptions) GetMachineTypes() []MachineType { + if o == nil || IsNil(o.MachineTypes) { + var ret []MachineType + return ret + } + return o.MachineTypes +} + +// GetMachineTypesOk returns a tuple with the MachineTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetMachineTypesOk() ([]MachineType, bool) { + if o == nil || IsNil(o.MachineTypes) { + return nil, false + } + return o.MachineTypes, true +} + +// HasMachineTypes returns a boolean if a field has been set. +func (o *ProviderOptions) HasMachineTypes() bool { + if o != nil && !IsNil(o.MachineTypes) { + return true + } + + return false +} + +// SetMachineTypes gets a reference to the given []MachineType and assigns it to the MachineTypes field. +func (o *ProviderOptions) SetMachineTypes(v []MachineType) { + o.MachineTypes = v +} + +// GetVolumeTypes returns the VolumeTypes field value if set, zero value otherwise. +func (o *ProviderOptions) GetVolumeTypes() []VolumeType { + if o == nil || IsNil(o.VolumeTypes) { + var ret []VolumeType + return ret + } + return o.VolumeTypes +} + +// GetVolumeTypesOk returns a tuple with the VolumeTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetVolumeTypesOk() ([]VolumeType, bool) { + if o == nil || IsNil(o.VolumeTypes) { + return nil, false + } + return o.VolumeTypes, true +} + +// HasVolumeTypes returns a boolean if a field has been set. +func (o *ProviderOptions) HasVolumeTypes() bool { + if o != nil && !IsNil(o.VolumeTypes) { + return true + } + + return false +} + +// SetVolumeTypes gets a reference to the given []VolumeType and assigns it to the VolumeTypes field. +func (o *ProviderOptions) SetVolumeTypes(v []VolumeType) { + o.VolumeTypes = v +} + +func (o ProviderOptions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProviderOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZones) { + toSerialize["availabilityZones"] = o.AvailabilityZones + } + if !IsNil(o.KubernetesVersions) { + toSerialize["kubernetesVersions"] = o.KubernetesVersions + } + if !IsNil(o.MachineImages) { + toSerialize["machineImages"] = o.MachineImages + } + if !IsNil(o.MachineTypes) { + toSerialize["machineTypes"] = o.MachineTypes + } + if !IsNil(o.VolumeTypes) { + toSerialize["volumeTypes"] = o.VolumeTypes + } + return toSerialize, nil +} + +type NullableProviderOptions struct { + value *ProviderOptions + isSet bool +} + +func (v NullableProviderOptions) Get() *ProviderOptions { + return v.value +} + +func (v *NullableProviderOptions) Set(val *ProviderOptions) { + v.value = val + v.isSet = true +} + +func (v NullableProviderOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderOptions(val *ProviderOptions) *NullableProviderOptions { + return &NullableProviderOptions{value: val, isSet: true} +} + +func (v NullableProviderOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_runtime_error.go b/services/ske/v1api/model_runtime_error.go new file mode 100644 index 000000000..552cff22d --- /dev/null +++ b/services/ske/v1api/model_runtime_error.go @@ -0,0 +1,197 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the RuntimeError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuntimeError{} + +// RuntimeError struct for RuntimeError +type RuntimeError struct { + // - Code: `SKE_UNSPECIFIED` Message: \"An error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_TMP_AUTH_ERROR` Message: \"Authentication failed. This is a temporary error. Please wait while the system recovers.\" - Code: `SKE_QUOTA_EXCEEDED` Message: \"Your project's resource quotas are exhausted. Please make sure your quota is sufficient for the ordered cluster.\" - Code: `SKE_ARGUS_INSTANCE_NOT_FOUND` Message: \"The provided Argus instance could not be found.\" - Code: `SKE_RATE_LIMITS` Message: \"While provisioning your cluster, request rate limits where incurred. Please wait while the system recovers.\" - Code: `SKE_INFRA_ERROR` Message: \"An error occurred with the underlying infrastructure. Please open a support ticket if this error persists.\" - Code: `SKE_REMAINING_RESOURCES` Message: \"There are remaining Kubernetes resources in your cluster that prevent deletion. Please make sure to remove them.\" - Code: `SKE_CONFIGURATION_PROBLEM` Message: \"A configuration error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_UNREADY_NODES` Message: \"Not all worker nodes are ready. Please open a support ticket if this error persists.\" - Code: `SKE_API_SERVER_ERROR` Message: \"The Kubernetes API server is not reporting readiness. Please open a support ticket if this error persists.\" - Code: `SKE_DNS_ZONE_NOT_FOUND` Message: \"The provided DNS zone for the STACKIT DNS extension could not be found. Please ensure you defined a valid domain that belongs to a STACKIT DNS zone.\" + Code *string `json:"code,omitempty"` + Details *string `json:"details,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewRuntimeError instantiates a new RuntimeError 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 NewRuntimeError() *RuntimeError { + this := RuntimeError{} + return &this +} + +// NewRuntimeErrorWithDefaults instantiates a new RuntimeError 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 NewRuntimeErrorWithDefaults() *RuntimeError { + this := RuntimeError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *RuntimeError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuntimeError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *RuntimeError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *RuntimeError) SetCode(v string) { + o.Code = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *RuntimeError) GetDetails() string { + if o == nil || IsNil(o.Details) { + var ret string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuntimeError) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *RuntimeError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *RuntimeError) SetDetails(v string) { + o.Details = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RuntimeError) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuntimeError) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *RuntimeError) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *RuntimeError) SetMessage(v string) { + o.Message = &v +} + +func (o RuntimeError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RuntimeError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableRuntimeError struct { + value *RuntimeError + isSet bool +} + +func (v NullableRuntimeError) Get() *RuntimeError { + return v.value +} + +func (v *NullableRuntimeError) Set(val *RuntimeError) { + v.value = val + v.isSet = true +} + +func (v NullableRuntimeError) IsSet() bool { + return v.isSet +} + +func (v *NullableRuntimeError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuntimeError(val *RuntimeError) *NullableRuntimeError { + return &NullableRuntimeError{value: val, isSet: true} +} + +func (v NullableRuntimeError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuntimeError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_taint.go b/services/ske/v1api/model_taint.go new file mode 100644 index 000000000..05f1cc9e9 --- /dev/null +++ b/services/ske/v1api/model_taint.go @@ -0,0 +1,220 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Taint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Taint{} + +// Taint struct for Taint +type Taint struct { + Effect string `json:"effect"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +type _Taint Taint + +// NewTaint instantiates a new Taint 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 NewTaint(effect string, key string) *Taint { + this := Taint{} + this.Effect = effect + this.Key = key + return &this +} + +// NewTaintWithDefaults instantiates a new Taint 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 NewTaintWithDefaults() *Taint { + this := Taint{} + return &this +} + +// GetEffect returns the Effect field value +func (o *Taint) GetEffect() string { + if o == nil { + var ret string + return ret + } + + return o.Effect +} + +// GetEffectOk returns a tuple with the Effect field value +// and a boolean to check if the value has been set. +func (o *Taint) GetEffectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Effect, true +} + +// SetEffect sets field value +func (o *Taint) SetEffect(v string) { + o.Effect = v +} + +// GetKey returns the Key field value +func (o *Taint) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *Taint) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *Taint) SetKey(v string) { + o.Key = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Taint) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Taint) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Taint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *Taint) SetValue(v string) { + o.Value = &v +} + +func (o Taint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Taint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["effect"] = o.Effect + toSerialize["key"] = o.Key + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +func (o *Taint) 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{ + "effect", + "key", + } + + 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) + } + } + + varTaint := _Taint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTaint) + + if err != nil { + return err + } + + *o = Taint(varTaint) + + return err +} + +type NullableTaint struct { + value *Taint + isSet bool +} + +func (v NullableTaint) Get() *Taint { + return v.value +} + +func (v *NullableTaint) Set(val *Taint) { + v.value = val + v.isSet = true +} + +func (v NullableTaint) IsSet() bool { + return v.isSet +} + +func (v *NullableTaint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaint(val *Taint) *NullableTaint { + return &NullableTaint{value: val, isSet: true} +} + +func (v NullableTaint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_time_window.go b/services/ske/v1api/model_time_window.go new file mode 100644 index 000000000..47b69ed52 --- /dev/null +++ b/services/ske/v1api/model_time_window.go @@ -0,0 +1,185 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TimeWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TimeWindow{} + +// TimeWindow struct for TimeWindow +type TimeWindow struct { + End time.Time `json:"end"` + Start time.Time `json:"start"` +} + +type _TimeWindow TimeWindow + +// NewTimeWindow instantiates a new TimeWindow 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 NewTimeWindow(end time.Time, start time.Time) *TimeWindow { + this := TimeWindow{} + this.End = end + this.Start = start + return &this +} + +// NewTimeWindowWithDefaults instantiates a new TimeWindow 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 NewTimeWindowWithDefaults() *TimeWindow { + this := TimeWindow{} + return &this +} + +// GetEnd returns the End field value +func (o *TimeWindow) GetEnd() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.End +} + +// GetEndOk returns a tuple with the End field value +// and a boolean to check if the value has been set. +func (o *TimeWindow) GetEndOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.End, true +} + +// SetEnd sets field value +func (o *TimeWindow) SetEnd(v time.Time) { + o.End = v +} + +// GetStart returns the Start field value +func (o *TimeWindow) GetStart() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *TimeWindow) GetStartOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *TimeWindow) SetStart(v time.Time) { + o.Start = v +} + +func (o TimeWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TimeWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["end"] = o.End + toSerialize["start"] = o.Start + return toSerialize, nil +} + +func (o *TimeWindow) 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{ + "end", + "start", + } + + 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) + } + } + + varTimeWindow := _TimeWindow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTimeWindow) + + if err != nil { + return err + } + + *o = TimeWindow(varTimeWindow) + + return err +} + +type NullableTimeWindow struct { + value *TimeWindow + isSet bool +} + +func (v NullableTimeWindow) Get() *TimeWindow { + return v.value +} + +func (v *NullableTimeWindow) Set(val *TimeWindow) { + v.value = val + v.isSet = true +} + +func (v NullableTimeWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableTimeWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimeWindow(val *TimeWindow) *NullableTimeWindow { + return &NullableTimeWindow{value: val, isSet: true} +} + +func (v NullableTimeWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimeWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_volume.go b/services/ske/v1api/model_volume.go new file mode 100644 index 000000000..3bd607976 --- /dev/null +++ b/services/ske/v1api/model_volume.go @@ -0,0 +1,193 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Volume type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Volume{} + +// Volume struct for Volume +type Volume struct { + Size int32 `json:"size"` + // For valid values please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `volumeTypes`. + Type *string `json:"type,omitempty"` +} + +type _Volume Volume + +// NewVolume instantiates a new Volume 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 NewVolume(size int32) *Volume { + this := Volume{} + this.Size = size + return &this +} + +// NewVolumeWithDefaults instantiates a new Volume 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 NewVolumeWithDefaults() *Volume { + this := Volume{} + return &this +} + +// GetSize returns the Size field value +func (o *Volume) GetSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *Volume) GetSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *Volume) SetSize(v int32) { + o.Size = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Volume) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Volume) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Volume) SetType(v string) { + o.Type = &v +} + +func (o Volume) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Volume) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["size"] = o.Size + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +func (o *Volume) 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{ + "size", + } + + 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) + } + } + + varVolume := _Volume{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVolume) + + if err != nil { + return err + } + + *o = Volume(varVolume) + + return err +} + +type NullableVolume struct { + value *Volume + isSet bool +} + +func (v NullableVolume) Get() *Volume { + return v.value +} + +func (v *NullableVolume) Set(val *Volume) { + v.value = val + v.isSet = true +} + +func (v NullableVolume) IsSet() bool { + return v.isSet +} + +func (v *NullableVolume) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolume(val *Volume) *NullableVolume { + return &NullableVolume{value: val, isSet: true} +} + +func (v NullableVolume) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolume) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/model_volume_type.go b/services/ske/v1api/model_volume_type.go new file mode 100644 index 000000000..abb57149d --- /dev/null +++ b/services/ske/v1api/model_volume_type.go @@ -0,0 +1,124 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the VolumeType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumeType{} + +// VolumeType struct for VolumeType +type VolumeType struct { + Name *string `json:"name,omitempty"` +} + +// NewVolumeType instantiates a new VolumeType 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 NewVolumeType() *VolumeType { + this := VolumeType{} + return &this +} + +// NewVolumeTypeWithDefaults instantiates a new VolumeType 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 NewVolumeTypeWithDefaults() *VolumeType { + this := VolumeType{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *VolumeType) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *VolumeType) GetNameOk() (*string, 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 *VolumeType) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *VolumeType) SetName(v string) { + o.Name = &v +} + +func (o VolumeType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VolumeType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableVolumeType struct { + value *VolumeType + isSet bool +} + +func (v NullableVolumeType) Get() *VolumeType { + return v.value +} + +func (v *NullableVolumeType) Set(val *VolumeType) { + v.value = val + v.isSet = true +} + +func (v NullableVolumeType) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumeType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumeType(val *VolumeType) *NullableVolumeType { + return &NullableVolumeType{value: val, isSet: true} +} + +func (v NullableVolumeType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumeType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v1api/response.go b/services/ske/v1api/response.go new file mode 100644 index 000000000..680aefef4 --- /dev/null +++ b/services/ske/v1api/response.go @@ -0,0 +1,47 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/ske/v1api/utils.go b/services/ske/v1api/utils.go new file mode 100644 index 000000000..5b62d8047 --- /dev/null +++ b/services/ske/v1api/utils.go @@ -0,0 +1,361 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/services/ske/v2api/api_default.go b/services/ske/v2api/api_default.go new file mode 100644 index 000000000..ee37e43e2 --- /dev/null +++ b/services/ske/v2api/api_default.go @@ -0,0 +1,2425 @@ +/* +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 ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CompleteCredentialsRotation Complete cluster credentials rotation + + Complete cluster credentials rotation. This is step 2 of a two-step process. Start the rotation using [start-credentials-rotation](#tag/Credentials/operation/SkeService_StartClusterCredentialsRotation). + + @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 ApiCompleteCredentialsRotationRequest + */ + CompleteCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiCompleteCredentialsRotationRequest + + // CompleteCredentialsRotationExecute executes the request + // @return map[string]interface{} + CompleteCredentialsRotationExecute(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) + + /* + CreateKubeconfig Create an admin kubeconfig + + Create a new admin kubeconfig for the cluster. You can specify the expiration (in seconds) in the request body. Its value must be in the range from 600 (10 min) to 15552000 (6 months). Defaults to 3600. + + @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 ApiCreateKubeconfigRequest + */ + CreateKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiCreateKubeconfigRequest + + // CreateKubeconfigExecute executes the request + // @return Kubeconfig + CreateKubeconfigExecute(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) + + /* + CreateOrUpdateCluster Create or update a cluster + + Create a new cluster in your project or modify an existing one. To get valid values for certain properties please check the [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) endpoint. + + @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 ApiCreateOrUpdateClusterRequest + */ + CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest + + // CreateOrUpdateClusterExecute executes the request + // @return Cluster + CreateOrUpdateClusterExecute(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) + + /* + DeleteCluster Delete a cluster + + Delete Kubernetes cluster specified by the identifier, belonging to the project specified by `projectId`. + + @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 ApiDeleteClusterRequest + */ + DeleteCluster(ctx context.Context, projectId string, region string, clusterName string) ApiDeleteClusterRequest + + // DeleteClusterExecute executes the request + // @return map[string]interface{} + DeleteClusterExecute(r ApiDeleteClusterRequest) (map[string]interface{}, error) + + /* + GetCluster Get a cluster + + Get Kubernetes cluster for the specified identifier, belonging to the project specified by `projectId`. + + @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 ApiGetClusterRequest + */ + GetCluster(ctx context.Context, projectId string, region string, clusterName string) ApiGetClusterRequest + + // GetClusterExecute executes the request + // @return Cluster + GetClusterExecute(r ApiGetClusterRequest) (*Cluster, 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. + + @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 ApiGetLoginKubeconfigRequest + */ + GetLoginKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiGetLoginKubeconfigRequest + + // GetLoginKubeconfigExecute executes the request + // @return LoginKubeconfig + GetLoginKubeconfigExecute(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) + + /* + ListClusters List all clusters + + Return a list of Kubernetes clusters in the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListClustersRequest + */ + ListClusters(ctx context.Context, projectId string, region string) ApiListClustersRequest + + // ListClustersExecute executes the request + // @return ListClustersResponse + ListClustersExecute(r ApiListClustersRequest) (*ListClustersResponse, error) + + /* + ListProviderOptions List provider options + + Returns available Kubernetes versions, availability zones, machine types, OS versions and volume types for the cluster nodes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param region + @return ApiListProviderOptionsRequest + */ + ListProviderOptions(ctx context.Context, region string) ApiListProviderOptionsRequest + + // ListProviderOptionsExecute executes the request + // @return ProviderOptions + ListProviderOptionsExecute(r ApiListProviderOptionsRequest) (*ProviderOptions, error) + + /* + StartCredentialsRotation Start cluster credentials rotation + + Start cluster credentials rotation. This is step 1 of a two-step process. Complete the rotation using [complete-credentials-rotation](#tag/Credentials/operation/SkeService_CompleteClusterCredentialsRotation). + + @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 ApiStartCredentialsRotationRequest + */ + StartCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiStartCredentialsRotationRequest + + // StartCredentialsRotationExecute executes the request + // @return map[string]interface{} + StartCredentialsRotationExecute(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) + + /* + TriggerHibernate Trigger cluster hibernation + + Trigger immediate hibernation of the cluster. If the cluster is already in hibernation state, this endpoint does nothing. + + @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 ApiTriggerHibernateRequest + */ + TriggerHibernate(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerHibernateRequest + + // TriggerHibernateExecute executes the request + // @return map[string]interface{} + TriggerHibernateExecute(r ApiTriggerHibernateRequest) (map[string]interface{}, error) + + /* + TriggerMaintenance Trigger cluster maintenance + + Trigger immediate maintenance of the cluster. The autoUpdate configuration specified in the Maintenance object of the cluster spec defines what is updated during the immediate maintenance operation. + + @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 ApiTriggerMaintenanceRequest + */ + TriggerMaintenance(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerMaintenanceRequest + + // TriggerMaintenanceExecute executes the request + // @return map[string]interface{} + TriggerMaintenanceExecute(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) + + /* + TriggerReconcile Trigger cluster reconciliation + + Trigger immediate reconciliation of the complete cluster without changing the cluster specification. + + @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 ApiTriggerReconcileRequest + */ + TriggerReconcile(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerReconcileRequest + + // TriggerReconcileExecute executes the request + // @return map[string]interface{} + TriggerReconcileExecute(r ApiTriggerReconcileRequest) (map[string]interface{}, error) + + /* + TriggerWakeup Trigger cluster wakeup + + Trigger immediate wake up of the cluster. If the cluster is already in running state, this endpoint does nothing. + + @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 ApiTriggerWakeupRequest + */ + TriggerWakeup(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerWakeupRequest + + // TriggerWakeupExecute executes the request + // @return map[string]interface{} + TriggerWakeupExecute(r ApiTriggerWakeupRequest) (map[string]interface{}, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCompleteCredentialsRotationRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiCompleteCredentialsRotationRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.CompleteCredentialsRotationExecute(r) +} + +/* +CompleteCredentialsRotation Complete cluster credentials rotation + +Complete cluster credentials rotation. This is step 2 of a two-step process. Start the rotation using [start-credentials-rotation](#tag/Credentials/operation/SkeService_StartClusterCredentialsRotation). + + @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 ApiCompleteCredentialsRotationRequest +*/ +func (a *DefaultAPIService) CompleteCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiCompleteCredentialsRotationRequest { + return ApiCompleteCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) CompleteCredentialsRotationExecute(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CompleteCredentialsRotation") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/complete-credentials-rotation" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiCreateKubeconfigRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string + createKubeconfigPayload *CreateKubeconfigPayload +} + +func (r ApiCreateKubeconfigRequest) CreateKubeconfigPayload(createKubeconfigPayload CreateKubeconfigPayload) ApiCreateKubeconfigRequest { + r.createKubeconfigPayload = &createKubeconfigPayload + return r +} + +func (r ApiCreateKubeconfigRequest) Execute() (*Kubeconfig, error) { + return r.ApiService.CreateKubeconfigExecute(r) +} + +/* +CreateKubeconfig Create an admin kubeconfig + +Create a new admin kubeconfig for the cluster. You can specify the expiration (in seconds) in the request body. Its value must be in the range from 600 (10 min) to 15552000 (6 months). Defaults to 3600. + + @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 ApiCreateKubeconfigRequest +*/ +func (a *DefaultAPIService) CreateKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiCreateKubeconfigRequest { + return ApiCreateKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return Kubeconfig +func (a *DefaultAPIService) CreateKubeconfigExecute(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Kubeconfig + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateKubeconfig") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/kubeconfig" + 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{} + if r.createKubeconfigPayload == nil { + return localVarReturnValue, reportError("createKubeconfigPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createKubeconfigPayload + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiCreateOrUpdateClusterRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string + createOrUpdateClusterPayload *CreateOrUpdateClusterPayload +} + +func (r ApiCreateOrUpdateClusterRequest) CreateOrUpdateClusterPayload(createOrUpdateClusterPayload CreateOrUpdateClusterPayload) ApiCreateOrUpdateClusterRequest { + r.createOrUpdateClusterPayload = &createOrUpdateClusterPayload + return r +} + +func (r ApiCreateOrUpdateClusterRequest) Execute() (*Cluster, error) { + return r.ApiService.CreateOrUpdateClusterExecute(r) +} + +/* +CreateOrUpdateCluster Create or update a cluster + +Create a new cluster in your project or modify an existing one. To get valid values for certain properties please check the [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) endpoint. + + @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 ApiCreateOrUpdateClusterRequest +*/ +func (a *DefaultAPIService) CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest { + return ApiCreateOrUpdateClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *DefaultAPIService) CreateOrUpdateClusterExecute(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateOrUpdateCluster") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}" + 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{} + if r.createOrUpdateClusterPayload == nil { + return localVarReturnValue, reportError("createOrUpdateClusterPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createOrUpdateClusterPayload + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiDeleteClusterRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiDeleteClusterRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteClusterExecute(r) +} + +/* +DeleteCluster Delete a cluster + +Delete Kubernetes cluster specified by the identifier, belonging to the project specified by `projectId`. + + @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 ApiDeleteClusterRequest +*/ +func (a *DefaultAPIService) DeleteCluster(ctx context.Context, projectId string, region string, clusterName string) ApiDeleteClusterRequest { + return ApiDeleteClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteClusterExecute(r ApiDeleteClusterRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteCluster") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiGetClusterRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiGetClusterRequest) Execute() (*Cluster, error) { + return r.ApiService.GetClusterExecute(r) +} + +/* +GetCluster Get a cluster + +Get Kubernetes cluster for the specified identifier, belonging to the project specified by `projectId`. + + @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 ApiGetClusterRequest +*/ +func (a *DefaultAPIService) GetCluster(ctx context.Context, projectId string, region string, clusterName string) ApiGetClusterRequest { + return ApiGetClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return Cluster +func (a *DefaultAPIService) GetClusterExecute(r ApiGetClusterRequest) (*Cluster, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetCluster") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiGetLoginKubeconfigRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiGetLoginKubeconfigRequest) Execute() (*LoginKubeconfig, error) { + return r.ApiService.GetLoginKubeconfigExecute(r) +} + +/* +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. + + @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 ApiGetLoginKubeconfigRequest +*/ +func (a *DefaultAPIService) GetLoginKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiGetLoginKubeconfigRequest { + return ApiGetLoginKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return LoginKubeconfig +func (a *DefaultAPIService) GetLoginKubeconfigExecute(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoginKubeconfig + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetLoginKubeconfig") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/kubeconfig/login" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiListClustersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListClustersRequest) Execute() (*ListClustersResponse, error) { + return r.ApiService.ListClustersExecute(r) +} + +/* +ListClusters List all clusters + +Return a list of Kubernetes clusters in the project specified by `projectId`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListClustersRequest +*/ +func (a *DefaultAPIService) ListClusters(ctx context.Context, projectId string, region string) ApiListClustersRequest { + return ApiListClustersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListClustersResponse +func (a *DefaultAPIService) ListClustersExecute(r ApiListClustersRequest) (*ListClustersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListClustersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListClusters") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiListProviderOptionsRequest struct { + ctx context.Context + ApiService DefaultAPI + region string + versionState *string +} + +func (r ApiListProviderOptionsRequest) VersionState(versionState string) ApiListProviderOptionsRequest { + r.versionState = &versionState + return r +} + +func (r ApiListProviderOptionsRequest) Execute() (*ProviderOptions, error) { + return r.ApiService.ListProviderOptionsExecute(r) +} + +/* +ListProviderOptions List provider options + +Returns available Kubernetes versions, availability zones, machine types, OS versions and volume types for the cluster nodes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param region + @return ApiListProviderOptionsRequest +*/ +func (a *DefaultAPIService) ListProviderOptions(ctx context.Context, region string) ApiListProviderOptionsRequest { + return ApiListProviderOptionsRequest{ + ApiService: a, + ctx: ctx, + region: region, + } +} + +// Execute executes the request +// +// @return ProviderOptions +func (a *DefaultAPIService) ListProviderOptionsExecute(r ApiListProviderOptionsRequest) (*ProviderOptions, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProviderOptions + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListProviderOptions") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/regions/{region}/provider-options" + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.versionState != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "versionState", r.versionState, "form", "") + } + // 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiStartCredentialsRotationRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiStartCredentialsRotationRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.StartCredentialsRotationExecute(r) +} + +/* +StartCredentialsRotation Start cluster credentials rotation + +Start cluster credentials rotation. This is step 1 of a two-step process. Complete the rotation using [complete-credentials-rotation](#tag/Credentials/operation/SkeService_CompleteClusterCredentialsRotation). + + @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 ApiStartCredentialsRotationRequest +*/ +func (a *DefaultAPIService) StartCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiStartCredentialsRotationRequest { + return ApiStartCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) StartCredentialsRotationExecute(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.StartCredentialsRotation") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/start-credentials-rotation" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerHibernateRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiTriggerHibernateRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerHibernateExecute(r) +} + +/* +TriggerHibernate Trigger cluster hibernation + +Trigger immediate hibernation of the cluster. If the cluster is already in hibernation state, this endpoint does nothing. + + @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 ApiTriggerHibernateRequest +*/ +func (a *DefaultAPIService) TriggerHibernate(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerHibernateRequest { + return ApiTriggerHibernateRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerHibernateExecute(r ApiTriggerHibernateRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerHibernate") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/hibernate" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerMaintenanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiTriggerMaintenanceRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerMaintenanceExecute(r) +} + +/* +TriggerMaintenance Trigger cluster maintenance + +Trigger immediate maintenance of the cluster. The autoUpdate configuration specified in the Maintenance object of the cluster spec defines what is updated during the immediate maintenance operation. + + @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 ApiTriggerMaintenanceRequest +*/ +func (a *DefaultAPIService) TriggerMaintenance(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerMaintenanceRequest { + return ApiTriggerMaintenanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerMaintenanceExecute(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerMaintenance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/maintenance" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerReconcileRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiTriggerReconcileRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerReconcileExecute(r) +} + +/* +TriggerReconcile Trigger cluster reconciliation + +Trigger immediate reconciliation of the complete cluster without changing the cluster specification. + + @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 ApiTriggerReconcileRequest +*/ +func (a *DefaultAPIService) TriggerReconcile(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerReconcileRequest { + return ApiTriggerReconcileRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerReconcileExecute(r ApiTriggerReconcileRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerReconcile") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/reconcile" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} + +type ApiTriggerWakeupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + clusterName string +} + +func (r ApiTriggerWakeupRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.TriggerWakeupExecute(r) +} + +/* +TriggerWakeup Trigger cluster wakeup + +Trigger immediate wake up of the cluster. If the cluster is already in running state, this endpoint does nothing. + + @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 ApiTriggerWakeupRequest +*/ +func (a *DefaultAPIService) TriggerWakeup(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerWakeupRequest { + return ApiTriggerWakeupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) TriggerWakeupExecute(r ApiTriggerWakeupRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerWakeup") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/wakeup" + 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 := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v map[string]interface{} + err = a.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 + return localVarReturnValue, newErr + } + var v RuntimeError + err = a.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 + return localVarReturnValue, newErr + } + + err = a.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 +} diff --git a/services/ske/v2api/api_default_mock.go b/services/ske/v2api/api_default_mock.go new file mode 100644 index 000000000..71d94bdb5 --- /dev/null +++ b/services/ske/v2api/api_default_mock.go @@ -0,0 +1,306 @@ +/* +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 ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CompleteCredentialsRotationExecuteMock can be populated to implement the behavior of the CompleteCredentialsRotationExecute function of this mock + CompleteCredentialsRotationExecuteMock *func(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) + // CreateKubeconfigExecuteMock can be populated to implement the behavior of the CreateKubeconfigExecute function of this mock + CreateKubeconfigExecuteMock *func(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) + // CreateOrUpdateClusterExecuteMock can be populated to implement the behavior of the CreateOrUpdateClusterExecute function of this mock + CreateOrUpdateClusterExecuteMock *func(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) + // DeleteClusterExecuteMock can be populated to implement the behavior of the DeleteClusterExecute function of this mock + DeleteClusterExecuteMock *func(r ApiDeleteClusterRequest) (map[string]interface{}, error) + // GetClusterExecuteMock can be populated to implement the behavior of the GetClusterExecute function of this mock + GetClusterExecuteMock *func(r ApiGetClusterRequest) (*Cluster, error) + // GetLoginKubeconfigExecuteMock can be populated to implement the behavior of the GetLoginKubeconfigExecute function of this mock + GetLoginKubeconfigExecuteMock *func(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) + // ListClustersExecuteMock can be populated to implement the behavior of the ListClustersExecute function of this mock + ListClustersExecuteMock *func(r ApiListClustersRequest) (*ListClustersResponse, error) + // ListProviderOptionsExecuteMock can be populated to implement the behavior of the ListProviderOptionsExecute function of this mock + ListProviderOptionsExecuteMock *func(r ApiListProviderOptionsRequest) (*ProviderOptions, error) + // StartCredentialsRotationExecuteMock can be populated to implement the behavior of the StartCredentialsRotationExecute function of this mock + StartCredentialsRotationExecuteMock *func(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) + // TriggerHibernateExecuteMock can be populated to implement the behavior of the TriggerHibernateExecute function of this mock + TriggerHibernateExecuteMock *func(r ApiTriggerHibernateRequest) (map[string]interface{}, error) + // TriggerMaintenanceExecuteMock can be populated to implement the behavior of the TriggerMaintenanceExecute function of this mock + TriggerMaintenanceExecuteMock *func(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) + // TriggerReconcileExecuteMock can be populated to implement the behavior of the TriggerReconcileExecute function of this mock + TriggerReconcileExecuteMock *func(r ApiTriggerReconcileRequest) (map[string]interface{}, error) + // TriggerWakeupExecuteMock can be populated to implement the behavior of the TriggerWakeupExecute function of this mock + TriggerWakeupExecuteMock *func(r ApiTriggerWakeupRequest) (map[string]interface{}, error) +} + +func (a DefaultAPIServiceMock) CompleteCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiCompleteCredentialsRotationRequest { + return ApiCompleteCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// CompleteCredentialsRotationExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CompleteCredentialsRotationExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CompleteCredentialsRotationExecute(r ApiCompleteCredentialsRotationRequest) (map[string]interface{}, error) { + if a.CompleteCredentialsRotationExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.CompleteCredentialsRotationExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiCreateKubeconfigRequest { + return ApiCreateKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// CreateKubeconfigExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateKubeconfigExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateKubeconfigExecute(r ApiCreateKubeconfigRequest) (*Kubeconfig, error) { + if a.CreateKubeconfigExecuteMock == nil { + var localVarReturnValue *Kubeconfig + return localVarReturnValue, nil + } + + return (*a.CreateKubeconfigExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateOrUpdateCluster(ctx context.Context, projectId string, region string, clusterName string) ApiCreateOrUpdateClusterRequest { + return ApiCreateOrUpdateClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// CreateOrUpdateClusterExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateOrUpdateClusterExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateOrUpdateClusterExecute(r ApiCreateOrUpdateClusterRequest) (*Cluster, error) { + if a.CreateOrUpdateClusterExecuteMock == nil { + var localVarReturnValue *Cluster + return localVarReturnValue, nil + } + + return (*a.CreateOrUpdateClusterExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteCluster(ctx context.Context, projectId string, region string, clusterName string) ApiDeleteClusterRequest { + return ApiDeleteClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// DeleteClusterExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteClusterExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteClusterExecute(r ApiDeleteClusterRequest) (map[string]interface{}, error) { + if a.DeleteClusterExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteClusterExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetCluster(ctx context.Context, projectId string, region string, clusterName string) ApiGetClusterRequest { + return ApiGetClusterRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// GetClusterExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetClusterExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetClusterExecute(r ApiGetClusterRequest) (*Cluster, error) { + if a.GetClusterExecuteMock == nil { + var localVarReturnValue *Cluster + return localVarReturnValue, nil + } + + return (*a.GetClusterExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetLoginKubeconfig(ctx context.Context, projectId string, region string, clusterName string) ApiGetLoginKubeconfigRequest { + return ApiGetLoginKubeconfigRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// GetLoginKubeconfigExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetLoginKubeconfigExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetLoginKubeconfigExecute(r ApiGetLoginKubeconfigRequest) (*LoginKubeconfig, error) { + if a.GetLoginKubeconfigExecuteMock == nil { + var localVarReturnValue *LoginKubeconfig + return localVarReturnValue, nil + } + + return (*a.GetLoginKubeconfigExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListClusters(ctx context.Context, projectId string, region string) ApiListClustersRequest { + return ApiListClustersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListClustersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListClustersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListClustersExecute(r ApiListClustersRequest) (*ListClustersResponse, error) { + if a.ListClustersExecuteMock == nil { + var localVarReturnValue *ListClustersResponse + return localVarReturnValue, nil + } + + return (*a.ListClustersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListProviderOptions(ctx context.Context, region string) ApiListProviderOptionsRequest { + return ApiListProviderOptionsRequest{ + ApiService: a, + ctx: ctx, + region: region, + } +} + +// ListProviderOptionsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListProviderOptionsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListProviderOptionsExecute(r ApiListProviderOptionsRequest) (*ProviderOptions, error) { + if a.ListProviderOptionsExecuteMock == nil { + var localVarReturnValue *ProviderOptions + return localVarReturnValue, nil + } + + return (*a.ListProviderOptionsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) StartCredentialsRotation(ctx context.Context, projectId string, region string, clusterName string) ApiStartCredentialsRotationRequest { + return ApiStartCredentialsRotationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// StartCredentialsRotationExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the StartCredentialsRotationExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) StartCredentialsRotationExecute(r ApiStartCredentialsRotationRequest) (map[string]interface{}, error) { + if a.StartCredentialsRotationExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.StartCredentialsRotationExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerHibernate(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerHibernateRequest { + return ApiTriggerHibernateRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// TriggerHibernateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerHibernateExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerHibernateExecute(r ApiTriggerHibernateRequest) (map[string]interface{}, error) { + if a.TriggerHibernateExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerHibernateExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerMaintenance(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerMaintenanceRequest { + return ApiTriggerMaintenanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// TriggerMaintenanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerMaintenanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerMaintenanceExecute(r ApiTriggerMaintenanceRequest) (map[string]interface{}, error) { + if a.TriggerMaintenanceExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerMaintenanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerReconcile(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerReconcileRequest { + return ApiTriggerReconcileRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// TriggerReconcileExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerReconcileExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerReconcileExecute(r ApiTriggerReconcileRequest) (map[string]interface{}, error) { + if a.TriggerReconcileExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerReconcileExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerWakeup(ctx context.Context, projectId string, region string, clusterName string) ApiTriggerWakeupRequest { + return ApiTriggerWakeupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + clusterName: clusterName, + } +} + +// TriggerWakeupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerWakeupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerWakeupExecute(r ApiTriggerWakeupRequest) (map[string]interface{}, error) { + if a.TriggerWakeupExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.TriggerWakeupExecuteMock)(r) +} diff --git a/services/ske/v2api/client.go b/services/ske/v2api/client.go new file mode 100644 index 000000000..83287a227 --- /dev/null +++ b/services/ske/v2api/client.go @@ -0,0 +1,658 @@ +/* +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 ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT Kubernetes Engine API API v2.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/ske/v2api/configuration.go b/services/ske/v2api/configuration.go new file mode 100644 index 000000000..958c8968e --- /dev/null +++ b/services/ske/v2api/configuration.go @@ -0,0 +1,37 @@ +/* +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 ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/ske", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://ske.api.stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "global", + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/ske/v2api/model_access_scope.go b/services/ske/v2api/model_access_scope.go new file mode 100644 index 000000000..30c0dbc91 --- /dev/null +++ b/services/ske/v2api/model_access_scope.go @@ -0,0 +1,110 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "fmt" +) + +// 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. ⚠️ 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 +const ( + ACCESSSCOPE_PUBLIC AccessScope = "PUBLIC" + ACCESSSCOPE_SNA AccessScope = "SNA" +) + +// All allowed values of AccessScope enum +var AllowedAccessScopeEnumValues = []AccessScope{ + "PUBLIC", + "SNA", +} + +func (v *AccessScope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AccessScope(value) + for _, existing := range AllowedAccessScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid AccessScope", value) +} + +// NewAccessScopeFromValue returns a pointer to a valid AccessScope +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAccessScopeFromValue(v string) (*AccessScope, error) { + ev := AccessScope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AccessScope: valid values are %v", v, AllowedAccessScopeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AccessScope) IsValid() bool { + for _, existing := range AllowedAccessScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to AccessScope value +func (v AccessScope) Ptr() *AccessScope { + return &v +} + +type NullableAccessScope struct { + value *AccessScope + isSet bool +} + +func (v NullableAccessScope) Get() *AccessScope { + return v.value +} + +func (v *NullableAccessScope) Set(val *AccessScope) { + v.value = val + v.isSet = true +} + +func (v NullableAccessScope) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessScope(val *AccessScope) *NullableAccessScope { + return &NullableAccessScope{value: val, isSet: true} +} + +func (v NullableAccessScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_acl.go b/services/ske/v2api/model_acl.go new file mode 100644 index 000000000..8725dfab8 --- /dev/null +++ b/services/ske/v2api/model_acl.go @@ -0,0 +1,186 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + +// ACL struct for ACL +type ACL struct { + // Array of CIDRs to allow access to the kubernetes API. + AllowedCidrs []string `json:"allowedCidrs"` + // Enables the acl extension. + Enabled bool `json:"enabled"` +} + +type _ACL ACL + +// NewACL instantiates a new ACL 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 NewACL(allowedCidrs []string, enabled bool) *ACL { + this := ACL{} + this.AllowedCidrs = allowedCidrs + this.Enabled = enabled + return &this +} + +// NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetAllowedCidrs returns the AllowedCidrs field value +func (o *ACL) GetAllowedCidrs() []string { + if o == nil { + var ret []string + return ret + } + + return o.AllowedCidrs +} + +// GetAllowedCidrsOk returns a tuple with the AllowedCidrs field value +// and a boolean to check if the value has been set. +func (o *ACL) GetAllowedCidrsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.AllowedCidrs, true +} + +// SetAllowedCidrs sets field value +func (o *ACL) SetAllowedCidrs(v []string) { + o.AllowedCidrs = v +} + +// GetEnabled returns the Enabled field value +func (o *ACL) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ACL) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *ACL) SetEnabled(v bool) { + o.Enabled = v +} + +func (o ACL) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["allowedCidrs"] = o.AllowedCidrs + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +func (o *ACL) 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{ + "allowedCidrs", + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varACL := _ACL{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varACL) + + if err != nil { + return err + } + + *o = ACL(varACL) + + return err +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_availability_zone.go b/services/ske/v2api/model_availability_zone.go new file mode 100644 index 000000000..e5f8a8a31 --- /dev/null +++ b/services/ske/v2api/model_availability_zone.go @@ -0,0 +1,124 @@ +/* +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 AvailabilityZone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AvailabilityZone{} + +// AvailabilityZone struct for AvailabilityZone +type AvailabilityZone struct { + Name *string `json:"name,omitempty"` +} + +// NewAvailabilityZone instantiates a new AvailabilityZone 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 NewAvailabilityZone() *AvailabilityZone { + this := AvailabilityZone{} + return &this +} + +// NewAvailabilityZoneWithDefaults instantiates a new AvailabilityZone 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 NewAvailabilityZoneWithDefaults() *AvailabilityZone { + this := AvailabilityZone{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AvailabilityZone) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *AvailabilityZone) GetNameOk() (*string, 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 *AvailabilityZone) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AvailabilityZone) SetName(v string) { + o.Name = &v +} + +func (o AvailabilityZone) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AvailabilityZone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableAvailabilityZone struct { + value *AvailabilityZone + isSet bool +} + +func (v NullableAvailabilityZone) Get() *AvailabilityZone { + return v.value +} + +func (v *NullableAvailabilityZone) Set(val *AvailabilityZone) { + v.value = val + v.isSet = true +} + +func (v NullableAvailabilityZone) IsSet() bool { + return v.isSet +} + +func (v *NullableAvailabilityZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAvailabilityZone(val *AvailabilityZone) *NullableAvailabilityZone { + return &NullableAvailabilityZone{value: val, isSet: true} +} + +func (v NullableAvailabilityZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAvailabilityZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cluster.go b/services/ske/v2api/model_cluster.go new file mode 100644 index 000000000..c4601a793 --- /dev/null +++ b/services/ske/v2api/model_cluster.go @@ -0,0 +1,400 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Cluster type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cluster{} + +// Cluster struct for Cluster +type Cluster struct { + Extensions *Extension `json:"extensions,omitempty"` + Hibernation *Hibernation `json:"hibernation,omitempty"` + Kubernetes Kubernetes `json:"kubernetes"` + Maintenance *Maintenance `json:"maintenance,omitempty"` + Name *string `json:"name,omitempty"` + Network *Network `json:"network,omitempty"` + Nodepools []Nodepool `json:"nodepools"` + Status *ClusterStatus `json:"status,omitempty"` +} + +type _Cluster Cluster + +// NewCluster instantiates a new Cluster 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 NewCluster(kubernetes Kubernetes, nodepools []Nodepool) *Cluster { + this := Cluster{} + this.Kubernetes = kubernetes + this.Nodepools = nodepools + return &this +} + +// NewClusterWithDefaults instantiates a new Cluster 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 NewClusterWithDefaults() *Cluster { + this := Cluster{} + return &this +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *Cluster) GetExtensions() Extension { + if o == nil || IsNil(o.Extensions) { + var ret Extension + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetExtensionsOk() (*Extension, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *Cluster) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +func (o *Cluster) SetExtensions(v Extension) { + o.Extensions = &v +} + +// GetHibernation returns the Hibernation field value if set, zero value otherwise. +func (o *Cluster) GetHibernation() Hibernation { + if o == nil || IsNil(o.Hibernation) { + var ret Hibernation + return ret + } + return *o.Hibernation +} + +// GetHibernationOk returns a tuple with the Hibernation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetHibernationOk() (*Hibernation, bool) { + if o == nil || IsNil(o.Hibernation) { + return nil, false + } + return o.Hibernation, true +} + +// HasHibernation returns a boolean if a field has been set. +func (o *Cluster) HasHibernation() bool { + if o != nil && !IsNil(o.Hibernation) { + return true + } + + return false +} + +// SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +func (o *Cluster) SetHibernation(v Hibernation) { + o.Hibernation = &v +} + +// GetKubernetes returns the Kubernetes field value +func (o *Cluster) GetKubernetes() Kubernetes { + if o == nil { + var ret Kubernetes + return ret + } + + return o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value +// and a boolean to check if the value has been set. +func (o *Cluster) GetKubernetesOk() (*Kubernetes, bool) { + if o == nil { + return nil, false + } + return &o.Kubernetes, true +} + +// SetKubernetes sets field value +func (o *Cluster) SetKubernetes(v Kubernetes) { + o.Kubernetes = v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *Cluster) GetMaintenance() Maintenance { + if o == nil || IsNil(o.Maintenance) { + var ret Maintenance + return ret + } + return *o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetMaintenanceOk() (*Maintenance, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *Cluster) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +func (o *Cluster) SetMaintenance(v Maintenance) { + o.Maintenance = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Cluster) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *Cluster) GetNameOk() (*string, 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 *Cluster) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Cluster) SetName(v string) { + o.Name = &v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *Cluster) GetNetwork() Network { + if o == nil || IsNil(o.Network) { + var ret Network + return ret + } + return *o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetNetworkOk() (*Network, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *Cluster) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given Network and assigns it to the Network field. +func (o *Cluster) SetNetwork(v Network) { + o.Network = &v +} + +// GetNodepools returns the Nodepools field value +func (o *Cluster) GetNodepools() []Nodepool { + if o == nil { + var ret []Nodepool + return ret + } + + return o.Nodepools +} + +// GetNodepoolsOk returns a tuple with the Nodepools field value +// and a boolean to check if the value has been set. +func (o *Cluster) GetNodepoolsOk() ([]Nodepool, bool) { + if o == nil { + return nil, false + } + return o.Nodepools, true +} + +// SetNodepools sets field value +func (o *Cluster) SetNodepools(v []Nodepool) { + o.Nodepools = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Cluster) GetStatus() ClusterStatus { + if o == nil || IsNil(o.Status) { + var ret ClusterStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Cluster) GetStatusOk() (*ClusterStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Cluster) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +func (o *Cluster) SetStatus(v ClusterStatus) { + o.Status = &v +} + +func (o Cluster) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Cluster) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + if !IsNil(o.Hibernation) { + toSerialize["hibernation"] = o.Hibernation + } + toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + toSerialize["nodepools"] = o.Nodepools + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +func (o *Cluster) 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{ + "kubernetes", + "nodepools", + } + + 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) + } + } + + varCluster := _Cluster{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCluster) + + if err != nil { + return err + } + + *o = Cluster(varCluster) + + return err +} + +type NullableCluster struct { + value *Cluster + isSet bool +} + +func (v NullableCluster) Get() *Cluster { + return v.value +} + +func (v *NullableCluster) Set(val *Cluster) { + v.value = val + v.isSet = true +} + +func (v NullableCluster) IsSet() bool { + return v.isSet +} + +func (v *NullableCluster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCluster(val *Cluster) *NullableCluster { + return &NullableCluster{value: val, isSet: true} +} + +func (v NullableCluster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCluster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cluster_error.go b/services/ske/v2api/model_cluster_error.go new file mode 100644 index 000000000..ea023ddf0 --- /dev/null +++ b/services/ske/v2api/model_cluster_error.go @@ -0,0 +1,161 @@ +/* +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 ClusterError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterError{} + +// ClusterError struct for ClusterError +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\"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewClusterError instantiates a new ClusterError 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 NewClusterError() *ClusterError { + this := ClusterError{} + return &this +} + +// NewClusterErrorWithDefaults instantiates a new ClusterError 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 NewClusterErrorWithDefaults() *ClusterError { + this := ClusterError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ClusterError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ClusterError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ClusterError) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ClusterError) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterError) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ClusterError) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ClusterError) SetMessage(v string) { + o.Message = &v +} + +func (o ClusterError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClusterError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableClusterError struct { + value *ClusterError + isSet bool +} + +func (v NullableClusterError) Get() *ClusterError { + return v.value +} + +func (v *NullableClusterError) Set(val *ClusterError) { + v.value = val + v.isSet = true +} + +func (v NullableClusterError) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterError(val *ClusterError) *NullableClusterError { + return &NullableClusterError{value: val, isSet: true} +} + +func (v NullableClusterError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cluster_status.go b/services/ske/v2api/model_cluster_status.go new file mode 100644 index 000000000..488375532 --- /dev/null +++ b/services/ske/v2api/model_cluster_status.go @@ -0,0 +1,416 @@ +/* +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" + "time" +) + +// checks if the ClusterStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterStatus{} + +// ClusterStatus struct for ClusterStatus +type ClusterStatus struct { + Aggregated *ClusterStatusState `json:"aggregated,omitempty"` + // Format: `2024-02-15T11:06:29Z` + CreationTime *time.Time `json:"creationTime,omitempty"` + CredentialsRotation *CredentialsRotationState `json:"credentialsRotation,omitempty"` + // The outgoing network ranges (in CIDR notation) of traffic originating from workload on the cluster. + EgressAddressRanges []string `json:"egressAddressRanges,omitempty"` + Error *RuntimeError `json:"error,omitempty"` + Errors []ClusterError `json:"errors,omitempty"` + Hibernated *bool `json:"hibernated,omitempty"` + Identity *string `json:"identity,omitempty"` + // The network ranges (in CIDR notation) used by pods of the cluster. + PodAddressRanges []string `json:"podAddressRanges,omitempty"` +} + +// NewClusterStatus instantiates a new ClusterStatus 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 NewClusterStatus() *ClusterStatus { + this := ClusterStatus{} + return &this +} + +// NewClusterStatusWithDefaults instantiates a new ClusterStatus 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 NewClusterStatusWithDefaults() *ClusterStatus { + this := ClusterStatus{} + return &this +} + +// GetAggregated returns the Aggregated field value if set, zero value otherwise. +func (o *ClusterStatus) GetAggregated() ClusterStatusState { + if o == nil || IsNil(o.Aggregated) { + var ret ClusterStatusState + return ret + } + return *o.Aggregated +} + +// GetAggregatedOk returns a tuple with the Aggregated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetAggregatedOk() (*ClusterStatusState, bool) { + if o == nil || IsNil(o.Aggregated) { + return nil, false + } + return o.Aggregated, true +} + +// HasAggregated returns a boolean if a field has been set. +func (o *ClusterStatus) HasAggregated() bool { + if o != nil && !IsNil(o.Aggregated) { + return true + } + + return false +} + +// SetAggregated gets a reference to the given ClusterStatusState and assigns it to the Aggregated field. +func (o *ClusterStatus) SetAggregated(v ClusterStatusState) { + o.Aggregated = &v +} + +// GetCreationTime returns the CreationTime field value if set, zero value otherwise. +func (o *ClusterStatus) GetCreationTime() time.Time { + if o == nil || IsNil(o.CreationTime) { + var ret time.Time + return ret + } + return *o.CreationTime +} + +// GetCreationTimeOk returns a tuple with the CreationTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetCreationTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreationTime) { + return nil, false + } + return o.CreationTime, true +} + +// HasCreationTime returns a boolean if a field has been set. +func (o *ClusterStatus) HasCreationTime() bool { + if o != nil && !IsNil(o.CreationTime) { + return true + } + + return false +} + +// SetCreationTime gets a reference to the given time.Time and assigns it to the CreationTime field. +func (o *ClusterStatus) SetCreationTime(v time.Time) { + o.CreationTime = &v +} + +// GetCredentialsRotation returns the CredentialsRotation field value if set, zero value otherwise. +func (o *ClusterStatus) GetCredentialsRotation() CredentialsRotationState { + if o == nil || IsNil(o.CredentialsRotation) { + var ret CredentialsRotationState + return ret + } + return *o.CredentialsRotation +} + +// GetCredentialsRotationOk returns a tuple with the CredentialsRotation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetCredentialsRotationOk() (*CredentialsRotationState, bool) { + if o == nil || IsNil(o.CredentialsRotation) { + return nil, false + } + return o.CredentialsRotation, true +} + +// HasCredentialsRotation returns a boolean if a field has been set. +func (o *ClusterStatus) HasCredentialsRotation() bool { + if o != nil && !IsNil(o.CredentialsRotation) { + return true + } + + return false +} + +// SetCredentialsRotation gets a reference to the given CredentialsRotationState and assigns it to the CredentialsRotation field. +func (o *ClusterStatus) SetCredentialsRotation(v CredentialsRotationState) { + o.CredentialsRotation = &v +} + +// GetEgressAddressRanges returns the EgressAddressRanges field value if set, zero value otherwise. +func (o *ClusterStatus) GetEgressAddressRanges() []string { + if o == nil || IsNil(o.EgressAddressRanges) { + var ret []string + return ret + } + return o.EgressAddressRanges +} + +// GetEgressAddressRangesOk returns a tuple with the EgressAddressRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetEgressAddressRangesOk() ([]string, bool) { + if o == nil || IsNil(o.EgressAddressRanges) { + return nil, false + } + return o.EgressAddressRanges, true +} + +// HasEgressAddressRanges returns a boolean if a field has been set. +func (o *ClusterStatus) HasEgressAddressRanges() bool { + if o != nil && !IsNil(o.EgressAddressRanges) { + return true + } + + return false +} + +// SetEgressAddressRanges gets a reference to the given []string and assigns it to the EgressAddressRanges field. +func (o *ClusterStatus) SetEgressAddressRanges(v []string) { + o.EgressAddressRanges = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ClusterStatus) GetError() RuntimeError { + if o == nil || IsNil(o.Error) { + var ret RuntimeError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorOk() (*RuntimeError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ClusterStatus) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given RuntimeError and assigns it to the Error field. +func (o *ClusterStatus) SetError(v RuntimeError) { + o.Error = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ClusterStatus) GetErrors() []ClusterError { + if o == nil || IsNil(o.Errors) { + var ret []ClusterError + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorsOk() ([]ClusterError, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *ClusterStatus) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []ClusterError and assigns it to the Errors field. +func (o *ClusterStatus) SetErrors(v []ClusterError) { + o.Errors = v +} + +// GetHibernated returns the Hibernated field value if set, zero value otherwise. +func (o *ClusterStatus) GetHibernated() bool { + if o == nil || IsNil(o.Hibernated) { + var ret bool + return ret + } + return *o.Hibernated +} + +// GetHibernatedOk returns a tuple with the Hibernated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetHibernatedOk() (*bool, bool) { + if o == nil || IsNil(o.Hibernated) { + return nil, false + } + return o.Hibernated, true +} + +// HasHibernated returns a boolean if a field has been set. +func (o *ClusterStatus) HasHibernated() bool { + if o != nil && !IsNil(o.Hibernated) { + return true + } + + return false +} + +// SetHibernated gets a reference to the given bool and assigns it to the Hibernated field. +func (o *ClusterStatus) SetHibernated(v bool) { + o.Hibernated = &v +} + +// GetIdentity returns the Identity field value if set, zero value otherwise. +func (o *ClusterStatus) GetIdentity() string { + if o == nil || IsNil(o.Identity) { + var ret string + return ret + } + return *o.Identity +} + +// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetIdentityOk() (*string, bool) { + if o == nil || IsNil(o.Identity) { + return nil, false + } + return o.Identity, true +} + +// HasIdentity returns a boolean if a field has been set. +func (o *ClusterStatus) HasIdentity() bool { + if o != nil && !IsNil(o.Identity) { + return true + } + + return false +} + +// SetIdentity gets a reference to the given string and assigns it to the Identity field. +func (o *ClusterStatus) SetIdentity(v string) { + o.Identity = &v +} + +// GetPodAddressRanges returns the PodAddressRanges field value if set, zero value otherwise. +func (o *ClusterStatus) GetPodAddressRanges() []string { + if o == nil || IsNil(o.PodAddressRanges) { + var ret []string + return ret + } + return o.PodAddressRanges +} + +// GetPodAddressRangesOk returns a tuple with the PodAddressRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetPodAddressRangesOk() ([]string, bool) { + if o == nil || IsNil(o.PodAddressRanges) { + return nil, false + } + return o.PodAddressRanges, true +} + +// HasPodAddressRanges returns a boolean if a field has been set. +func (o *ClusterStatus) HasPodAddressRanges() bool { + if o != nil && !IsNil(o.PodAddressRanges) { + return true + } + + return false +} + +// SetPodAddressRanges gets a reference to the given []string and assigns it to the PodAddressRanges field. +func (o *ClusterStatus) SetPodAddressRanges(v []string) { + o.PodAddressRanges = v +} + +func (o ClusterStatus) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClusterStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Aggregated) { + toSerialize["aggregated"] = o.Aggregated + } + if !IsNil(o.CreationTime) { + toSerialize["creationTime"] = o.CreationTime + } + if !IsNil(o.CredentialsRotation) { + toSerialize["credentialsRotation"] = o.CredentialsRotation + } + if !IsNil(o.EgressAddressRanges) { + toSerialize["egressAddressRanges"] = o.EgressAddressRanges + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + if !IsNil(o.Hibernated) { + toSerialize["hibernated"] = o.Hibernated + } + if !IsNil(o.Identity) { + toSerialize["identity"] = o.Identity + } + if !IsNil(o.PodAddressRanges) { + toSerialize["podAddressRanges"] = o.PodAddressRanges + } + return toSerialize, nil +} + +type NullableClusterStatus struct { + value *ClusterStatus + isSet bool +} + +func (v NullableClusterStatus) Get() *ClusterStatus { + return v.value +} + +func (v *NullableClusterStatus) Set(val *ClusterStatus) { + v.value = val + v.isSet = true +} + +func (v NullableClusterStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterStatus(val *ClusterStatus) *NullableClusterStatus { + return &NullableClusterStatus{value: val, isSet: true} +} + +func (v NullableClusterStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cluster_status_state.go b/services/ske/v2api/model_cluster_status_state.go new file mode 100644 index 000000000..cc0b7ec32 --- /dev/null +++ b/services/ske/v2api/model_cluster_status_state.go @@ -0,0 +1,122 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "fmt" +) + +// ClusterStatusState the model 'ClusterStatusState' +type ClusterStatusState string + +// List of ClusterStatusState +const ( + CLUSTERSTATUSSTATE_STATE_HEALTHY ClusterStatusState = "STATE_HEALTHY" + CLUSTERSTATUSSTATE_STATE_CREATING ClusterStatusState = "STATE_CREATING" + CLUSTERSTATUSSTATE_STATE_DELETING ClusterStatusState = "STATE_DELETING" + CLUSTERSTATUSSTATE_STATE_UNHEALTHY ClusterStatusState = "STATE_UNHEALTHY" + CLUSTERSTATUSSTATE_STATE_RECONCILING ClusterStatusState = "STATE_RECONCILING" + CLUSTERSTATUSSTATE_STATE_HIBERNATED ClusterStatusState = "STATE_HIBERNATED" + CLUSTERSTATUSSTATE_STATE_HIBERNATING ClusterStatusState = "STATE_HIBERNATING" + CLUSTERSTATUSSTATE_STATE_WAKINGUP ClusterStatusState = "STATE_WAKINGUP" +) + +// All allowed values of ClusterStatusState enum +var AllowedClusterStatusStateEnumValues = []ClusterStatusState{ + "STATE_HEALTHY", + "STATE_CREATING", + "STATE_DELETING", + "STATE_UNHEALTHY", + "STATE_RECONCILING", + "STATE_HIBERNATED", + "STATE_HIBERNATING", + "STATE_WAKINGUP", +} + +func (v *ClusterStatusState) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ClusterStatusState(value) + for _, existing := range AllowedClusterStatusStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ClusterStatusState", value) +} + +// NewClusterStatusStateFromValue returns a pointer to a valid ClusterStatusState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewClusterStatusStateFromValue(v string) (*ClusterStatusState, error) { + ev := ClusterStatusState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ClusterStatusState: valid values are %v", v, AllowedClusterStatusStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ClusterStatusState) IsValid() bool { + for _, existing := range AllowedClusterStatusStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ClusterStatusState value +func (v ClusterStatusState) Ptr() *ClusterStatusState { + return &v +} + +type NullableClusterStatusState struct { + value *ClusterStatusState + isSet bool +} + +func (v NullableClusterStatusState) Get() *ClusterStatusState { + return v.value +} + +func (v *NullableClusterStatusState) Set(val *ClusterStatusState) { + v.value = val + v.isSet = true +} + +func (v NullableClusterStatusState) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterStatusState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterStatusState(val *ClusterStatusState) *NullableClusterStatusState { + return &NullableClusterStatusState{value: val, isSet: true} +} + +func (v NullableClusterStatusState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterStatusState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_create_kubeconfig_payload.go b/services/ske/v2api/model_create_kubeconfig_payload.go new file mode 100644 index 000000000..07af01128 --- /dev/null +++ b/services/ske/v2api/model_create_kubeconfig_payload.go @@ -0,0 +1,124 @@ +/* +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 CreateKubeconfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateKubeconfigPayload{} + +// CreateKubeconfigPayload struct for CreateKubeconfigPayload +type CreateKubeconfigPayload struct { + ExpirationSeconds *string `json:"expirationSeconds,omitempty"` +} + +// NewCreateKubeconfigPayload instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayload() *CreateKubeconfigPayload { + this := CreateKubeconfigPayload{} + return &this +} + +// NewCreateKubeconfigPayloadWithDefaults instantiates a new CreateKubeconfigPayload 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 NewCreateKubeconfigPayloadWithDefaults() *CreateKubeconfigPayload { + this := CreateKubeconfigPayload{} + return &this +} + +// GetExpirationSeconds returns the ExpirationSeconds field value if set, zero value otherwise. +func (o *CreateKubeconfigPayload) GetExpirationSeconds() string { + if o == nil || IsNil(o.ExpirationSeconds) { + var ret string + return ret + } + return *o.ExpirationSeconds +} + +// GetExpirationSecondsOk returns a tuple with the ExpirationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateKubeconfigPayload) GetExpirationSecondsOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationSeconds) { + return nil, false + } + return o.ExpirationSeconds, true +} + +// HasExpirationSeconds returns a boolean if a field has been set. +func (o *CreateKubeconfigPayload) HasExpirationSeconds() bool { + if o != nil && !IsNil(o.ExpirationSeconds) { + return true + } + + return false +} + +// SetExpirationSeconds gets a reference to the given string and assigns it to the ExpirationSeconds field. +func (o *CreateKubeconfigPayload) SetExpirationSeconds(v string) { + o.ExpirationSeconds = &v +} + +func (o CreateKubeconfigPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateKubeconfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationSeconds) { + toSerialize["expirationSeconds"] = o.ExpirationSeconds + } + return toSerialize, nil +} + +type NullableCreateKubeconfigPayload struct { + value *CreateKubeconfigPayload + isSet bool +} + +func (v NullableCreateKubeconfigPayload) Get() *CreateKubeconfigPayload { + return v.value +} + +func (v *NullableCreateKubeconfigPayload) Set(val *CreateKubeconfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateKubeconfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateKubeconfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateKubeconfigPayload(val *CreateKubeconfigPayload) *NullableCreateKubeconfigPayload { + return &NullableCreateKubeconfigPayload{value: val, isSet: true} +} + +func (v NullableCreateKubeconfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateKubeconfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_create_or_update_cluster_payload.go b/services/ske/v2api/model_create_or_update_cluster_payload.go new file mode 100644 index 000000000..7a735749b --- /dev/null +++ b/services/ske/v2api/model_create_or_update_cluster_payload.go @@ -0,0 +1,364 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateOrUpdateClusterPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOrUpdateClusterPayload{} + +// CreateOrUpdateClusterPayload struct for CreateOrUpdateClusterPayload +type CreateOrUpdateClusterPayload struct { + Extensions *Extension `json:"extensions,omitempty"` + Hibernation *Hibernation `json:"hibernation,omitempty"` + Kubernetes Kubernetes `json:"kubernetes"` + Maintenance *Maintenance `json:"maintenance,omitempty"` + Network *Network `json:"network,omitempty"` + Nodepools []Nodepool `json:"nodepools"` + Status *ClusterStatus `json:"status,omitempty"` +} + +type _CreateOrUpdateClusterPayload CreateOrUpdateClusterPayload + +// NewCreateOrUpdateClusterPayload instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayload(kubernetes Kubernetes, nodepools []Nodepool) *CreateOrUpdateClusterPayload { + this := CreateOrUpdateClusterPayload{} + this.Kubernetes = kubernetes + this.Nodepools = nodepools + return &this +} + +// NewCreateOrUpdateClusterPayloadWithDefaults instantiates a new CreateOrUpdateClusterPayload 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 NewCreateOrUpdateClusterPayloadWithDefaults() *CreateOrUpdateClusterPayload { + this := CreateOrUpdateClusterPayload{} + return &this +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetExtensions() Extension { + if o == nil || IsNil(o.Extensions) { + var ret Extension + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetExtensionsOk() (*Extension, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given Extension and assigns it to the Extensions field. +func (o *CreateOrUpdateClusterPayload) SetExtensions(v Extension) { + o.Extensions = &v +} + +// GetHibernation returns the Hibernation field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetHibernation() Hibernation { + if o == nil || IsNil(o.Hibernation) { + var ret Hibernation + return ret + } + return *o.Hibernation +} + +// GetHibernationOk returns a tuple with the Hibernation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetHibernationOk() (*Hibernation, bool) { + if o == nil || IsNil(o.Hibernation) { + return nil, false + } + return o.Hibernation, true +} + +// HasHibernation returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasHibernation() bool { + if o != nil && !IsNil(o.Hibernation) { + return true + } + + return false +} + +// SetHibernation gets a reference to the given Hibernation and assigns it to the Hibernation field. +func (o *CreateOrUpdateClusterPayload) SetHibernation(v Hibernation) { + o.Hibernation = &v +} + +// GetKubernetes returns the Kubernetes field value +func (o *CreateOrUpdateClusterPayload) GetKubernetes() Kubernetes { + if o == nil { + var ret Kubernetes + return ret + } + + return o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetKubernetesOk() (*Kubernetes, bool) { + if o == nil { + return nil, false + } + return &o.Kubernetes, true +} + +// SetKubernetes sets field value +func (o *CreateOrUpdateClusterPayload) SetKubernetes(v Kubernetes) { + o.Kubernetes = v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetMaintenance() Maintenance { + if o == nil || IsNil(o.Maintenance) { + var ret Maintenance + return ret + } + return *o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetMaintenanceOk() (*Maintenance, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given Maintenance and assigns it to the Maintenance field. +func (o *CreateOrUpdateClusterPayload) SetMaintenance(v Maintenance) { + o.Maintenance = &v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetNetwork() Network { + if o == nil || IsNil(o.Network) { + var ret Network + return ret + } + return *o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetNetworkOk() (*Network, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given Network and assigns it to the Network field. +func (o *CreateOrUpdateClusterPayload) SetNetwork(v Network) { + o.Network = &v +} + +// GetNodepools returns the Nodepools field value +func (o *CreateOrUpdateClusterPayload) GetNodepools() []Nodepool { + if o == nil { + var ret []Nodepool + return ret + } + + return o.Nodepools +} + +// GetNodepoolsOk returns a tuple with the Nodepools field value +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetNodepoolsOk() ([]Nodepool, bool) { + if o == nil { + return nil, false + } + return o.Nodepools, true +} + +// SetNodepools sets field value +func (o *CreateOrUpdateClusterPayload) SetNodepools(v []Nodepool) { + o.Nodepools = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateOrUpdateClusterPayload) GetStatus() ClusterStatus { + if o == nil || IsNil(o.Status) { + var ret ClusterStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrUpdateClusterPayload) GetStatusOk() (*ClusterStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateOrUpdateClusterPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given ClusterStatus and assigns it to the Status field. +func (o *CreateOrUpdateClusterPayload) SetStatus(v ClusterStatus) { + o.Status = &v +} + +func (o CreateOrUpdateClusterPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateOrUpdateClusterPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + if !IsNil(o.Hibernation) { + toSerialize["hibernation"] = o.Hibernation + } + toSerialize["kubernetes"] = o.Kubernetes + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + toSerialize["nodepools"] = o.Nodepools + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +func (o *CreateOrUpdateClusterPayload) 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{ + "kubernetes", + "nodepools", + } + + 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) + } + } + + varCreateOrUpdateClusterPayload := _CreateOrUpdateClusterPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateOrUpdateClusterPayload) + + if err != nil { + return err + } + + *o = CreateOrUpdateClusterPayload(varCreateOrUpdateClusterPayload) + + return err +} + +type NullableCreateOrUpdateClusterPayload struct { + value *CreateOrUpdateClusterPayload + isSet bool +} + +func (v NullableCreateOrUpdateClusterPayload) Get() *CreateOrUpdateClusterPayload { + return v.value +} + +func (v *NullableCreateOrUpdateClusterPayload) Set(val *CreateOrUpdateClusterPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOrUpdateClusterPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOrUpdateClusterPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOrUpdateClusterPayload(val *CreateOrUpdateClusterPayload) *NullableCreateOrUpdateClusterPayload { + return &NullableCreateOrUpdateClusterPayload{value: val, isSet: true} +} + +func (v NullableCreateOrUpdateClusterPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOrUpdateClusterPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_credentials_rotation_state.go b/services/ske/v2api/model_credentials_rotation_state.go new file mode 100644 index 000000000..f72fb3d8c --- /dev/null +++ b/services/ske/v2api/model_credentials_rotation_state.go @@ -0,0 +1,200 @@ +/* +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" + "time" +) + +// checks if the CredentialsRotationState type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsRotationState{} + +// CredentialsRotationState struct for CredentialsRotationState +type CredentialsRotationState struct { + // Format: `2024-02-15T11:06:29Z` + LastCompletionTime *time.Time `json:"lastCompletionTime,omitempty"` + // Format: `2024-02-15T11:06:29Z` + LastInitiationTime *time.Time `json:"lastInitiationTime,omitempty"` + // Phase of the credentials rotation. `NEVER` indicates that no credentials rotation has been performed using the new credentials rotation endpoints yet. + Phase *string `json:"phase,omitempty"` +} + +// NewCredentialsRotationState instantiates a new CredentialsRotationState 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 NewCredentialsRotationState() *CredentialsRotationState { + this := CredentialsRotationState{} + return &this +} + +// NewCredentialsRotationStateWithDefaults instantiates a new CredentialsRotationState 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 NewCredentialsRotationStateWithDefaults() *CredentialsRotationState { + this := CredentialsRotationState{} + return &this +} + +// GetLastCompletionTime returns the LastCompletionTime field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetLastCompletionTime() time.Time { + if o == nil || IsNil(o.LastCompletionTime) { + var ret time.Time + return ret + } + return *o.LastCompletionTime +} + +// GetLastCompletionTimeOk returns a tuple with the LastCompletionTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetLastCompletionTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastCompletionTime) { + return nil, false + } + return o.LastCompletionTime, true +} + +// HasLastCompletionTime returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasLastCompletionTime() bool { + if o != nil && !IsNil(o.LastCompletionTime) { + return true + } + + return false +} + +// SetLastCompletionTime gets a reference to the given time.Time and assigns it to the LastCompletionTime field. +func (o *CredentialsRotationState) SetLastCompletionTime(v time.Time) { + o.LastCompletionTime = &v +} + +// GetLastInitiationTime returns the LastInitiationTime field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetLastInitiationTime() time.Time { + if o == nil || IsNil(o.LastInitiationTime) { + var ret time.Time + return ret + } + return *o.LastInitiationTime +} + +// GetLastInitiationTimeOk returns a tuple with the LastInitiationTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetLastInitiationTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastInitiationTime) { + return nil, false + } + return o.LastInitiationTime, true +} + +// HasLastInitiationTime returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasLastInitiationTime() bool { + if o != nil && !IsNil(o.LastInitiationTime) { + return true + } + + return false +} + +// SetLastInitiationTime gets a reference to the given time.Time and assigns it to the LastInitiationTime field. +func (o *CredentialsRotationState) SetLastInitiationTime(v time.Time) { + o.LastInitiationTime = &v +} + +// GetPhase returns the Phase field value if set, zero value otherwise. +func (o *CredentialsRotationState) GetPhase() string { + if o == nil || IsNil(o.Phase) { + var ret string + return ret + } + return *o.Phase +} + +// GetPhaseOk returns a tuple with the Phase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialsRotationState) GetPhaseOk() (*string, bool) { + if o == nil || IsNil(o.Phase) { + return nil, false + } + return o.Phase, true +} + +// HasPhase returns a boolean if a field has been set. +func (o *CredentialsRotationState) HasPhase() bool { + if o != nil && !IsNil(o.Phase) { + return true + } + + return false +} + +// SetPhase gets a reference to the given string and assigns it to the Phase field. +func (o *CredentialsRotationState) SetPhase(v string) { + o.Phase = &v +} + +func (o CredentialsRotationState) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialsRotationState) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LastCompletionTime) { + toSerialize["lastCompletionTime"] = o.LastCompletionTime + } + if !IsNil(o.LastInitiationTime) { + toSerialize["lastInitiationTime"] = o.LastInitiationTime + } + if !IsNil(o.Phase) { + toSerialize["phase"] = o.Phase + } + return toSerialize, nil +} + +type NullableCredentialsRotationState struct { + value *CredentialsRotationState + isSet bool +} + +func (v NullableCredentialsRotationState) Get() *CredentialsRotationState { + return v.value +} + +func (v *NullableCredentialsRotationState) Set(val *CredentialsRotationState) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsRotationState) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsRotationState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsRotationState(val *CredentialsRotationState) *NullableCredentialsRotationState { + return &NullableCredentialsRotationState{value: val, isSet: true} +} + +func (v NullableCredentialsRotationState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsRotationState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_cri.go b/services/ske/v2api/model_cri.go new file mode 100644 index 000000000..7845adeb8 --- /dev/null +++ b/services/ske/v2api/model_cri.go @@ -0,0 +1,124 @@ +/* +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 CRI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CRI{} + +// CRI struct for CRI +type CRI struct { + Name *string `json:"name,omitempty"` +} + +// NewCRI instantiates a new CRI 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 NewCRI() *CRI { + this := CRI{} + return &this +} + +// NewCRIWithDefaults instantiates a new CRI 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 NewCRIWithDefaults() *CRI { + this := CRI{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CRI) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *CRI) GetNameOk() (*string, 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 *CRI) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CRI) SetName(v string) { + o.Name = &v +} + +func (o CRI) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CRI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableCRI struct { + value *CRI + isSet bool +} + +func (v NullableCRI) Get() *CRI { + return v.value +} + +func (v *NullableCRI) Set(val *CRI) { + v.value = val + v.isSet = true +} + +func (v NullableCRI) IsSet() bool { + return v.isSet +} + +func (v *NullableCRI) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCRI(val *CRI) *NullableCRI { + return &NullableCRI{value: val, isSet: true} +} + +func (v NullableCRI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCRI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_dns.go b/services/ske/v2api/model_dns.go new file mode 100644 index 000000000..ae12d7dc2 --- /dev/null +++ b/services/ske/v2api/model_dns.go @@ -0,0 +1,194 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DNS type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DNS{} + +// DNS struct for DNS +type DNS struct { + // Enables the dns extension. + Enabled bool `json:"enabled"` + // Array of domain filters for externalDNS, e.g., *.runs.onstackit.cloud. + Zones []string `json:"zones,omitempty"` +} + +type _DNS DNS + +// NewDNS instantiates a new DNS 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 NewDNS(enabled bool) *DNS { + this := DNS{} + this.Enabled = enabled + return &this +} + +// NewDNSWithDefaults instantiates a new DNS 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 NewDNSWithDefaults() *DNS { + this := DNS{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *DNS) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *DNS) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *DNS) SetEnabled(v bool) { + o.Enabled = v +} + +// GetZones returns the Zones field value if set, zero value otherwise. +func (o *DNS) GetZones() []string { + if o == nil || IsNil(o.Zones) { + var ret []string + return ret + } + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DNS) GetZonesOk() ([]string, bool) { + if o == nil || IsNil(o.Zones) { + return nil, false + } + return o.Zones, true +} + +// HasZones returns a boolean if a field has been set. +func (o *DNS) HasZones() bool { + if o != nil && !IsNil(o.Zones) { + return true + } + + return false +} + +// SetZones gets a reference to the given []string and assigns it to the Zones field. +func (o *DNS) SetZones(v []string) { + o.Zones = v +} + +func (o DNS) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DNS) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Zones) { + toSerialize["zones"] = o.Zones + } + return toSerialize, nil +} + +func (o *DNS) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDNS := _DNS{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDNS) + + if err != nil { + return err + } + + *o = DNS(varDNS) + + return err +} + +type NullableDNS struct { + value *DNS + isSet bool +} + +func (v NullableDNS) Get() *DNS { + return v.value +} + +func (v *NullableDNS) Set(val *DNS) { + v.value = val + v.isSet = true +} + +func (v NullableDNS) IsSet() bool { + return v.isSet +} + +func (v *NullableDNS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDNS(val *DNS) *NullableDNS { + return &NullableDNS{value: val, isSet: true} +} + +func (v NullableDNS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDNS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_extension.go b/services/ske/v2api/model_extension.go new file mode 100644 index 000000000..7721c5a2a --- /dev/null +++ b/services/ske/v2api/model_extension.go @@ -0,0 +1,196 @@ +/* +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 Extension type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Extension{} + +// Extension struct for Extension +type Extension struct { + Acl *ACL `json:"acl,omitempty"` + Dns *DNS `json:"dns,omitempty"` + Observability *Observability `json:"observability,omitempty"` +} + +// NewExtension instantiates a new Extension 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 NewExtension() *Extension { + this := Extension{} + return &this +} + +// NewExtensionWithDefaults instantiates a new Extension 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 NewExtensionWithDefaults() *Extension { + this := Extension{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Extension) GetAcl() ACL { + if o == nil || IsNil(o.Acl) { + var ret ACL + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Extension) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Extension) SetAcl(v ACL) { + o.Acl = &v +} + +// GetDns returns the Dns field value if set, zero value otherwise. +func (o *Extension) GetDns() DNS { + if o == nil || IsNil(o.Dns) { + var ret DNS + return ret + } + return *o.Dns +} + +// GetDnsOk returns a tuple with the Dns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetDnsOk() (*DNS, bool) { + if o == nil || IsNil(o.Dns) { + return nil, false + } + return o.Dns, true +} + +// HasDns returns a boolean if a field has been set. +func (o *Extension) HasDns() bool { + if o != nil && !IsNil(o.Dns) { + return true + } + + return false +} + +// SetDns gets a reference to the given DNS and assigns it to the Dns field. +func (o *Extension) SetDns(v DNS) { + o.Dns = &v +} + +// GetObservability returns the Observability field value if set, zero value otherwise. +func (o *Extension) GetObservability() Observability { + if o == nil || IsNil(o.Observability) { + var ret Observability + return ret + } + return *o.Observability +} + +// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Extension) GetObservabilityOk() (*Observability, bool) { + if o == nil || IsNil(o.Observability) { + return nil, false + } + return o.Observability, true +} + +// HasObservability returns a boolean if a field has been set. +func (o *Extension) HasObservability() bool { + if o != nil && !IsNil(o.Observability) { + return true + } + + return false +} + +// SetObservability gets a reference to the given Observability and assigns it to the Observability field. +func (o *Extension) SetObservability(v Observability) { + o.Observability = &v +} + +func (o Extension) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Extension) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.Dns) { + toSerialize["dns"] = o.Dns + } + if !IsNil(o.Observability) { + toSerialize["observability"] = o.Observability + } + return toSerialize, nil +} + +type NullableExtension struct { + value *Extension + isSet bool +} + +func (v NullableExtension) Get() *Extension { + return v.value +} + +func (v *NullableExtension) Set(val *Extension) { + v.value = val + v.isSet = true +} + +func (v NullableExtension) IsSet() bool { + return v.isSet +} + +func (v *NullableExtension) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtension(val *Extension) *NullableExtension { + return &NullableExtension{value: val, isSet: true} +} + +func (v NullableExtension) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtension) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_get_provider_options_request_version_state.go b/services/ske/v2api/model_get_provider_options_request_version_state.go new file mode 100644 index 000000000..eaade1e1c --- /dev/null +++ b/services/ske/v2api/model_get_provider_options_request_version_state.go @@ -0,0 +1,108 @@ +/* +STACKIT Kubernetes Engine API + +The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "fmt" +) + +// GetProviderOptionsRequestVersionState the model 'GetProviderOptionsRequestVersionState' +type GetProviderOptionsRequestVersionState string + +// List of GetProviderOptionsRequestVersionState +const ( + GETPROVIDEROPTIONSREQUESTVERSIONSTATE_SUPPORTED GetProviderOptionsRequestVersionState = "SUPPORTED" +) + +// All allowed values of GetProviderOptionsRequestVersionState enum +var AllowedGetProviderOptionsRequestVersionStateEnumValues = []GetProviderOptionsRequestVersionState{ + "SUPPORTED", +} + +func (v *GetProviderOptionsRequestVersionState) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := GetProviderOptionsRequestVersionState(value) + for _, existing := range AllowedGetProviderOptionsRequestVersionStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid GetProviderOptionsRequestVersionState", value) +} + +// NewGetProviderOptionsRequestVersionStateFromValue returns a pointer to a valid GetProviderOptionsRequestVersionState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewGetProviderOptionsRequestVersionStateFromValue(v string) (*GetProviderOptionsRequestVersionState, error) { + ev := GetProviderOptionsRequestVersionState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for GetProviderOptionsRequestVersionState: valid values are %v", v, AllowedGetProviderOptionsRequestVersionStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v GetProviderOptionsRequestVersionState) IsValid() bool { + for _, existing := range AllowedGetProviderOptionsRequestVersionStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to GetProviderOptionsRequestVersionState value +func (v GetProviderOptionsRequestVersionState) Ptr() *GetProviderOptionsRequestVersionState { + return &v +} + +type NullableGetProviderOptionsRequestVersionState struct { + value *GetProviderOptionsRequestVersionState + isSet bool +} + +func (v NullableGetProviderOptionsRequestVersionState) Get() *GetProviderOptionsRequestVersionState { + return v.value +} + +func (v *NullableGetProviderOptionsRequestVersionState) Set(val *GetProviderOptionsRequestVersionState) { + v.value = val + v.isSet = true +} + +func (v NullableGetProviderOptionsRequestVersionState) IsSet() bool { + return v.isSet +} + +func (v *NullableGetProviderOptionsRequestVersionState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetProviderOptionsRequestVersionState(val *GetProviderOptionsRequestVersionState) *NullableGetProviderOptionsRequestVersionState { + return &NullableGetProviderOptionsRequestVersionState{value: val, isSet: true} +} + +func (v NullableGetProviderOptionsRequestVersionState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetProviderOptionsRequestVersionState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_hibernation.go b/services/ske/v2api/model_hibernation.go new file mode 100644 index 000000000..8783c824f --- /dev/null +++ b/services/ske/v2api/model_hibernation.go @@ -0,0 +1,156 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Hibernation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Hibernation{} + +// Hibernation struct for Hibernation +type Hibernation struct { + Schedules []HibernationSchedule `json:"schedules"` +} + +type _Hibernation Hibernation + +// NewHibernation instantiates a new Hibernation 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 NewHibernation(schedules []HibernationSchedule) *Hibernation { + this := Hibernation{} + this.Schedules = schedules + return &this +} + +// NewHibernationWithDefaults instantiates a new Hibernation 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 NewHibernationWithDefaults() *Hibernation { + this := Hibernation{} + return &this +} + +// GetSchedules returns the Schedules field value +func (o *Hibernation) GetSchedules() []HibernationSchedule { + if o == nil { + var ret []HibernationSchedule + return ret + } + + return o.Schedules +} + +// GetSchedulesOk returns a tuple with the Schedules field value +// and a boolean to check if the value has been set. +func (o *Hibernation) GetSchedulesOk() ([]HibernationSchedule, bool) { + if o == nil { + return nil, false + } + return o.Schedules, true +} + +// SetSchedules sets field value +func (o *Hibernation) SetSchedules(v []HibernationSchedule) { + o.Schedules = v +} + +func (o Hibernation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Hibernation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["schedules"] = o.Schedules + return toSerialize, nil +} + +func (o *Hibernation) 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{ + "schedules", + } + + 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) + } + } + + varHibernation := _Hibernation{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHibernation) + + if err != nil { + return err + } + + *o = Hibernation(varHibernation) + + return err +} + +type NullableHibernation struct { + value *Hibernation + isSet bool +} + +func (v NullableHibernation) Get() *Hibernation { + return v.value +} + +func (v *NullableHibernation) Set(val *Hibernation) { + v.value = val + v.isSet = true +} + +func (v NullableHibernation) IsSet() bool { + return v.isSet +} + +func (v *NullableHibernation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHibernation(val *Hibernation) *NullableHibernation { + return &NullableHibernation{value: val, isSet: true} +} + +func (v NullableHibernation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHibernation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_hibernation_schedule.go b/services/ske/v2api/model_hibernation_schedule.go new file mode 100644 index 000000000..7465f97c9 --- /dev/null +++ b/services/ske/v2api/model_hibernation_schedule.go @@ -0,0 +1,220 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HibernationSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HibernationSchedule{} + +// HibernationSchedule struct for HibernationSchedule +type HibernationSchedule struct { + End string `json:"end" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` + Start string `json:"start" validate:"regexp=(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\\\\\\\d+(ns|us|µs|ms|s|m|h))+)|((((\\\\\\\\d+,)+\\\\\\\\d+|(\\\\\\\\d+(\\\\\\/|-)\\\\\\\\d+)|\\\\\\\\d+|\\\\\\\\*) ?){5,7})"` + Timezone *string `json:"timezone,omitempty"` +} + +type _HibernationSchedule HibernationSchedule + +// NewHibernationSchedule instantiates a new HibernationSchedule 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 NewHibernationSchedule(end string, start string) *HibernationSchedule { + this := HibernationSchedule{} + this.End = end + this.Start = start + return &this +} + +// NewHibernationScheduleWithDefaults instantiates a new HibernationSchedule 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 NewHibernationScheduleWithDefaults() *HibernationSchedule { + this := HibernationSchedule{} + return &this +} + +// GetEnd returns the End field value +func (o *HibernationSchedule) GetEnd() string { + if o == nil { + var ret string + return ret + } + + return o.End +} + +// GetEndOk returns a tuple with the End field value +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetEndOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.End, true +} + +// SetEnd sets field value +func (o *HibernationSchedule) SetEnd(v string) { + o.End = v +} + +// GetStart returns the Start field value +func (o *HibernationSchedule) GetStart() string { + if o == nil { + var ret string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *HibernationSchedule) SetStart(v string) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *HibernationSchedule) GetTimezone() string { + if o == nil || IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HibernationSchedule) GetTimezoneOk() (*string, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *HibernationSchedule) HasTimezone() bool { + if o != nil && !IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *HibernationSchedule) SetTimezone(v string) { + o.Timezone = &v +} + +func (o HibernationSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HibernationSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["end"] = o.End + toSerialize["start"] = o.Start + if !IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + return toSerialize, nil +} + +func (o *HibernationSchedule) 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{ + "end", + "start", + } + + 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) + } + } + + varHibernationSchedule := _HibernationSchedule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHibernationSchedule) + + if err != nil { + return err + } + + *o = HibernationSchedule(varHibernationSchedule) + + return err +} + +type NullableHibernationSchedule struct { + value *HibernationSchedule + isSet bool +} + +func (v NullableHibernationSchedule) Get() *HibernationSchedule { + return v.value +} + +func (v *NullableHibernationSchedule) Set(val *HibernationSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableHibernationSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableHibernationSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHibernationSchedule(val *HibernationSchedule) *NullableHibernationSchedule { + return &NullableHibernationSchedule{value: val, isSet: true} +} + +func (v NullableHibernationSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHibernationSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_idp.go b/services/ske/v2api/model_idp.go new file mode 100644 index 000000000..520d24143 --- /dev/null +++ b/services/ske/v2api/model_idp.go @@ -0,0 +1,186 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the IDP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IDP{} + +// IDP struct for IDP +type IDP struct { + // Enable IDP integration for the cluster. + Enabled bool `json:"enabled"` + // Possible values: `\"stackit\"` + Type string `json:"type"` +} + +type _IDP IDP + +// NewIDP instantiates a new IDP 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 NewIDP(enabled bool, types string) *IDP { + this := IDP{} + this.Enabled = enabled + this.Type = types + return &this +} + +// NewIDPWithDefaults instantiates a new IDP 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 NewIDPWithDefaults() *IDP { + this := IDP{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *IDP) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *IDP) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *IDP) SetEnabled(v bool) { + o.Enabled = v +} + +// GetType returns the Type field value +func (o *IDP) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *IDP) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *IDP) SetType(v string) { + o.Type = v +} + +func (o IDP) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IDP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *IDP) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "type", + } + + 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) + } + } + + varIDP := _IDP{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIDP) + + if err != nil { + return err + } + + *o = IDP(varIDP) + + return err +} + +type NullableIDP struct { + value *IDP + isSet bool +} + +func (v NullableIDP) Get() *IDP { + return v.value +} + +func (v *NullableIDP) Set(val *IDP) { + v.value = val + v.isSet = true +} + +func (v NullableIDP) IsSet() bool { + return v.isSet +} + +func (v *NullableIDP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIDP(val *IDP) *NullableIDP { + return &NullableIDP{value: val, isSet: true} +} + +func (v NullableIDP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIDP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_image.go b/services/ske/v2api/model_image.go new file mode 100644 index 000000000..05ec8b6f0 --- /dev/null +++ b/services/ske/v2api/model_image.go @@ -0,0 +1,184 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Image type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Image{} + +// Image For valid names and versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `machineImages`. +type Image struct { + Name string `json:"name"` + Version string `json:"version"` +} + +type _Image Image + +// NewImage instantiates a new Image 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 NewImage(name string, version string) *Image { + this := Image{} + this.Name = name + this.Version = version + return &this +} + +// NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image { + this := Image{} + return &this +} + +// GetName returns the Name field value +func (o *Image) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Image) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Image) SetName(v string) { + o.Name = v +} + +// GetVersion returns the Version field value +func (o *Image) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Image) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Image) SetVersion(v string) { + o.Version = v +} + +func (o Image) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Image) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *Image) 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{ + "name", + "version", + } + + 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) + } + } + + varImage := _Image{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImage) + + if err != nil { + return err + } + + *o = Image(varImage) + + return err +} + +type NullableImage struct { + value *Image + isSet bool +} + +func (v NullableImage) Get() *Image { + return v.value +} + +func (v *NullableImage) Set(val *Image) { + v.value = val + v.isSet = true +} + +func (v NullableImage) IsSet() bool { + return v.isSet +} + +func (v *NullableImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImage(val *Image) *NullableImage { + return &NullableImage{value: val, isSet: true} +} + +func (v NullableImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_kubeconfig.go b/services/ske/v2api/model_kubeconfig.go new file mode 100644 index 000000000..5c9559977 --- /dev/null +++ b/services/ske/v2api/model_kubeconfig.go @@ -0,0 +1,161 @@ +/* +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" + "time" +) + +// checks if the Kubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubeconfig{} + +// Kubeconfig struct for Kubeconfig +type Kubeconfig struct { + ExpirationTimestamp *time.Time `json:"expirationTimestamp,omitempty"` + Kubeconfig *string `json:"kubeconfig,omitempty"` +} + +// NewKubeconfig instantiates a new Kubeconfig 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 NewKubeconfig() *Kubeconfig { + this := Kubeconfig{} + return &this +} + +// NewKubeconfigWithDefaults instantiates a new Kubeconfig 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 NewKubeconfigWithDefaults() *Kubeconfig { + this := Kubeconfig{} + return &this +} + +// GetExpirationTimestamp returns the ExpirationTimestamp field value if set, zero value otherwise. +func (o *Kubeconfig) GetExpirationTimestamp() time.Time { + if o == nil || IsNil(o.ExpirationTimestamp) { + var ret time.Time + return ret + } + return *o.ExpirationTimestamp +} + +// GetExpirationTimestampOk returns a tuple with the ExpirationTimestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetExpirationTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationTimestamp) { + return nil, false + } + return o.ExpirationTimestamp, true +} + +// HasExpirationTimestamp returns a boolean if a field has been set. +func (o *Kubeconfig) HasExpirationTimestamp() bool { + if o != nil && !IsNil(o.ExpirationTimestamp) { + return true + } + + return false +} + +// SetExpirationTimestamp gets a reference to the given time.Time and assigns it to the ExpirationTimestamp field. +func (o *Kubeconfig) SetExpirationTimestamp(v time.Time) { + o.ExpirationTimestamp = &v +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *Kubeconfig) GetKubeconfig() string { + if o == nil || IsNil(o.Kubeconfig) { + var ret string + return ret + } + return *o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *Kubeconfig) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *Kubeconfig) SetKubeconfig(v string) { + o.Kubeconfig = &v +} + +func (o Kubeconfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Kubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationTimestamp) { + toSerialize["expirationTimestamp"] = o.ExpirationTimestamp + } + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + return toSerialize, nil +} + +type NullableKubeconfig struct { + value *Kubeconfig + isSet bool +} + +func (v NullableKubeconfig) Get() *Kubeconfig { + return v.value +} + +func (v *NullableKubeconfig) Set(val *Kubeconfig) { + v.value = val + v.isSet = true +} + +func (v NullableKubeconfig) IsSet() bool { + return v.isSet +} + +func (v *NullableKubeconfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubeconfig(val *Kubeconfig) *NullableKubeconfig { + return &NullableKubeconfig{value: val, isSet: true} +} + +func (v NullableKubeconfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_kubernetes.go b/services/ske/v2api/model_kubernetes.go new file mode 100644 index 000000000..b66190d1e --- /dev/null +++ b/services/ske/v2api/model_kubernetes.go @@ -0,0 +1,156 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Kubernetes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubernetes{} + +// Kubernetes For valid versions please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `kubernetesVersions`. +type Kubernetes struct { + Version string `json:"version" validate:"regexp=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +type _Kubernetes Kubernetes + +// NewKubernetes instantiates a new Kubernetes 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 NewKubernetes(version string) *Kubernetes { + this := Kubernetes{} + this.Version = version + return &this +} + +// NewKubernetesWithDefaults instantiates a new Kubernetes 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 NewKubernetesWithDefaults() *Kubernetes { + this := Kubernetes{} + return &this +} + +// GetVersion returns the Version field value +func (o *Kubernetes) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Kubernetes) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Kubernetes) SetVersion(v string) { + o.Version = v +} + +func (o Kubernetes) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Kubernetes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *Kubernetes) 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{ + "version", + } + + 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) + } + } + + varKubernetes := _Kubernetes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKubernetes) + + if err != nil { + return err + } + + *o = Kubernetes(varKubernetes) + + return err +} + +type NullableKubernetes struct { + value *Kubernetes + isSet bool +} + +func (v NullableKubernetes) Get() *Kubernetes { + return v.value +} + +func (v *NullableKubernetes) Set(val *Kubernetes) { + v.value = val + v.isSet = true +} + +func (v NullableKubernetes) IsSet() bool { + return v.isSet +} + +func (v *NullableKubernetes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubernetes(val *Kubernetes) *NullableKubernetes { + return &NullableKubernetes{value: val, isSet: true} +} + +func (v NullableKubernetes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubernetes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_kubernetes_version.go b/services/ske/v2api/model_kubernetes_version.go new file mode 100644 index 000000000..6b5b1f301 --- /dev/null +++ b/services/ske/v2api/model_kubernetes_version.go @@ -0,0 +1,233 @@ +/* +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" + "time" +) + +// checks if the KubernetesVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KubernetesVersion{} + +// KubernetesVersion struct for KubernetesVersion +type KubernetesVersion struct { + ExpirationDate *time.Time `json:"expirationDate,omitempty"` + FeatureGates *map[string]string `json:"featureGates,omitempty"` + State *string `json:"state,omitempty"` + Version *string `json:"version,omitempty" validate:"regexp=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +// NewKubernetesVersion instantiates a new KubernetesVersion 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 NewKubernetesVersion() *KubernetesVersion { + this := KubernetesVersion{} + return &this +} + +// NewKubernetesVersionWithDefaults instantiates a new KubernetesVersion 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 NewKubernetesVersionWithDefaults() *KubernetesVersion { + this := KubernetesVersion{} + return &this +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *KubernetesVersion) GetExpirationDate() time.Time { + if o == nil || IsNil(o.ExpirationDate) { + var ret time.Time + return ret + } + return *o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetExpirationDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *KubernetesVersion) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +func (o *KubernetesVersion) SetExpirationDate(v time.Time) { + o.ExpirationDate = &v +} + +// GetFeatureGates returns the FeatureGates field value if set, zero value otherwise. +func (o *KubernetesVersion) GetFeatureGates() map[string]string { + if o == nil || IsNil(o.FeatureGates) { + var ret map[string]string + return ret + } + return *o.FeatureGates +} + +// GetFeatureGatesOk returns a tuple with the FeatureGates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetFeatureGatesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.FeatureGates) { + return nil, false + } + return o.FeatureGates, true +} + +// HasFeatureGates returns a boolean if a field has been set. +func (o *KubernetesVersion) HasFeatureGates() bool { + if o != nil && !IsNil(o.FeatureGates) { + return true + } + + return false +} + +// SetFeatureGates gets a reference to the given map[string]string and assigns it to the FeatureGates field. +func (o *KubernetesVersion) SetFeatureGates(v map[string]string) { + o.FeatureGates = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *KubernetesVersion) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *KubernetesVersion) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *KubernetesVersion) SetState(v string) { + o.State = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *KubernetesVersion) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KubernetesVersion) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *KubernetesVersion) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *KubernetesVersion) SetVersion(v string) { + o.Version = &v +} + +func (o KubernetesVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KubernetesVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpirationDate) { + toSerialize["expirationDate"] = o.ExpirationDate + } + if !IsNil(o.FeatureGates) { + toSerialize["featureGates"] = o.FeatureGates + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableKubernetesVersion struct { + value *KubernetesVersion + isSet bool +} + +func (v NullableKubernetesVersion) Get() *KubernetesVersion { + return v.value +} + +func (v *NullableKubernetesVersion) Set(val *KubernetesVersion) { + v.value = val + v.isSet = true +} + +func (v NullableKubernetesVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableKubernetesVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKubernetesVersion(val *KubernetesVersion) *NullableKubernetesVersion { + return &NullableKubernetesVersion{value: val, isSet: true} +} + +func (v NullableKubernetesVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKubernetesVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_list_clusters_response.go b/services/ske/v2api/model_list_clusters_response.go new file mode 100644 index 000000000..0b1a0822d --- /dev/null +++ b/services/ske/v2api/model_list_clusters_response.go @@ -0,0 +1,124 @@ +/* +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 ListClustersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListClustersResponse{} + +// ListClustersResponse struct for ListClustersResponse +type ListClustersResponse struct { + Items []Cluster `json:"items,omitempty"` +} + +// NewListClustersResponse instantiates a new ListClustersResponse 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 NewListClustersResponse() *ListClustersResponse { + this := ListClustersResponse{} + return &this +} + +// NewListClustersResponseWithDefaults instantiates a new ListClustersResponse 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 NewListClustersResponseWithDefaults() *ListClustersResponse { + this := ListClustersResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListClustersResponse) GetItems() []Cluster { + if o == nil || IsNil(o.Items) { + var ret []Cluster + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListClustersResponse) GetItemsOk() ([]Cluster, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListClustersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Cluster and assigns it to the Items field. +func (o *ListClustersResponse) SetItems(v []Cluster) { + o.Items = v +} + +func (o ListClustersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListClustersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListClustersResponse struct { + value *ListClustersResponse + isSet bool +} + +func (v NullableListClustersResponse) Get() *ListClustersResponse { + return v.value +} + +func (v *NullableListClustersResponse) Set(val *ListClustersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListClustersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListClustersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListClustersResponse(val *ListClustersResponse) *NullableListClustersResponse { + return &NullableListClustersResponse{value: val, isSet: true} +} + +func (v NullableListClustersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListClustersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_login_kubeconfig.go b/services/ske/v2api/model_login_kubeconfig.go new file mode 100644 index 000000000..3f2ef4d32 --- /dev/null +++ b/services/ske/v2api/model_login_kubeconfig.go @@ -0,0 +1,124 @@ +/* +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 LoginKubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoginKubeconfig{} + +// LoginKubeconfig struct for LoginKubeconfig +type LoginKubeconfig struct { + Kubeconfig *string `json:"kubeconfig,omitempty"` +} + +// NewLoginKubeconfig instantiates a new LoginKubeconfig 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 NewLoginKubeconfig() *LoginKubeconfig { + this := LoginKubeconfig{} + return &this +} + +// NewLoginKubeconfigWithDefaults instantiates a new LoginKubeconfig 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 NewLoginKubeconfigWithDefaults() *LoginKubeconfig { + this := LoginKubeconfig{} + return &this +} + +// GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. +func (o *LoginKubeconfig) GetKubeconfig() string { + if o == nil || IsNil(o.Kubeconfig) { + var ret string + return ret + } + return *o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoginKubeconfig) GetKubeconfigOk() (*string, bool) { + if o == nil || IsNil(o.Kubeconfig) { + return nil, false + } + return o.Kubeconfig, true +} + +// HasKubeconfig returns a boolean if a field has been set. +func (o *LoginKubeconfig) HasKubeconfig() bool { + if o != nil && !IsNil(o.Kubeconfig) { + return true + } + + return false +} + +// SetKubeconfig gets a reference to the given string and assigns it to the Kubeconfig field. +func (o *LoginKubeconfig) SetKubeconfig(v string) { + o.Kubeconfig = &v +} + +func (o LoginKubeconfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoginKubeconfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Kubeconfig) { + toSerialize["kubeconfig"] = o.Kubeconfig + } + return toSerialize, nil +} + +type NullableLoginKubeconfig struct { + value *LoginKubeconfig + isSet bool +} + +func (v NullableLoginKubeconfig) Get() *LoginKubeconfig { + return v.value +} + +func (v *NullableLoginKubeconfig) Set(val *LoginKubeconfig) { + v.value = val + v.isSet = true +} + +func (v NullableLoginKubeconfig) IsSet() bool { + return v.isSet +} + +func (v *NullableLoginKubeconfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoginKubeconfig(val *LoginKubeconfig) *NullableLoginKubeconfig { + return &NullableLoginKubeconfig{value: val, isSet: true} +} + +func (v NullableLoginKubeconfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoginKubeconfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_machine.go b/services/ske/v2api/model_machine.go new file mode 100644 index 000000000..f094345b3 --- /dev/null +++ b/services/ske/v2api/model_machine.go @@ -0,0 +1,185 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Machine type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Machine{} + +// Machine struct for Machine +type Machine struct { + Image Image `json:"image"` + // For valid types please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `machineTypes`. + Type string `json:"type"` +} + +type _Machine Machine + +// NewMachine instantiates a new Machine 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 NewMachine(image Image, types string) *Machine { + this := Machine{} + this.Image = image + this.Type = types + return &this +} + +// NewMachineWithDefaults instantiates a new Machine 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 NewMachineWithDefaults() *Machine { + this := Machine{} + return &this +} + +// GetImage returns the Image field value +func (o *Machine) GetImage() Image { + if o == nil { + var ret Image + return ret + } + + return o.Image +} + +// GetImageOk returns a tuple with the Image field value +// and a boolean to check if the value has been set. +func (o *Machine) GetImageOk() (*Image, bool) { + if o == nil { + return nil, false + } + return &o.Image, true +} + +// SetImage sets field value +func (o *Machine) SetImage(v Image) { + o.Image = v +} + +// GetType returns the Type field value +func (o *Machine) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Machine) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Machine) SetType(v string) { + o.Type = v +} + +func (o Machine) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Machine) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["image"] = o.Image + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Machine) 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{ + "image", + "type", + } + + 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) + } + } + + varMachine := _Machine{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMachine) + + if err != nil { + return err + } + + *o = Machine(varMachine) + + return err +} + +type NullableMachine struct { + value *Machine + isSet bool +} + +func (v NullableMachine) Get() *Machine { + return v.value +} + +func (v *NullableMachine) Set(val *Machine) { + v.value = val + v.isSet = true +} + +func (v NullableMachine) IsSet() bool { + return v.isSet +} + +func (v *NullableMachine) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachine(val *Machine) *NullableMachine { + return &NullableMachine{value: val, isSet: true} +} + +func (v NullableMachine) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachine) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_machine_image.go b/services/ske/v2api/model_machine_image.go new file mode 100644 index 000000000..bde606810 --- /dev/null +++ b/services/ske/v2api/model_machine_image.go @@ -0,0 +1,160 @@ +/* +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 MachineImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineImage{} + +// MachineImage struct for MachineImage +type MachineImage struct { + Name *string `json:"name,omitempty"` + Versions []MachineImageVersion `json:"versions,omitempty"` +} + +// NewMachineImage instantiates a new MachineImage 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 NewMachineImage() *MachineImage { + this := MachineImage{} + return &this +} + +// NewMachineImageWithDefaults instantiates a new MachineImage 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 NewMachineImageWithDefaults() *MachineImage { + this := MachineImage{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineImage) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *MachineImage) GetNameOk() (*string, 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 *MachineImage) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MachineImage) SetName(v string) { + o.Name = &v +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *MachineImage) GetVersions() []MachineImageVersion { + if o == nil || IsNil(o.Versions) { + var ret []MachineImageVersion + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImage) GetVersionsOk() ([]MachineImageVersion, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *MachineImage) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []MachineImageVersion and assigns it to the Versions field. +func (o *MachineImage) SetVersions(v []MachineImageVersion) { + o.Versions = v +} + +func (o MachineImage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableMachineImage struct { + value *MachineImage + isSet bool +} + +func (v NullableMachineImage) Get() *MachineImage { + return v.value +} + +func (v *NullableMachineImage) Set(val *MachineImage) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImage) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImage(val *MachineImage) *NullableMachineImage { + return &NullableMachineImage{value: val, isSet: true} +} + +func (v NullableMachineImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_machine_image_version.go b/services/ske/v2api/model_machine_image_version.go new file mode 100644 index 000000000..57796e044 --- /dev/null +++ b/services/ske/v2api/model_machine_image_version.go @@ -0,0 +1,233 @@ +/* +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" + "time" +) + +// checks if the MachineImageVersion type satisfies the MappedNullable interface at compile time +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=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +// NewMachineImageVersion instantiates a new MachineImageVersion 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 NewMachineImageVersion() *MachineImageVersion { + this := MachineImageVersion{} + return &this +} + +// NewMachineImageVersionWithDefaults instantiates a new MachineImageVersion 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 NewMachineImageVersionWithDefaults() *MachineImageVersion { + this := MachineImageVersion{} + return &this +} + +// GetCri returns the Cri field value if set, zero value otherwise. +func (o *MachineImageVersion) GetCri() []CRI { + if o == nil || IsNil(o.Cri) { + var ret []CRI + return ret + } + return o.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) { + if o == nil || IsNil(o.Cri) { + return nil, false + } + return o.Cri, true +} + +// HasCri returns a boolean if a field has been set. +func (o *MachineImageVersion) HasCri() bool { + if o != nil && !IsNil(o.Cri) { + return true + } + + return false +} + +// SetCri gets a reference to the given []CRI and assigns it to the Cri field. +func (o *MachineImageVersion) SetCri(v []CRI) { + o.Cri = v +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *MachineImageVersion) GetExpirationDate() time.Time { + if o == nil || IsNil(o.ExpirationDate) { + var ret time.Time + return ret + } + return *o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetExpirationDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *MachineImageVersion) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +func (o *MachineImageVersion) SetExpirationDate(v time.Time) { + o.ExpirationDate = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *MachineImageVersion) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *MachineImageVersion) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *MachineImageVersion) SetState(v string) { + o.State = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *MachineImageVersion) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineImageVersion) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *MachineImageVersion) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *MachineImageVersion) SetVersion(v string) { + o.Version = &v +} + +func (o MachineImageVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineImageVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cri) { + toSerialize["cri"] = o.Cri + } + if !IsNil(o.ExpirationDate) { + toSerialize["expirationDate"] = o.ExpirationDate + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableMachineImageVersion struct { + value *MachineImageVersion + isSet bool +} + +func (v NullableMachineImageVersion) Get() *MachineImageVersion { + return v.value +} + +func (v *NullableMachineImageVersion) Set(val *MachineImageVersion) { + v.value = val + v.isSet = true +} + +func (v NullableMachineImageVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineImageVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineImageVersion(val *MachineImageVersion) *NullableMachineImageVersion { + return &NullableMachineImageVersion{value: val, isSet: true} +} + +func (v NullableMachineImageVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineImageVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_machine_type.go b/services/ske/v2api/model_machine_type.go new file mode 100644 index 000000000..bad681fb2 --- /dev/null +++ b/services/ske/v2api/model_machine_type.go @@ -0,0 +1,268 @@ +/* +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 MachineType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MachineType{} + +// MachineType struct for MachineType +type MachineType struct { + Architecture *string `json:"architecture,omitempty"` + Cpu *int32 `json:"cpu,omitempty"` + Gpu *int32 `json:"gpu,omitempty"` + Memory *int32 `json:"memory,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewMachineType instantiates a new MachineType 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 NewMachineType() *MachineType { + this := MachineType{} + return &this +} + +// NewMachineTypeWithDefaults instantiates a new MachineType 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 NewMachineTypeWithDefaults() *MachineType { + this := MachineType{} + return &this +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *MachineType) GetArchitecture() string { + if o == nil || IsNil(o.Architecture) { + var ret string + return ret + } + return *o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *MachineType) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *MachineType) SetArchitecture(v string) { + o.Architecture = &v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *MachineType) GetCpu() int32 { + if o == nil || IsNil(o.Cpu) { + var ret int32 + return ret + } + return *o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetCpuOk() (*int32, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *MachineType) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int32 and assigns it to the Cpu field. +func (o *MachineType) SetCpu(v int32) { + o.Cpu = &v +} + +// GetGpu returns the Gpu field value if set, zero value otherwise. +func (o *MachineType) GetGpu() int32 { + if o == nil || IsNil(o.Gpu) { + var ret int32 + return ret + } + return *o.Gpu +} + +// GetGpuOk returns a tuple with the Gpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetGpuOk() (*int32, bool) { + if o == nil || IsNil(o.Gpu) { + return nil, false + } + return o.Gpu, true +} + +// HasGpu returns a boolean if a field has been set. +func (o *MachineType) HasGpu() bool { + if o != nil && !IsNil(o.Gpu) { + return true + } + + return false +} + +// SetGpu gets a reference to the given int32 and assigns it to the Gpu field. +func (o *MachineType) SetGpu(v int32) { + o.Gpu = &v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *MachineType) GetMemory() int32 { + if o == nil || IsNil(o.Memory) { + var ret int32 + return ret + } + return *o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MachineType) GetMemoryOk() (*int32, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *MachineType) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int32 and assigns it to the Memory field. +func (o *MachineType) SetMemory(v int32) { + o.Memory = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MachineType) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *MachineType) GetNameOk() (*string, 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 *MachineType) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MachineType) SetName(v string) { + o.Name = &v +} + +func (o MachineType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MachineType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Gpu) { + toSerialize["gpu"] = o.Gpu + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableMachineType struct { + value *MachineType + isSet bool +} + +func (v NullableMachineType) Get() *MachineType { + return v.value +} + +func (v *NullableMachineType) Set(val *MachineType) { + v.value = val + v.isSet = true +} + +func (v NullableMachineType) IsSet() bool { + return v.isSet +} + +func (v *NullableMachineType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMachineType(val *MachineType) *NullableMachineType { + return &NullableMachineType{value: val, isSet: true} +} + +func (v NullableMachineType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMachineType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_maintenance.go b/services/ske/v2api/model_maintenance.go new file mode 100644 index 000000000..817e63265 --- /dev/null +++ b/services/ske/v2api/model_maintenance.go @@ -0,0 +1,184 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Maintenance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Maintenance{} + +// Maintenance struct for Maintenance +type Maintenance struct { + AutoUpdate MaintenanceAutoUpdate `json:"autoUpdate"` + TimeWindow TimeWindow `json:"timeWindow"` +} + +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 +func NewMaintenance(autoUpdate MaintenanceAutoUpdate, timeWindow TimeWindow) *Maintenance { + this := Maintenance{} + this.AutoUpdate = autoUpdate + this.TimeWindow = timeWindow + return &this +} + +// NewMaintenanceWithDefaults instantiates a new Maintenance 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 NewMaintenanceWithDefaults() *Maintenance { + this := Maintenance{} + return &this +} + +// GetAutoUpdate returns the AutoUpdate field value +func (o *Maintenance) GetAutoUpdate() MaintenanceAutoUpdate { + if o == nil { + var ret MaintenanceAutoUpdate + return ret + } + + return o.AutoUpdate +} + +// GetAutoUpdateOk returns a tuple with the AutoUpdate field value +// and a boolean to check if the value has been set. +func (o *Maintenance) GetAutoUpdateOk() (*MaintenanceAutoUpdate, bool) { + if o == nil { + return nil, false + } + return &o.AutoUpdate, true +} + +// SetAutoUpdate sets field value +func (o *Maintenance) SetAutoUpdate(v MaintenanceAutoUpdate) { + o.AutoUpdate = v +} + +// GetTimeWindow returns the TimeWindow field value +func (o *Maintenance) GetTimeWindow() TimeWindow { + if o == nil { + var ret TimeWindow + return ret + } + + return o.TimeWindow +} + +// GetTimeWindowOk returns a tuple with the TimeWindow field value +// and a boolean to check if the value has been set. +func (o *Maintenance) GetTimeWindowOk() (*TimeWindow, bool) { + if o == nil { + return nil, false + } + return &o.TimeWindow, true +} + +// SetTimeWindow sets field value +func (o *Maintenance) SetTimeWindow(v TimeWindow) { + o.TimeWindow = v +} + +func (o Maintenance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Maintenance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["autoUpdate"] = o.AutoUpdate + toSerialize["timeWindow"] = o.TimeWindow + return toSerialize, nil +} + +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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMaintenance) + + if err != nil { + return err + } + + *o = Maintenance(varMaintenance) + + return err +} + +type NullableMaintenance struct { + value *Maintenance + isSet bool +} + +func (v NullableMaintenance) Get() *Maintenance { + return v.value +} + +func (v *NullableMaintenance) Set(val *Maintenance) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenance) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenance(val *Maintenance) *NullableMaintenance { + return &NullableMaintenance{value: val, isSet: true} +} + +func (v NullableMaintenance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_maintenance_auto_update.go b/services/ske/v2api/model_maintenance_auto_update.go new file mode 100644 index 000000000..955fa0002 --- /dev/null +++ b/services/ske/v2api/model_maintenance_auto_update.go @@ -0,0 +1,160 @@ +/* +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 MaintenanceAutoUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceAutoUpdate{} + +// MaintenanceAutoUpdate struct for MaintenanceAutoUpdate +type MaintenanceAutoUpdate struct { + KubernetesVersion *bool `json:"kubernetesVersion,omitempty"` + MachineImageVersion *bool `json:"machineImageVersion,omitempty"` +} + +// NewMaintenanceAutoUpdate instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdate() *MaintenanceAutoUpdate { + this := MaintenanceAutoUpdate{} + return &this +} + +// NewMaintenanceAutoUpdateWithDefaults instantiates a new MaintenanceAutoUpdate 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 NewMaintenanceAutoUpdateWithDefaults() *MaintenanceAutoUpdate { + this := MaintenanceAutoUpdate{} + return &this +} + +// GetKubernetesVersion returns the KubernetesVersion field value if set, zero value otherwise. +func (o *MaintenanceAutoUpdate) GetKubernetesVersion() bool { + if o == nil || IsNil(o.KubernetesVersion) { + var ret bool + return ret + } + return *o.KubernetesVersion +} + +// GetKubernetesVersionOk returns a tuple with the KubernetesVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceAutoUpdate) GetKubernetesVersionOk() (*bool, bool) { + if o == nil || IsNil(o.KubernetesVersion) { + return nil, false + } + return o.KubernetesVersion, true +} + +// HasKubernetesVersion returns a boolean if a field has been set. +func (o *MaintenanceAutoUpdate) HasKubernetesVersion() bool { + if o != nil && !IsNil(o.KubernetesVersion) { + return true + } + + return false +} + +// SetKubernetesVersion gets a reference to the given bool and assigns it to the KubernetesVersion field. +func (o *MaintenanceAutoUpdate) SetKubernetesVersion(v bool) { + o.KubernetesVersion = &v +} + +// GetMachineImageVersion returns the MachineImageVersion field value if set, zero value otherwise. +func (o *MaintenanceAutoUpdate) GetMachineImageVersion() bool { + if o == nil || IsNil(o.MachineImageVersion) { + var ret bool + return ret + } + return *o.MachineImageVersion +} + +// GetMachineImageVersionOk returns a tuple with the MachineImageVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceAutoUpdate) GetMachineImageVersionOk() (*bool, bool) { + if o == nil || IsNil(o.MachineImageVersion) { + return nil, false + } + return o.MachineImageVersion, true +} + +// HasMachineImageVersion returns a boolean if a field has been set. +func (o *MaintenanceAutoUpdate) HasMachineImageVersion() bool { + if o != nil && !IsNil(o.MachineImageVersion) { + return true + } + + return false +} + +// SetMachineImageVersion gets a reference to the given bool and assigns it to the MachineImageVersion field. +func (o *MaintenanceAutoUpdate) SetMachineImageVersion(v bool) { + o.MachineImageVersion = &v +} + +func (o MaintenanceAutoUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceAutoUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.KubernetesVersion) { + toSerialize["kubernetesVersion"] = o.KubernetesVersion + } + if !IsNil(o.MachineImageVersion) { + toSerialize["machineImageVersion"] = o.MachineImageVersion + } + return toSerialize, nil +} + +type NullableMaintenanceAutoUpdate struct { + value *MaintenanceAutoUpdate + isSet bool +} + +func (v NullableMaintenanceAutoUpdate) Get() *MaintenanceAutoUpdate { + return v.value +} + +func (v *NullableMaintenanceAutoUpdate) Set(val *MaintenanceAutoUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceAutoUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceAutoUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceAutoUpdate(val *MaintenanceAutoUpdate) *NullableMaintenanceAutoUpdate { + return &NullableMaintenanceAutoUpdate{value: val, isSet: true} +} + +func (v NullableMaintenanceAutoUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceAutoUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_network.go b/services/ske/v2api/model_network.go new file mode 100644 index 000000000..5abccd2a6 --- /dev/null +++ b/services/ske/v2api/model_network.go @@ -0,0 +1,160 @@ +/* +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 Network type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Network{} + +// Network struct for Network +type Network struct { + ControlPlane *V2ControlPlaneNetwork `json:"controlPlane,omitempty"` + Id *string `json:"id,omitempty"` +} + +// NewNetwork instantiates a new Network 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 NewNetwork() *Network { + this := Network{} + return &this +} + +// NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { + this := Network{} + return &this +} + +// GetControlPlane returns the ControlPlane field value if set, zero value otherwise. +func (o *Network) GetControlPlane() V2ControlPlaneNetwork { + if o == nil || IsNil(o.ControlPlane) { + var ret V2ControlPlaneNetwork + return ret + } + return *o.ControlPlane +} + +// GetControlPlaneOk returns a tuple with the ControlPlane field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetControlPlaneOk() (*V2ControlPlaneNetwork, bool) { + if o == nil || IsNil(o.ControlPlane) { + return nil, false + } + return o.ControlPlane, true +} + +// HasControlPlane returns a boolean if a field has been set. +func (o *Network) HasControlPlane() bool { + if o != nil && !IsNil(o.ControlPlane) { + return true + } + + return false +} + +// SetControlPlane gets a reference to the given V2ControlPlaneNetwork and assigns it to the ControlPlane field. +func (o *Network) SetControlPlane(v V2ControlPlaneNetwork) { + o.ControlPlane = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Network) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Network) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Network) SetId(v string) { + o.Id = &v +} + +func (o Network) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ControlPlane) { + toSerialize["controlPlane"] = o.ControlPlane + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableNetwork struct { + value *Network + isSet bool +} + +func (v NullableNetwork) Get() *Network { + return v.value +} + +func (v *NullableNetwork) Set(val *Network) { + v.value = val + v.isSet = true +} + +func (v NullableNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetwork(val *Network) *NullableNetwork { + return &NullableNetwork{value: val, isSet: true} +} + +func (v NullableNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_nodepool.go b/services/ske/v2api/model_nodepool.go new file mode 100644 index 000000000..e4390f615 --- /dev/null +++ b/services/ske/v2api/model_nodepool.go @@ -0,0 +1,552 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Nodepool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Nodepool{} + +// Nodepool struct for Nodepool +type Nodepool struct { + // This needs to be true for at least one node pool. + AllowSystemComponents *bool `json:"allowSystemComponents,omitempty"` + AvailabilityZones []string `json:"availabilityZones"` + Cri *CRI `json:"cri,omitempty"` + Kubernetes *NodepoolKubernetes `json:"kubernetes,omitempty"` + Labels *map[string]string `json:"labels,omitempty"` + Machine Machine `json:"machine"` + MaxSurge *int32 `json:"maxSurge,omitempty"` + MaxUnavailable *int32 `json:"maxUnavailable,omitempty"` + // Maximum number of nodes in the pool. During runtime, the cluster will never scale beyond 1000 nodes, even if the total maximum would allow for a larger cluster. + Maximum int32 `json:"maximum"` + // Minimum number of nodes in the pool. The sum of all minima must not exceed 1000. + Minimum int32 `json:"minimum"` + // Maximum 15 chars + Name string `json:"name"` + Taints []Taint `json:"taints,omitempty"` + Volume Volume `json:"volume"` +} + +type _Nodepool Nodepool + +// NewNodepool instantiates a new Nodepool 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 NewNodepool(availabilityZones []string, machine Machine, maximum int32, minimum int32, name string, volume Volume) *Nodepool { + this := Nodepool{} + this.AvailabilityZones = availabilityZones + this.Machine = machine + this.Maximum = maximum + this.Minimum = minimum + this.Name = name + this.Volume = volume + return &this +} + +// NewNodepoolWithDefaults instantiates a new Nodepool 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 NewNodepoolWithDefaults() *Nodepool { + this := Nodepool{} + return &this +} + +// GetAllowSystemComponents returns the AllowSystemComponents field value if set, zero value otherwise. +func (o *Nodepool) GetAllowSystemComponents() bool { + if o == nil || IsNil(o.AllowSystemComponents) { + var ret bool + return ret + } + return *o.AllowSystemComponents +} + +// GetAllowSystemComponentsOk returns a tuple with the AllowSystemComponents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetAllowSystemComponentsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowSystemComponents) { + return nil, false + } + return o.AllowSystemComponents, true +} + +// HasAllowSystemComponents returns a boolean if a field has been set. +func (o *Nodepool) HasAllowSystemComponents() bool { + if o != nil && !IsNil(o.AllowSystemComponents) { + return true + } + + return false +} + +// SetAllowSystemComponents gets a reference to the given bool and assigns it to the AllowSystemComponents field. +func (o *Nodepool) SetAllowSystemComponents(v bool) { + o.AllowSystemComponents = &v +} + +// GetAvailabilityZones returns the AvailabilityZones field value +func (o *Nodepool) GetAvailabilityZones() []string { + if o == nil { + var ret []string + return ret + } + + return o.AvailabilityZones +} + +// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetAvailabilityZonesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.AvailabilityZones, true +} + +// SetAvailabilityZones sets field value +func (o *Nodepool) SetAvailabilityZones(v []string) { + o.AvailabilityZones = v +} + +// GetCri returns the Cri field value if set, zero value otherwise. +func (o *Nodepool) GetCri() CRI { + if o == nil || IsNil(o.Cri) { + var ret CRI + return ret + } + return *o.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 *Nodepool) GetCriOk() (*CRI, bool) { + if o == nil || IsNil(o.Cri) { + return nil, false + } + return o.Cri, true +} + +// HasCri returns a boolean if a field has been set. +func (o *Nodepool) HasCri() bool { + if o != nil && !IsNil(o.Cri) { + return true + } + + return false +} + +// SetCri gets a reference to the given CRI and assigns it to the Cri field. +func (o *Nodepool) SetCri(v CRI) { + o.Cri = &v +} + +// GetKubernetes returns the Kubernetes field value if set, zero value otherwise. +func (o *Nodepool) GetKubernetes() NodepoolKubernetes { + if o == nil || IsNil(o.Kubernetes) { + var ret NodepoolKubernetes + return ret + } + return *o.Kubernetes +} + +// GetKubernetesOk returns a tuple with the Kubernetes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetKubernetesOk() (*NodepoolKubernetes, bool) { + if o == nil || IsNil(o.Kubernetes) { + return nil, false + } + return o.Kubernetes, true +} + +// HasKubernetes returns a boolean if a field has been set. +func (o *Nodepool) HasKubernetes() bool { + if o != nil && !IsNil(o.Kubernetes) { + return true + } + + return false +} + +// SetKubernetes gets a reference to the given NodepoolKubernetes and assigns it to the Kubernetes field. +func (o *Nodepool) SetKubernetes(v NodepoolKubernetes) { + o.Kubernetes = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Nodepool) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Nodepool) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Nodepool) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetMachine returns the Machine field value +func (o *Nodepool) GetMachine() Machine { + if o == nil { + var ret Machine + return ret + } + + return o.Machine +} + +// GetMachineOk returns a tuple with the Machine field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMachineOk() (*Machine, bool) { + if o == nil { + return nil, false + } + return &o.Machine, true +} + +// SetMachine sets field value +func (o *Nodepool) SetMachine(v Machine) { + o.Machine = v +} + +// GetMaxSurge returns the MaxSurge field value if set, zero value otherwise. +func (o *Nodepool) GetMaxSurge() int32 { + if o == nil || IsNil(o.MaxSurge) { + var ret int32 + return ret + } + return *o.MaxSurge +} + +// GetMaxSurgeOk returns a tuple with the MaxSurge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaxSurgeOk() (*int32, bool) { + if o == nil || IsNil(o.MaxSurge) { + return nil, false + } + return o.MaxSurge, true +} + +// HasMaxSurge returns a boolean if a field has been set. +func (o *Nodepool) HasMaxSurge() bool { + if o != nil && !IsNil(o.MaxSurge) { + return true + } + + return false +} + +// SetMaxSurge gets a reference to the given int32 and assigns it to the MaxSurge field. +func (o *Nodepool) SetMaxSurge(v int32) { + o.MaxSurge = &v +} + +// GetMaxUnavailable returns the MaxUnavailable field value if set, zero value otherwise. +func (o *Nodepool) GetMaxUnavailable() int32 { + if o == nil || IsNil(o.MaxUnavailable) { + var ret int32 + return ret + } + return *o.MaxUnavailable +} + +// GetMaxUnavailableOk returns a tuple with the MaxUnavailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaxUnavailableOk() (*int32, bool) { + if o == nil || IsNil(o.MaxUnavailable) { + return nil, false + } + return o.MaxUnavailable, true +} + +// HasMaxUnavailable returns a boolean if a field has been set. +func (o *Nodepool) HasMaxUnavailable() bool { + if o != nil && !IsNil(o.MaxUnavailable) { + return true + } + + return false +} + +// SetMaxUnavailable gets a reference to the given int32 and assigns it to the MaxUnavailable field. +func (o *Nodepool) SetMaxUnavailable(v int32) { + o.MaxUnavailable = &v +} + +// GetMaximum returns the Maximum field value +func (o *Nodepool) GetMaximum() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Maximum +} + +// GetMaximumOk returns a tuple with the Maximum field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMaximumOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Maximum, true +} + +// SetMaximum sets field value +func (o *Nodepool) SetMaximum(v int32) { + o.Maximum = v +} + +// GetMinimum returns the Minimum field value +func (o *Nodepool) GetMinimum() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Minimum +} + +// GetMinimumOk returns a tuple with the Minimum field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetMinimumOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Minimum, true +} + +// SetMinimum sets field value +func (o *Nodepool) SetMinimum(v int32) { + o.Minimum = v +} + +// GetName returns the Name field value +func (o *Nodepool) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Nodepool) SetName(v string) { + o.Name = v +} + +// GetTaints returns the Taints field value if set, zero value otherwise. +func (o *Nodepool) GetTaints() []Taint { + if o == nil || IsNil(o.Taints) { + var ret []Taint + return ret + } + return o.Taints +} + +// GetTaintsOk returns a tuple with the Taints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nodepool) GetTaintsOk() ([]Taint, bool) { + if o == nil || IsNil(o.Taints) { + return nil, false + } + return o.Taints, true +} + +// HasTaints returns a boolean if a field has been set. +func (o *Nodepool) HasTaints() bool { + if o != nil && !IsNil(o.Taints) { + return true + } + + return false +} + +// SetTaints gets a reference to the given []Taint and assigns it to the Taints field. +func (o *Nodepool) SetTaints(v []Taint) { + o.Taints = v +} + +// GetVolume returns the Volume field value +func (o *Nodepool) GetVolume() Volume { + if o == nil { + var ret Volume + return ret + } + + return o.Volume +} + +// GetVolumeOk returns a tuple with the Volume field value +// and a boolean to check if the value has been set. +func (o *Nodepool) GetVolumeOk() (*Volume, bool) { + if o == nil { + return nil, false + } + return &o.Volume, true +} + +// SetVolume sets field value +func (o *Nodepool) SetVolume(v Volume) { + o.Volume = v +} + +func (o Nodepool) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Nodepool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowSystemComponents) { + toSerialize["allowSystemComponents"] = o.AllowSystemComponents + } + toSerialize["availabilityZones"] = o.AvailabilityZones + if !IsNil(o.Cri) { + toSerialize["cri"] = o.Cri + } + if !IsNil(o.Kubernetes) { + toSerialize["kubernetes"] = o.Kubernetes + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["machine"] = o.Machine + if !IsNil(o.MaxSurge) { + toSerialize["maxSurge"] = o.MaxSurge + } + if !IsNil(o.MaxUnavailable) { + toSerialize["maxUnavailable"] = o.MaxUnavailable + } + toSerialize["maximum"] = o.Maximum + toSerialize["minimum"] = o.Minimum + toSerialize["name"] = o.Name + if !IsNil(o.Taints) { + toSerialize["taints"] = o.Taints + } + toSerialize["volume"] = o.Volume + return toSerialize, nil +} + +func (o *Nodepool) 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{ + "availabilityZones", + "machine", + "maximum", + "minimum", + "name", + "volume", + } + + 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) + } + } + + varNodepool := _Nodepool{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodepool) + + if err != nil { + return err + } + + *o = Nodepool(varNodepool) + + return err +} + +type NullableNodepool struct { + value *Nodepool + isSet bool +} + +func (v NullableNodepool) Get() *Nodepool { + return v.value +} + +func (v *NullableNodepool) Set(val *Nodepool) { + v.value = val + v.isSet = true +} + +func (v NullableNodepool) IsSet() bool { + return v.isSet +} + +func (v *NullableNodepool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodepool(val *Nodepool) *NullableNodepool { + return &NullableNodepool{value: val, isSet: true} +} + +func (v NullableNodepool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodepool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_nodepool_kubernetes.go b/services/ske/v2api/model_nodepool_kubernetes.go new file mode 100644 index 000000000..b0018c78a --- /dev/null +++ b/services/ske/v2api/model_nodepool_kubernetes.go @@ -0,0 +1,125 @@ +/* +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 NodepoolKubernetes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodepoolKubernetes{} + +// NodepoolKubernetes struct for NodepoolKubernetes +type NodepoolKubernetes struct { + // Override the Kubernetes version for the Kubelet of this Nodepool. Version must be equal or lower than the version of the cluster. Only one minor version difference to the version of the cluster is allowed. Downgrade of existing Nodepools is prohibited. + Version *string `json:"version,omitempty" validate:"regexp=^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"` +} + +// NewNodepoolKubernetes instantiates a new NodepoolKubernetes 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 NewNodepoolKubernetes() *NodepoolKubernetes { + this := NodepoolKubernetes{} + return &this +} + +// NewNodepoolKubernetesWithDefaults instantiates a new NodepoolKubernetes 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 NewNodepoolKubernetesWithDefaults() *NodepoolKubernetes { + this := NodepoolKubernetes{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *NodepoolKubernetes) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodepoolKubernetes) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *NodepoolKubernetes) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *NodepoolKubernetes) SetVersion(v string) { + o.Version = &v +} + +func (o NodepoolKubernetes) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodepoolKubernetes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableNodepoolKubernetes struct { + value *NodepoolKubernetes + isSet bool +} + +func (v NullableNodepoolKubernetes) Get() *NodepoolKubernetes { + return v.value +} + +func (v *NullableNodepoolKubernetes) Set(val *NodepoolKubernetes) { + v.value = val + v.isSet = true +} + +func (v NullableNodepoolKubernetes) IsSet() bool { + return v.isSet +} + +func (v *NullableNodepoolKubernetes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodepoolKubernetes(val *NodepoolKubernetes) *NullableNodepoolKubernetes { + return &NullableNodepoolKubernetes{value: val, isSet: true} +} + +func (v NullableNodepoolKubernetes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodepoolKubernetes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_observability.go b/services/ske/v2api/model_observability.go new file mode 100644 index 000000000..6693c53eb --- /dev/null +++ b/services/ske/v2api/model_observability.go @@ -0,0 +1,186 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Observability type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Observability{} + +// Observability struct for Observability +type Observability struct { + // Enables the Observability extension. + Enabled bool `json:"enabled"` + // Instance ID to choose which Observability instance is used. + InstanceId string `json:"instanceId"` +} + +type _Observability Observability + +// NewObservability instantiates a new Observability 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 NewObservability(enabled bool, instanceId string) *Observability { + this := Observability{} + this.Enabled = enabled + this.InstanceId = instanceId + return &this +} + +// NewObservabilityWithDefaults instantiates a new Observability 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 NewObservabilityWithDefaults() *Observability { + this := Observability{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *Observability) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *Observability) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *Observability) SetEnabled(v bool) { + o.Enabled = v +} + +// GetInstanceId returns the InstanceId field value +func (o *Observability) GetInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *Observability) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *Observability) SetInstanceId(v string) { + o.InstanceId = v +} + +func (o Observability) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Observability) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + toSerialize["instanceId"] = o.InstanceId + return toSerialize, nil +} + +func (o *Observability) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "instanceId", + } + + 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) + } + } + + varObservability := _Observability{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObservability) + + if err != nil { + return err + } + + *o = Observability(varObservability) + + return err +} + +type NullableObservability struct { + value *Observability + isSet bool +} + +func (v NullableObservability) Get() *Observability { + return v.value +} + +func (v *NullableObservability) Set(val *Observability) { + v.value = val + v.isSet = true +} + +func (v NullableObservability) IsSet() bool { + return v.isSet +} + +func (v *NullableObservability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObservability(val *Observability) *NullableObservability { + return &NullableObservability{value: val, isSet: true} +} + +func (v NullableObservability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObservability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_provider_options.go b/services/ske/v2api/model_provider_options.go new file mode 100644 index 000000000..7861082a5 --- /dev/null +++ b/services/ske/v2api/model_provider_options.go @@ -0,0 +1,268 @@ +/* +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 ProviderOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderOptions{} + +// ProviderOptions struct for ProviderOptions +type ProviderOptions struct { + AvailabilityZones []AvailabilityZone `json:"availabilityZones,omitempty"` + KubernetesVersions []KubernetesVersion `json:"kubernetesVersions,omitempty"` + MachineImages []MachineImage `json:"machineImages,omitempty"` + MachineTypes []MachineType `json:"machineTypes,omitempty"` + VolumeTypes []VolumeType `json:"volumeTypes,omitempty"` +} + +// NewProviderOptions instantiates a new ProviderOptions 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 NewProviderOptions() *ProviderOptions { + this := ProviderOptions{} + return &this +} + +// NewProviderOptionsWithDefaults instantiates a new ProviderOptions 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 NewProviderOptionsWithDefaults() *ProviderOptions { + this := ProviderOptions{} + return &this +} + +// GetAvailabilityZones returns the AvailabilityZones field value if set, zero value otherwise. +func (o *ProviderOptions) GetAvailabilityZones() []AvailabilityZone { + if o == nil || IsNil(o.AvailabilityZones) { + var ret []AvailabilityZone + return ret + } + return o.AvailabilityZones +} + +// GetAvailabilityZonesOk returns a tuple with the AvailabilityZones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetAvailabilityZonesOk() ([]AvailabilityZone, bool) { + if o == nil || IsNil(o.AvailabilityZones) { + return nil, false + } + return o.AvailabilityZones, true +} + +// HasAvailabilityZones returns a boolean if a field has been set. +func (o *ProviderOptions) HasAvailabilityZones() bool { + if o != nil && !IsNil(o.AvailabilityZones) { + return true + } + + return false +} + +// SetAvailabilityZones gets a reference to the given []AvailabilityZone and assigns it to the AvailabilityZones field. +func (o *ProviderOptions) SetAvailabilityZones(v []AvailabilityZone) { + o.AvailabilityZones = v +} + +// GetKubernetesVersions returns the KubernetesVersions field value if set, zero value otherwise. +func (o *ProviderOptions) GetKubernetesVersions() []KubernetesVersion { + if o == nil || IsNil(o.KubernetesVersions) { + var ret []KubernetesVersion + return ret + } + return o.KubernetesVersions +} + +// GetKubernetesVersionsOk returns a tuple with the KubernetesVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetKubernetesVersionsOk() ([]KubernetesVersion, bool) { + if o == nil || IsNil(o.KubernetesVersions) { + return nil, false + } + return o.KubernetesVersions, true +} + +// HasKubernetesVersions returns a boolean if a field has been set. +func (o *ProviderOptions) HasKubernetesVersions() bool { + if o != nil && !IsNil(o.KubernetesVersions) { + return true + } + + return false +} + +// SetKubernetesVersions gets a reference to the given []KubernetesVersion and assigns it to the KubernetesVersions field. +func (o *ProviderOptions) SetKubernetesVersions(v []KubernetesVersion) { + o.KubernetesVersions = v +} + +// GetMachineImages returns the MachineImages field value if set, zero value otherwise. +func (o *ProviderOptions) GetMachineImages() []MachineImage { + if o == nil || IsNil(o.MachineImages) { + var ret []MachineImage + return ret + } + return o.MachineImages +} + +// GetMachineImagesOk returns a tuple with the MachineImages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetMachineImagesOk() ([]MachineImage, bool) { + if o == nil || IsNil(o.MachineImages) { + return nil, false + } + return o.MachineImages, true +} + +// HasMachineImages returns a boolean if a field has been set. +func (o *ProviderOptions) HasMachineImages() bool { + if o != nil && !IsNil(o.MachineImages) { + return true + } + + return false +} + +// SetMachineImages gets a reference to the given []MachineImage and assigns it to the MachineImages field. +func (o *ProviderOptions) SetMachineImages(v []MachineImage) { + o.MachineImages = v +} + +// GetMachineTypes returns the MachineTypes field value if set, zero value otherwise. +func (o *ProviderOptions) GetMachineTypes() []MachineType { + if o == nil || IsNil(o.MachineTypes) { + var ret []MachineType + return ret + } + return o.MachineTypes +} + +// GetMachineTypesOk returns a tuple with the MachineTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetMachineTypesOk() ([]MachineType, bool) { + if o == nil || IsNil(o.MachineTypes) { + return nil, false + } + return o.MachineTypes, true +} + +// HasMachineTypes returns a boolean if a field has been set. +func (o *ProviderOptions) HasMachineTypes() bool { + if o != nil && !IsNil(o.MachineTypes) { + return true + } + + return false +} + +// SetMachineTypes gets a reference to the given []MachineType and assigns it to the MachineTypes field. +func (o *ProviderOptions) SetMachineTypes(v []MachineType) { + o.MachineTypes = v +} + +// GetVolumeTypes returns the VolumeTypes field value if set, zero value otherwise. +func (o *ProviderOptions) GetVolumeTypes() []VolumeType { + if o == nil || IsNil(o.VolumeTypes) { + var ret []VolumeType + return ret + } + return o.VolumeTypes +} + +// GetVolumeTypesOk returns a tuple with the VolumeTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProviderOptions) GetVolumeTypesOk() ([]VolumeType, bool) { + if o == nil || IsNil(o.VolumeTypes) { + return nil, false + } + return o.VolumeTypes, true +} + +// HasVolumeTypes returns a boolean if a field has been set. +func (o *ProviderOptions) HasVolumeTypes() bool { + if o != nil && !IsNil(o.VolumeTypes) { + return true + } + + return false +} + +// SetVolumeTypes gets a reference to the given []VolumeType and assigns it to the VolumeTypes field. +func (o *ProviderOptions) SetVolumeTypes(v []VolumeType) { + o.VolumeTypes = v +} + +func (o ProviderOptions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProviderOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZones) { + toSerialize["availabilityZones"] = o.AvailabilityZones + } + if !IsNil(o.KubernetesVersions) { + toSerialize["kubernetesVersions"] = o.KubernetesVersions + } + if !IsNil(o.MachineImages) { + toSerialize["machineImages"] = o.MachineImages + } + if !IsNil(o.MachineTypes) { + toSerialize["machineTypes"] = o.MachineTypes + } + if !IsNil(o.VolumeTypes) { + toSerialize["volumeTypes"] = o.VolumeTypes + } + return toSerialize, nil +} + +type NullableProviderOptions struct { + value *ProviderOptions + isSet bool +} + +func (v NullableProviderOptions) Get() *ProviderOptions { + return v.value +} + +func (v *NullableProviderOptions) Set(val *ProviderOptions) { + v.value = val + v.isSet = true +} + +func (v NullableProviderOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderOptions(val *ProviderOptions) *NullableProviderOptions { + return &NullableProviderOptions{value: val, isSet: true} +} + +func (v NullableProviderOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_runtime_error.go b/services/ske/v2api/model_runtime_error.go new file mode 100644 index 000000000..37c860b54 --- /dev/null +++ b/services/ske/v2api/model_runtime_error.go @@ -0,0 +1,197 @@ +/* +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 RuntimeError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuntimeError{} + +// RuntimeError struct for RuntimeError +type RuntimeError struct { + // - Code: `SKE_UNSPECIFIED` Message: \"An error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_TMP_AUTH_ERROR` Message: \"Authentication failed. This is a temporary error. Please wait while the system recovers.\" - Code: `SKE_QUOTA_EXCEEDED` Message: \"Your project's resource quotas are exhausted. Please make sure your quota is sufficient for the ordered cluster.\" - Code: `SKE_OBSERVABILITY_INSTANCE_NOT_FOUND` Message: \"The provided Observability instance could not be found.\" - Code: `SKE_RATE_LIMITS` Message: \"While provisioning your cluster, request rate limits where incurred. Please wait while the system recovers.\" - Code: `SKE_INFRA_ERROR` Message: \"An error occurred with the underlying infrastructure. Please open a support ticket if this error persists.\" - Code: `SKE_REMAINING_RESOURCES` Message: \"There are remaining Kubernetes resources in your cluster that prevent deletion. Please make sure to remove them.\" - Code: `SKE_CONFIGURATION_PROBLEM` Message: \"A configuration error occurred. Please open a support ticket if this error persists.\" - Code: `SKE_UNREADY_NODES` Message: \"Not all worker nodes are ready. Please open a support ticket if this error persists.\" - Code: `SKE_API_SERVER_ERROR` Message: \"The Kubernetes API server is not reporting readiness. Please open a support ticket if this error persists.\" - Code: `SKE_DNS_ZONE_NOT_FOUND` Message: \"The provided DNS zone for the STACKIT DNS extension could not be found. Please ensure you defined a valid domain that belongs to a STACKIT DNS zone.\" + Code *string `json:"code,omitempty"` + Details *string `json:"details,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewRuntimeError instantiates a new RuntimeError 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 NewRuntimeError() *RuntimeError { + this := RuntimeError{} + return &this +} + +// NewRuntimeErrorWithDefaults instantiates a new RuntimeError 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 NewRuntimeErrorWithDefaults() *RuntimeError { + this := RuntimeError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *RuntimeError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuntimeError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *RuntimeError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *RuntimeError) SetCode(v string) { + o.Code = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *RuntimeError) GetDetails() string { + if o == nil || IsNil(o.Details) { + var ret string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuntimeError) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *RuntimeError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *RuntimeError) SetDetails(v string) { + o.Details = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RuntimeError) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuntimeError) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *RuntimeError) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *RuntimeError) SetMessage(v string) { + o.Message = &v +} + +func (o RuntimeError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RuntimeError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableRuntimeError struct { + value *RuntimeError + isSet bool +} + +func (v NullableRuntimeError) Get() *RuntimeError { + return v.value +} + +func (v *NullableRuntimeError) Set(val *RuntimeError) { + v.value = val + v.isSet = true +} + +func (v NullableRuntimeError) IsSet() bool { + return v.isSet +} + +func (v *NullableRuntimeError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuntimeError(val *RuntimeError) *NullableRuntimeError { + return &NullableRuntimeError{value: val, isSet: true} +} + +func (v NullableRuntimeError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuntimeError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_taint.go b/services/ske/v2api/model_taint.go new file mode 100644 index 000000000..9ae365b5d --- /dev/null +++ b/services/ske/v2api/model_taint.go @@ -0,0 +1,220 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Taint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Taint{} + +// Taint struct for Taint +type Taint struct { + Effect string `json:"effect"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +type _Taint Taint + +// NewTaint instantiates a new Taint 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 NewTaint(effect string, key string) *Taint { + this := Taint{} + this.Effect = effect + this.Key = key + return &this +} + +// NewTaintWithDefaults instantiates a new Taint 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 NewTaintWithDefaults() *Taint { + this := Taint{} + return &this +} + +// GetEffect returns the Effect field value +func (o *Taint) GetEffect() string { + if o == nil { + var ret string + return ret + } + + return o.Effect +} + +// GetEffectOk returns a tuple with the Effect field value +// and a boolean to check if the value has been set. +func (o *Taint) GetEffectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Effect, true +} + +// SetEffect sets field value +func (o *Taint) SetEffect(v string) { + o.Effect = v +} + +// GetKey returns the Key field value +func (o *Taint) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *Taint) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *Taint) SetKey(v string) { + o.Key = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Taint) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Taint) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Taint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *Taint) SetValue(v string) { + o.Value = &v +} + +func (o Taint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Taint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["effect"] = o.Effect + toSerialize["key"] = o.Key + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +func (o *Taint) 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{ + "effect", + "key", + } + + 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) + } + } + + varTaint := _Taint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTaint) + + if err != nil { + return err + } + + *o = Taint(varTaint) + + return err +} + +type NullableTaint struct { + value *Taint + isSet bool +} + +func (v NullableTaint) Get() *Taint { + return v.value +} + +func (v *NullableTaint) Set(val *Taint) { + v.value = val + v.isSet = true +} + +func (v NullableTaint) IsSet() bool { + return v.isSet +} + +func (v *NullableTaint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaint(val *Taint) *NullableTaint { + return &NullableTaint{value: val, isSet: true} +} + +func (v NullableTaint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_time_window.go b/services/ske/v2api/model_time_window.go new file mode 100644 index 000000000..e7dceefa3 --- /dev/null +++ b/services/ske/v2api/model_time_window.go @@ -0,0 +1,185 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TimeWindow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TimeWindow{} + +// TimeWindow struct for TimeWindow +type TimeWindow struct { + End time.Time `json:"end"` + Start time.Time `json:"start"` +} + +type _TimeWindow TimeWindow + +// NewTimeWindow instantiates a new TimeWindow 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 NewTimeWindow(end time.Time, start time.Time) *TimeWindow { + this := TimeWindow{} + this.End = end + this.Start = start + return &this +} + +// NewTimeWindowWithDefaults instantiates a new TimeWindow 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 NewTimeWindowWithDefaults() *TimeWindow { + this := TimeWindow{} + return &this +} + +// GetEnd returns the End field value +func (o *TimeWindow) GetEnd() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.End +} + +// GetEndOk returns a tuple with the End field value +// and a boolean to check if the value has been set. +func (o *TimeWindow) GetEndOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.End, true +} + +// SetEnd sets field value +func (o *TimeWindow) SetEnd(v time.Time) { + o.End = v +} + +// GetStart returns the Start field value +func (o *TimeWindow) GetStart() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *TimeWindow) GetStartOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *TimeWindow) SetStart(v time.Time) { + o.Start = v +} + +func (o TimeWindow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TimeWindow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["end"] = o.End + toSerialize["start"] = o.Start + return toSerialize, nil +} + +func (o *TimeWindow) 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{ + "end", + "start", + } + + 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) + } + } + + varTimeWindow := _TimeWindow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTimeWindow) + + if err != nil { + return err + } + + *o = TimeWindow(varTimeWindow) + + return err +} + +type NullableTimeWindow struct { + value *TimeWindow + isSet bool +} + +func (v NullableTimeWindow) Get() *TimeWindow { + return v.value +} + +func (v *NullableTimeWindow) Set(val *TimeWindow) { + v.value = val + v.isSet = true +} + +func (v NullableTimeWindow) IsSet() bool { + return v.isSet +} + +func (v *NullableTimeWindow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimeWindow(val *TimeWindow) *NullableTimeWindow { + return &NullableTimeWindow{value: val, isSet: true} +} + +func (v NullableTimeWindow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimeWindow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_v2_control_plane_network.go b/services/ske/v2api/model_v2_control_plane_network.go new file mode 100644 index 000000000..261cc5c2b --- /dev/null +++ b/services/ske/v2api/model_v2_control_plane_network.go @@ -0,0 +1,124 @@ +/* +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 V2ControlPlaneNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &V2ControlPlaneNetwork{} + +// V2ControlPlaneNetwork struct for V2ControlPlaneNetwork +type V2ControlPlaneNetwork struct { + AccessScope *AccessScope `json:"accessScope,omitempty"` +} + +// NewV2ControlPlaneNetwork instantiates a new V2ControlPlaneNetwork 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 NewV2ControlPlaneNetwork() *V2ControlPlaneNetwork { + this := V2ControlPlaneNetwork{} + return &this +} + +// NewV2ControlPlaneNetworkWithDefaults instantiates a new V2ControlPlaneNetwork 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 NewV2ControlPlaneNetworkWithDefaults() *V2ControlPlaneNetwork { + this := V2ControlPlaneNetwork{} + return &this +} + +// GetAccessScope returns the AccessScope field value if set, zero value otherwise. +func (o *V2ControlPlaneNetwork) GetAccessScope() AccessScope { + if o == nil || IsNil(o.AccessScope) { + var ret AccessScope + return ret + } + return *o.AccessScope +} + +// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *V2ControlPlaneNetwork) GetAccessScopeOk() (*AccessScope, bool) { + if o == nil || IsNil(o.AccessScope) { + return nil, false + } + return o.AccessScope, true +} + +// HasAccessScope returns a boolean if a field has been set. +func (o *V2ControlPlaneNetwork) HasAccessScope() bool { + if o != nil && !IsNil(o.AccessScope) { + return true + } + + return false +} + +// SetAccessScope gets a reference to the given AccessScope and assigns it to the AccessScope field. +func (o *V2ControlPlaneNetwork) SetAccessScope(v AccessScope) { + o.AccessScope = &v +} + +func (o V2ControlPlaneNetwork) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o V2ControlPlaneNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessScope) { + toSerialize["accessScope"] = o.AccessScope + } + return toSerialize, nil +} + +type NullableV2ControlPlaneNetwork struct { + value *V2ControlPlaneNetwork + isSet bool +} + +func (v NullableV2ControlPlaneNetwork) Get() *V2ControlPlaneNetwork { + return v.value +} + +func (v *NullableV2ControlPlaneNetwork) Set(val *V2ControlPlaneNetwork) { + v.value = val + v.isSet = true +} + +func (v NullableV2ControlPlaneNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableV2ControlPlaneNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableV2ControlPlaneNetwork(val *V2ControlPlaneNetwork) *NullableV2ControlPlaneNetwork { + return &NullableV2ControlPlaneNetwork{value: val, isSet: true} +} + +func (v NullableV2ControlPlaneNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableV2ControlPlaneNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_volume.go b/services/ske/v2api/model_volume.go new file mode 100644 index 000000000..e91e4469a --- /dev/null +++ b/services/ske/v2api/model_volume.go @@ -0,0 +1,193 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Volume type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Volume{} + +// Volume struct for Volume +type Volume struct { + Size int32 `json:"size"` + // For valid values please take a look at [provider-options](#tag/ProviderOptions/operation/SkeService_GetProviderOptions) `volumeTypes`. + Type *string `json:"type,omitempty"` +} + +type _Volume Volume + +// NewVolume instantiates a new Volume 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 NewVolume(size int32) *Volume { + this := Volume{} + this.Size = size + return &this +} + +// NewVolumeWithDefaults instantiates a new Volume 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 NewVolumeWithDefaults() *Volume { + this := Volume{} + return &this +} + +// GetSize returns the Size field value +func (o *Volume) GetSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *Volume) GetSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *Volume) SetSize(v int32) { + o.Size = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Volume) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Volume) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Volume) SetType(v string) { + o.Type = &v +} + +func (o Volume) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Volume) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["size"] = o.Size + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +func (o *Volume) 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{ + "size", + } + + 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) + } + } + + varVolume := _Volume{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVolume) + + if err != nil { + return err + } + + *o = Volume(varVolume) + + return err +} + +type NullableVolume struct { + value *Volume + isSet bool +} + +func (v NullableVolume) Get() *Volume { + return v.value +} + +func (v *NullableVolume) Set(val *Volume) { + v.value = val + v.isSet = true +} + +func (v NullableVolume) IsSet() bool { + return v.isSet +} + +func (v *NullableVolume) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolume(val *Volume) *NullableVolume { + return &NullableVolume{value: val, isSet: true} +} + +func (v NullableVolume) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolume) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/model_volume_type.go b/services/ske/v2api/model_volume_type.go new file mode 100644 index 000000000..eb20d23a7 --- /dev/null +++ b/services/ske/v2api/model_volume_type.go @@ -0,0 +1,124 @@ +/* +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 VolumeType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumeType{} + +// VolumeType struct for VolumeType +type VolumeType struct { + Name *string `json:"name,omitempty"` +} + +// NewVolumeType instantiates a new VolumeType 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 NewVolumeType() *VolumeType { + this := VolumeType{} + return &this +} + +// NewVolumeTypeWithDefaults instantiates a new VolumeType 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 NewVolumeTypeWithDefaults() *VolumeType { + this := VolumeType{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *VolumeType) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + 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 *VolumeType) GetNameOk() (*string, 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 *VolumeType) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *VolumeType) SetName(v string) { + o.Name = &v +} + +func (o VolumeType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VolumeType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableVolumeType struct { + value *VolumeType + isSet bool +} + +func (v NullableVolumeType) Get() *VolumeType { + return v.value +} + +func (v *NullableVolumeType) Set(val *VolumeType) { + v.value = val + v.isSet = true +} + +func (v NullableVolumeType) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumeType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumeType(val *VolumeType) *NullableVolumeType { + return &NullableVolumeType{value: val, isSet: true} +} + +func (v NullableVolumeType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumeType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/v2api/response.go b/services/ske/v2api/response.go new file mode 100644 index 000000000..77cebe001 --- /dev/null +++ b/services/ske/v2api/response.go @@ -0,0 +1,47 @@ +/* +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 ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/ske/v2api/utils.go b/services/ske/v2api/utils.go new file mode 100644 index 000000000..b1945e2a8 --- /dev/null +++ b/services/ske/v2api/utils.go @@ -0,0 +1,361 @@ +/* +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 ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/services/ske/v2api/wait/wait.go b/services/ske/v2api/wait/wait.go new file mode 100644 index 000000000..8e53f29d0 --- /dev/null +++ b/services/ske/v2api/wait/wait.go @@ -0,0 +1,210 @@ +package wait + +import ( + "context" + "fmt" + "time" + + "github.com/stackitcloud/stackit-sdk-go/core/wait" + ske "github.com/stackitcloud/stackit-sdk-go/services/ske/v2api" +) + +const ( + CREDENTIALSROTATIONSTATEPHASE_NEVER = "NEVER" + CREDENTIALSROTATIONSTATEPHASE_PREPARING = "PREPARING" + CREDENTIALSROTATIONSTATEPHASE_PREPARED = "PREPARED" + CREDENTIALSROTATIONSTATEPHASE_COMPLETING = "COMPLETING" + CREDENTIALSROTATIONSTATEPHASE_COMPLETED = "COMPLETED" + + RUNTIMEERRORCODE_OBSERVABILITY_INSTANCE_NOT_FOUND = "SKE_OBSERVABILITY_INSTANCE_NOT_FOUND" +) + +// CreateOrUpdateClusterWaitHandler will wait for cluster creation or update +func CreateOrUpdateClusterWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, name string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + s, err := a.GetCluster(ctx, projectId, region, name).Execute() + if err != nil { + return false, nil, err + } + state := *s.Status.Aggregated + + // The state "STATE_UNHEALTHY" (aka "Impaired" in the portal) could be temporarily occur during cluster creation and the system is recovering usually, so it is not considered as a failed state here. + // -- alignment meeting with SKE team on 4.8.23 + // The exception is when providing an invalid argus instance id, in that case the cluster will stay as "Impaired" until the SKE team solves it, but it is still usable. + if state == ske.CLUSTERSTATUSSTATE_STATE_UNHEALTHY && s.Status.Error != nil && s.Status.Error.Message != nil && *s.Status.Error.Code == RUNTIMEERRORCODE_OBSERVABILITY_INSTANCE_NOT_FOUND { + return true, s, nil + } + + if state == ske.CLUSTERSTATUSSTATE_STATE_HEALTHY || state == ske.CLUSTERSTATUSSTATE_STATE_HIBERNATED { + return true, s, nil + } + + return false, nil, nil + }) + handler.SetTimeout(45 * time.Minute) + return handler +} + +// DeleteClusterWaitHandler will wait for cluster deletion +func DeleteClusterWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, name string) *wait.AsyncActionHandler[ske.ListClustersResponse] { + handler := wait.New(func() (waitFinished bool, response *ske.ListClustersResponse, err error) { + s, err := a.ListClusters(ctx, projectId, region).Execute() + if err != nil { + return false, nil, err + } + items := s.Items + for i := range items { + n := items[i].Name + if n != nil && *n == name { + return false, nil, nil + } + } + return true, s, nil + }) + handler.SetTimeout(45 * time.Minute) + return handler +} + +func TriggerClusterHibernationWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + cluster, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *cluster.Status.Aggregated + + if state == ske.CLUSTERSTATUSSTATE_STATE_HIBERNATING { + return false, nil, nil + } + + return true, cluster, nil + }) + handler.SetTimeout(45 * time.Minute) + return handler +} + +func TriggerClusterMaintenanceWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + cluster, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *cluster.Status.Aggregated + + if state == ske.CLUSTERSTATUSSTATE_STATE_RECONCILING { + return false, nil, nil + } + + return true, cluster, nil + }) + handler.SetTimeout(45 * time.Minute) + return handler +} + +func TriggerClusterReconciliationWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + cluster, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *cluster.Status.Aggregated + + if state == ske.CLUSTERSTATUSSTATE_STATE_RECONCILING { + return false, nil, nil + } + + return true, cluster, nil + }) + handler.SetTimeout(45 * time.Minute) + return handler +} + +func TriggerClusterWakeupWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + cluster, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *cluster.Status.Aggregated + + if state == ske.CLUSTERSTATUSSTATE_STATE_WAKINGUP { + return false, nil, nil + } + + return true, cluster, nil + }) + handler.SetTimeout(45 * time.Minute) + return handler +} + +// RotateCredentialsWaitHandler will wait for credentials rotation +func RotateCredentialsWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + s, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *s.Status.Aggregated + + if state == ske.CLUSTERSTATUSSTATE_STATE_HEALTHY || state == ske.CLUSTERSTATUSSTATE_STATE_HIBERNATED { + return true, s, nil + } + + if state == ske.CLUSTERSTATUSSTATE_STATE_RECONCILING { + return false, nil, nil + } + + return true, s, fmt.Errorf("unexpected state %s while waiting for cluster reconciliation", state) + }) + + handler.SetTimeout(10 * time.Minute) + return handler +} + +// StartCredentialsRotationWaitHandler will wait for credentials rotation +func StartCredentialsRotationWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + s, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *s.Status.CredentialsRotation.Phase + + if state == CREDENTIALSROTATIONSTATEPHASE_PREPARED { + return true, s, nil + } + + if state == CREDENTIALSROTATIONSTATEPHASE_PREPARING { + return false, nil, nil + } + + return true, s, fmt.Errorf("unexpected status %s while waiting for cluster credentials rotation to be prepared", state) + }) + + handler.SetTimeout(45 * time.Minute) + return handler +} + +// CompleteCredentialsRotationWaitHandler will wait for credentials rotation +func CompleteCredentialsRotationWaitHandler(ctx context.Context, a ske.DefaultAPI, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { + handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { + s, err := a.GetCluster(ctx, projectId, region, clusterName).Execute() + if err != nil { + return false, nil, err + } + state := *s.Status.CredentialsRotation.Phase + + if state == CREDENTIALSROTATIONSTATEPHASE_COMPLETED { + return true, s, nil + } + + if state == CREDENTIALSROTATIONSTATEPHASE_COMPLETING { + return false, nil, nil + } + + return true, s, fmt.Errorf("unexpected status %s while waiting for cluster credentials rotation to be completed", state) + }) + + handler.SetTimeout(45 * time.Minute) + return handler +} diff --git a/services/ske/v2api/wait/wait_test.go b/services/ske/v2api/wait/wait_test.go new file mode 100644 index 000000000..6ce05fb72 --- /dev/null +++ b/services/ske/v2api/wait/wait_test.go @@ -0,0 +1,511 @@ +package wait + +import ( + "context" + "net/http" + "testing" + "time" + + "github.com/google/go-cmp/cmp" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" + "github.com/stackitcloud/stackit-sdk-go/core/utils" + ske "github.com/stackitcloud/stackit-sdk-go/services/ske/v2api" +) + +const testRegion = "eu01" + +type mockSettings struct { + getFails bool + name string + resourceState ske.ClusterStatusState + invalidArgusInstance bool +} + +// Used for testing cluster operations +func newAPIMock(settings mockSettings) ske.DefaultAPI { + return &ske.DefaultAPIServiceMock{ + GetClusterExecuteMock: utils.Ptr(func(_ ske.ApiGetClusterRequest) (*ske.Cluster, error) { + if settings.getFails { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: http.StatusInternalServerError, + } + } + rs := settings.resourceState + + if settings.invalidArgusInstance { + return &ske.Cluster{ + Name: utils.Ptr("cluster"), + Status: &ske.ClusterStatus{ + Aggregated: &rs, + Error: &ske.RuntimeError{ + Code: utils.Ptr(RUNTIMEERRORCODE_OBSERVABILITY_INSTANCE_NOT_FOUND), + Message: utils.Ptr("invalid argus instance"), + }, + }, + }, nil + } + return &ske.Cluster{ + Name: utils.Ptr("cluster"), + Status: &ske.ClusterStatus{ + Aggregated: &rs, + }, + }, nil + }), + ListClustersExecuteMock: utils.Ptr(func(_ ske.ApiListClustersRequest) (*ske.ListClustersResponse, error) { + if settings.getFails { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: http.StatusInternalServerError, + } + } + rs := settings.resourceState + return &ske.ListClustersResponse{ + Items: []ske.Cluster{ + { + Name: utils.Ptr("cluster"), + Status: &ske.ClusterStatus{ + Aggregated: &rs, + }, + }, + }, + }, nil + }), + } +} + +func TestCreateOrUpdateClusterWaitHandler(t *testing.T) { + tests := []struct { + desc string + getFails bool + resourceState ske.ClusterStatusState + invalidArgusInstance bool + wantErr bool + wantResp bool + }{ + { + desc: "create_succeeded", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HEALTHY, + wantErr: false, + wantResp: true, + }, + { + desc: "update_succeeded", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HIBERNATED, + wantErr: false, + wantResp: true, + }, + { + desc: "unhealthy_cluster", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_UNHEALTHY, + invalidArgusInstance: true, + wantErr: false, + wantResp: true, + }, + { + desc: "get_fails", + getFails: true, + wantErr: true, + wantResp: false, + }, + { + desc: "timeout", + getFails: false, + resourceState: "ANOTHER STATE", + wantErr: true, + wantResp: false, + }, + } + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + name := "cluster" + + apiClient := newAPIMock(mockSettings{ + getFails: tt.getFails, + name: name, + resourceState: tt.resourceState, + invalidArgusInstance: tt.invalidArgusInstance, + }) + + var wantRes *ske.Cluster + rs := ske.ClusterStatusState(tt.resourceState) + if tt.wantResp { + wantRes = &ske.Cluster{ + Name: &name, + Status: &ske.ClusterStatus{ + Aggregated: &rs, + }, + } + + if tt.invalidArgusInstance { + wantRes.Status.Error = &ske.RuntimeError{ + Code: utils.Ptr(RUNTIMEERRORCODE_OBSERVABILITY_INSTANCE_NOT_FOUND), + Message: utils.Ptr("invalid argus instance"), + } + } + } + + handler := CreateOrUpdateClusterWaitHandler(context.Background(), apiClient, "", testRegion, name) + + gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + if !cmp.Equal(gotRes, wantRes) { + t.Fatalf("handler gotRes = %+v, want %+v", gotRes, wantRes) + } + }) + } +} + +func TestTriggerClusterHibernationWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState ske.ClusterStatusState + wantErr bool + wantResp bool + }{ + { + description: "hibernation ongoing (timeout)", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HIBERNATING, + wantErr: true, + wantResp: false, + }, + { + description: "hibernation succeeded", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HIBERNATED, + wantErr: false, + wantResp: true, + }, + { + description: "unexpected status", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HEALTHY, + wantErr: false, + wantResp: true, + }, + { + description: "get_fails", + getFails: true, + wantErr: true, + wantResp: false, + }, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + name := "cluster" + + apiClient := newAPIMock(mockSettings{ + getFails: tt.getFails, + name: name, + resourceState: tt.resourceState, + }) + + var wantRes *ske.Cluster + if tt.wantResp { + wantRes = &ske.Cluster{ + Name: &name, + Status: &ske.ClusterStatus{ + Aggregated: utils.Ptr(tt.resourceState), + }, + } + } + + handler := TriggerClusterHibernationWaitHandler(context.Background(), apiClient, "", testRegion, name) + + gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + if !cmp.Equal(gotRes, wantRes) { + t.Fatalf("handler gotRes = %+v, want %+v", gotRes, wantRes) + } + }) + } +} + +func TestTriggerClusterMaintenanceWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState ske.ClusterStatusState + wantErr bool + wantResp bool + }{ + { + description: "maintenance ongoing (timeout)", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_RECONCILING, + wantErr: true, + wantResp: false, + }, + { + description: "maintenance succeeded", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HEALTHY, + wantErr: false, + wantResp: true, + }, + { + description: "unexpected status", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HIBERNATED, + wantErr: false, + wantResp: true, + }, + { + description: "get_fails", + getFails: true, + wantErr: true, + wantResp: false, + }, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + name := "cluster" + + apiClient := newAPIMock(mockSettings{ + getFails: tt.getFails, + name: name, + resourceState: tt.resourceState, + }) + + var wantRes *ske.Cluster + if tt.wantResp { + wantRes = &ske.Cluster{ + Name: &name, + Status: &ske.ClusterStatus{ + Aggregated: utils.Ptr(tt.resourceState), + }, + } + } + + handler := TriggerClusterMaintenanceWaitHandler(context.Background(), apiClient, "", testRegion, name) + + gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + if !cmp.Equal(gotRes, wantRes) { + t.Fatalf("handler gotRes = %+v, want %+v", gotRes, wantRes) + } + }) + } +} + +func TestTriggerClusterWakeupWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState ske.ClusterStatusState + wantErr bool + wantResp bool + }{ + { + description: "wakeup ongoing (timeout)", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_WAKINGUP, + wantErr: true, + wantResp: false, + }, + { + description: "wakeup succeeded", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HEALTHY, + wantErr: false, + wantResp: true, + }, + { + description: "unexpected status", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_DELETING, + wantErr: false, + wantResp: true, + }, + { + description: "get_fails", + getFails: true, + wantErr: true, + wantResp: false, + }, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + name := "cluster" + + apiClient := newAPIMock(mockSettings{ + getFails: tt.getFails, + name: name, + resourceState: tt.resourceState, + }) + + var wantRes *ske.Cluster + if tt.wantResp { + wantRes = &ske.Cluster{ + Name: &name, + Status: &ske.ClusterStatus{ + Aggregated: utils.Ptr(tt.resourceState), + }, + } + } + + handler := TriggerClusterWakeupWaitHandler(context.Background(), apiClient, "", testRegion, name) + + gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + if !cmp.Equal(gotRes, wantRes) { + t.Fatalf("handler gotRes = %+v, want %+v", gotRes, wantRes) + } + }) + } +} + +func TestTriggerClusterReconciliationWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState ske.ClusterStatusState + wantErr bool + wantResp bool + }{ + { + description: "reconciliation ongoing (timeout)", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_RECONCILING, + wantErr: true, + wantResp: false, + }, + { + description: "reconciliation succeeded", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HEALTHY, + wantErr: false, + wantResp: true, + }, + { + description: "unexpected status", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_CREATING, + wantErr: false, + wantResp: true, + }, + { + description: "get_fails", + getFails: true, + wantErr: true, + wantResp: false, + }, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + name := "cluster" + + apiClient := newAPIMock(mockSettings{ + getFails: tt.getFails, + name: name, + resourceState: tt.resourceState, + }) + + var wantRes *ske.Cluster + if tt.wantResp { + wantRes = &ske.Cluster{ + Name: &name, + Status: &ske.ClusterStatus{ + Aggregated: utils.Ptr(tt.resourceState), + }, + } + } + + handler := TriggerClusterReconciliationWaitHandler(context.Background(), apiClient, "", testRegion, name) + + gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + if !cmp.Equal(gotRes, wantRes) { + t.Fatalf("handler gotRes = %+v, want %+v", gotRes, wantRes) + } + }) + } +} + +func TestRotateCredentialsWaitHandler(t *testing.T) { + tests := []struct { + desc string + getFails bool + resourceState ske.ClusterStatusState + wantErr bool + wantResp bool + }{ + { + desc: "reconciliation_succeeded_1", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HEALTHY, + wantErr: false, + wantResp: true, + }, + { + desc: "reconciliation_succeeded_2", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_HIBERNATED, + wantErr: false, + wantResp: true, + }, + { + desc: "get_fails", + getFails: true, + wantErr: true, + wantResp: false, + }, + { + desc: "timeout", + getFails: false, + resourceState: ske.CLUSTERSTATUSSTATE_STATE_RECONCILING, + wantErr: true, + wantResp: false, + }, + } + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + name := "cluster" + + apiClient := newAPIMock(mockSettings{ + getFails: tt.getFails, + name: name, + resourceState: tt.resourceState, + }) + + var wantRes *ske.Cluster + if tt.wantResp { + wantRes = &ske.Cluster{ + Name: &name, + Status: &ske.ClusterStatus{ + Aggregated: utils.Ptr(tt.resourceState), + }, + } + } + + handler := RotateCredentialsWaitHandler(context.Background(), apiClient, "", testRegion, name) + + gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + if !cmp.Equal(gotRes, wantRes) { + t.Fatalf("handler gotRes = %+v, want %+v", gotRes, wantRes) + } + }) + } +} diff --git a/services/ske/wait/deprecation.go b/services/ske/wait/deprecation.go new file mode 100644 index 000000000..58f184c09 --- /dev/null +++ b/services/ske/wait/deprecation.go @@ -0,0 +1,2 @@ +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package wait diff --git a/services/ske/wait/wait.go b/services/ske/wait/wait.go index e4745b09a..b508c853a 100644 --- a/services/ske/wait/wait.go +++ b/services/ske/wait/wait.go @@ -35,12 +35,14 @@ const ( InvalidArgusInstanceErrorCode = "SKE_ARGUS_INSTANCE_NOT_FOUND" ) +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClientClusterInterface interface { GetClusterExecute(ctx context.Context, projectId, region, name string) (*ske.Cluster, error) ListClustersExecute(ctx context.Context, projectId, region string) (*ske.ListClustersResponse, error) } // CreateOrUpdateClusterWaitHandler will wait for cluster creation or update +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func CreateOrUpdateClusterWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, name string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { s, err := a.GetClusterExecute(ctx, projectId, region, name) @@ -71,6 +73,7 @@ func CreateOrUpdateClusterWaitHandler(ctx context.Context, a APIClientClusterInt } // DeleteClusterWaitHandler will wait for cluster deletion +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func DeleteClusterWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, name string) *wait.AsyncActionHandler[ske.ListClustersResponse] { handler := wait.New(func() (waitFinished bool, response *ske.ListClustersResponse, err error) { s, err := a.ListClustersExecute(ctx, projectId, region) @@ -90,6 +93,7 @@ func DeleteClusterWaitHandler(ctx context.Context, a APIClientClusterInterface, return handler } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func TriggerClusterHibernationWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { cluster, err := a.GetClusterExecute(ctx, projectId, region, clusterName) @@ -108,6 +112,7 @@ func TriggerClusterHibernationWaitHandler(ctx context.Context, a APIClientCluste return handler } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func TriggerClusterMaintenanceWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { cluster, err := a.GetClusterExecute(ctx, projectId, region, clusterName) @@ -126,6 +131,7 @@ func TriggerClusterMaintenanceWaitHandler(ctx context.Context, a APIClientCluste return handler } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func TriggerClusterReconciliationWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { cluster, err := a.GetClusterExecute(ctx, projectId, region, clusterName) @@ -144,6 +150,7 @@ func TriggerClusterReconciliationWaitHandler(ctx context.Context, a APIClientClu return handler } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func TriggerClusterWakeupWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { cluster, err := a.GetClusterExecute(ctx, projectId, region, clusterName) @@ -163,6 +170,7 @@ func TriggerClusterWakeupWaitHandler(ctx context.Context, a APIClientClusterInte } // RotateCredentialsWaitHandler will wait for credentials rotation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func RotateCredentialsWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { s, err := a.GetClusterExecute(ctx, projectId, region, clusterName) @@ -191,6 +199,7 @@ func RotateCredentialsWaitHandler(ctx context.Context, a APIClientClusterInterfa } // StartCredentialsRotationWaitHandler will wait for credentials rotation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func StartCredentialsRotationWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { s, err := a.GetClusterExecute(ctx, projectId, region, clusterName) @@ -215,6 +224,7 @@ func StartCredentialsRotationWaitHandler(ctx context.Context, a APIClientCluster } // CompleteCredentialsRotationWaitHandler will wait for credentials rotation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func CompleteCredentialsRotationWaitHandler(ctx context.Context, a APIClientClusterInterface, projectId, region, clusterName string) *wait.AsyncActionHandler[ske.Cluster] { handler := wait.New(func() (waitFinished bool, response *ske.Cluster, err error) { s, err := a.GetClusterExecute(ctx, projectId, region, clusterName) diff --git a/services/sqlserverflex/CHANGELOG.md b/services/sqlserverflex/CHANGELOG.md index 8ded0ea9a..adee0188c 100644 --- a/services/sqlserverflex/CHANGELOG.md +++ b/services/sqlserverflex/CHANGELOG.md @@ -1,7 +1,7 @@ ## v1.5.0 - **Feature:** Introduction of multi API version support for the sqlserverflex SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062 - `v1api`: New package which can be used for communication with the sqlserverflex v1 API -- `v2api`: New package which can be used for communication with the sqlserverflex v1 API +- `v2api`: New package which can be used for communication with the sqlserverflex v2 API - `v3alpha1api`: New package which can be used for communication with the sqlserverflex v3 alpha1 API - `v3beta1api`: New package which can be used for communication with the sqlserverflex v3 beta1 API - **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.