diff --git a/services/edge/api_default.go b/services/edge/api_default.go index 830928d93..84e00d3e6 100644 --- a/services/edge/api_default.go +++ b/services/edge/api_default.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge 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 { /* CreateInstance Method for CreateInstance @@ -32,6 +34,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the instance is part of. @param regionId The STACKIT region the instance is part of. @return ApiCreateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateInstance(ctx context.Context, projectId string, regionId string) ApiCreateInstanceRequest /* @@ -42,6 +46,7 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @return Instance + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateInstanceExecute(ctx context.Context, projectId string, regionId string) (*Instance, error) /* @@ -53,11 +58,14 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param instanceId The full ID of the instance, -. @return ApiDeleteInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiDeleteInstanceRequest /* DeleteInstanceExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstanceExecute(ctx context.Context, projectId string, regionId string, instanceId string) error /* @@ -69,11 +77,14 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param displayName The instance display name. @return ApiDeleteInstanceByNameRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiDeleteInstanceByNameRequest /* DeleteInstanceByNameExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstanceByNameExecute(ctx context.Context, projectId string, regionId string, displayName string) error /* @@ -85,6 +96,8 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param instanceId The full ID of the instance, -. @return ApiGetInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetInstanceRequest /* @@ -96,6 +109,7 @@ type DefaultApi interface { @param instanceId The full ID of the instance, -. @return Instance + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstanceExecute(ctx context.Context, projectId string, regionId string, instanceId string) (*Instance, error) /* @@ -107,6 +121,8 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param displayName The instance display name. @return ApiGetInstanceByNameRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetInstanceByNameRequest /* @@ -118,6 +134,7 @@ type DefaultApi interface { @param displayName The instance display name. @return Instance + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstanceByNameExecute(ctx context.Context, projectId string, regionId string, displayName string) (*Instance, error) /* @@ -129,6 +146,8 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param instanceId The full ID of the instance, -. @return ApiGetKubeconfigByInstanceIdRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetKubeconfigByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetKubeconfigByInstanceIdRequest /* @@ -140,6 +159,7 @@ type DefaultApi interface { @param instanceId The full ID of the instance, -. @return Kubeconfig + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetKubeconfigByInstanceIdExecute(ctx context.Context, projectId string, regionId string, instanceId string) (*Kubeconfig, error) /* @@ -151,6 +171,8 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param displayName The instance display name. @return ApiGetKubeconfigByInstanceNameRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetKubeconfigByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetKubeconfigByInstanceNameRequest /* @@ -162,6 +184,7 @@ type DefaultApi interface { @param displayName The instance display name. @return Kubeconfig + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetKubeconfigByInstanceNameExecute(ctx context.Context, projectId string, regionId string, displayName string) (*Kubeconfig, error) /* @@ -173,6 +196,8 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param instanceId The instance UUID. @return ApiGetTokenByInstanceIdRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetTokenByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetTokenByInstanceIdRequest /* @@ -184,6 +209,7 @@ type DefaultApi interface { @param instanceId The instance UUID. @return Token + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetTokenByInstanceIdExecute(ctx context.Context, projectId string, regionId string, instanceId string) (*Token, error) /* @@ -195,6 +221,8 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param displayName The instance display name. @return ApiGetTokenByInstanceNameRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetTokenByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetTokenByInstanceNameRequest /* @@ -206,6 +234,7 @@ type DefaultApi interface { @param displayName The instance display name. @return Token + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetTokenByInstanceNameExecute(ctx context.Context, projectId string, regionId string, displayName string) (*Token, error) /* @@ -216,6 +245,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the instance is part of. @param regionId The STACKIT region the instance is part of. @return ApiListInstancesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstances(ctx context.Context, projectId string, regionId string) ApiListInstancesRequest /* @@ -226,6 +257,7 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @return InstanceList + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstancesExecute(ctx context.Context, projectId string, regionId string) (*InstanceList, error) /* @@ -234,6 +266,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListPlansGlobalRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListPlansGlobal(ctx context.Context) ApiListPlansGlobalRequest /* @@ -242,7 +276,7 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return PlanList - Deprecated: DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListPlansGlobalExecute(ctx context.Context) (*PlanList, error) /* @@ -252,6 +286,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The STACKIT portal project UUID the plan is part of. @return ApiListPlansProjectRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListPlansProject(ctx context.Context, projectId string) ApiListPlansProjectRequest /* @@ -261,6 +297,7 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the plan is part of. @return PlanList + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListPlansProjectExecute(ctx context.Context, projectId string) (*PlanList, error) /* @@ -272,11 +309,14 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param instanceId The full ID of the instance, -. @return ApiUpdateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiUpdateInstanceRequest /* UpdateInstanceExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstanceExecute(ctx context.Context, projectId string, regionId string, instanceId string) error /* @@ -288,85 +328,125 @@ type DefaultApi interface { @param regionId The STACKIT region the instance is part of. @param displayName The instance display name. @return ApiUpdateInstanceByNameRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiUpdateInstanceByNameRequest /* UpdateInstanceByNameExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstanceByNameExecute(ctx context.Context, projectId string, regionId string, displayName string) error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Instance, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteInstanceByNameRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Instance, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetInstanceByNameRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Instance, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetKubeconfigByInstanceIdRequest interface { // Expiration of the included token in seconds + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead ExpirationSeconds(expirationSeconds int64) ApiGetKubeconfigByInstanceIdRequest + // 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 ApiGetKubeconfigByInstanceNameRequest interface { // Expiration of the included token in seconds + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead ExpirationSeconds(expirationSeconds int64) ApiGetKubeconfigByInstanceNameRequest + // 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 ApiGetTokenByInstanceIdRequest interface { // Expiration of the token in seconds + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead ExpirationSeconds(expirationSeconds int64) ApiGetTokenByInstanceIdRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Token, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetTokenByInstanceNameRequest interface { // Expiration of the included token in seconds + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead ExpirationSeconds(expirationSeconds int64) ApiGetTokenByInstanceNameRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Token, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListInstancesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*InstanceList, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListPlansGlobalRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*PlanList, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListPlansProjectRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*PlanList, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateInstanceByNameRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateInstanceByNamePayload(updateInstanceByNamePayload UpdateInstanceByNamePayload) ApiUpdateInstanceByNameRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() 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 CreateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -375,11 +455,13 @@ type CreateInstanceRequest struct { createInstancePayload *CreateInstancePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { r.createInstancePayload = &createInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) Execute() (*Instance, error) { var ( localVarHTTPMethod = http.MethodPost @@ -489,7 +571,7 @@ func (r CreateInstanceRequest) Execute() (*Instance, error) { /* CreateInstance: Method for CreateInstance -Creates a new instance within the project. +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 The STACKIT portal project UUID the instance is part of. @@ -505,6 +587,7 @@ func (a *APIClient) CreateInstance(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) CreateInstanceExecute(ctx context.Context, projectId string, regionId string) (*Instance, error) { r := CreateInstanceRequest{ apiService: a.defaultApi, @@ -515,6 +598,7 @@ func (a *APIClient) CreateInstanceExecute(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 DeleteInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -523,6 +607,7 @@ type DeleteInstanceRequest struct { instanceId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteInstanceRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -631,7 +716,7 @@ func (r DeleteInstanceRequest) Execute() error { /* DeleteInstance: Method for DeleteInstance -Deletes the given instance. +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 The STACKIT portal project UUID the instance is part of. @@ -649,6 +734,7 @@ func (a *APIClient) DeleteInstance(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) DeleteInstanceExecute(ctx context.Context, projectId string, regionId string, instanceId string) error { r := DeleteInstanceRequest{ apiService: a.defaultApi, @@ -660,6 +746,7 @@ func (a *APIClient) DeleteInstanceExecute(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 DeleteInstanceByNameRequest struct { ctx context.Context apiService *DefaultApiService @@ -668,6 +755,7 @@ type DeleteInstanceByNameRequest struct { displayName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteInstanceByNameRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -776,7 +864,7 @@ func (r DeleteInstanceByNameRequest) Execute() error { /* DeleteInstanceByName: Method for DeleteInstanceByName -Deletes the given instance by name. +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 The STACKIT portal project UUID the instance is part of. @@ -794,6 +882,7 @@ func (a *APIClient) DeleteInstanceByName(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) DeleteInstanceByNameExecute(ctx context.Context, projectId string, regionId string, displayName string) error { r := DeleteInstanceByNameRequest{ apiService: a.defaultApi, @@ -805,6 +894,7 @@ func (a *APIClient) DeleteInstanceByNameExecute(ctx context.Context, projectId s return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -813,6 +903,7 @@ type GetInstanceRequest struct { instanceId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetInstanceRequest) Execute() (*Instance, error) { var ( localVarHTTPMethod = http.MethodGet @@ -932,7 +1023,7 @@ func (r GetInstanceRequest) Execute() (*Instance, error) { /* GetInstance: Method for GetInstance -Returns the details for the given instance. +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 The STACKIT portal project UUID the instance is part of. @@ -950,6 +1041,7 @@ func (a *APIClient) GetInstance(ctx context.Context, projectId string, regionId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, regionId string, instanceId string) (*Instance, error) { r := GetInstanceRequest{ apiService: a.defaultApi, @@ -961,6 +1053,7 @@ func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, re return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetInstanceByNameRequest struct { ctx context.Context apiService *DefaultApiService @@ -969,6 +1062,7 @@ type GetInstanceByNameRequest struct { displayName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetInstanceByNameRequest) Execute() (*Instance, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1088,7 +1182,7 @@ func (r GetInstanceByNameRequest) Execute() (*Instance, error) { /* GetInstanceByName: Method for GetInstanceByName -Returns the details for the given instance by name. +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 The STACKIT portal project UUID the instance is part of. @@ -1106,6 +1200,7 @@ func (a *APIClient) GetInstanceByName(ctx context.Context, projectId string, reg } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetInstanceByNameExecute(ctx context.Context, projectId string, regionId string, displayName string) (*Instance, error) { r := GetInstanceByNameRequest{ apiService: a.defaultApi, @@ -1117,6 +1212,7 @@ func (a *APIClient) GetInstanceByNameExecute(ctx context.Context, projectId stri return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetKubeconfigByInstanceIdRequest struct { ctx context.Context apiService *DefaultApiService @@ -1127,12 +1223,13 @@ type GetKubeconfigByInstanceIdRequest struct { } // Expiration of the included token in seconds - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetKubeconfigByInstanceIdRequest) ExpirationSeconds(expirationSeconds int64) ApiGetKubeconfigByInstanceIdRequest { r.expirationSeconds = &expirationSeconds return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetKubeconfigByInstanceIdRequest) Execute() (*Kubeconfig, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1255,7 +1352,7 @@ func (r GetKubeconfigByInstanceIdRequest) Execute() (*Kubeconfig, error) { /* GetKubeconfigByInstanceId: Method for GetKubeconfigByInstanceId -Returns the kubeconfig for the given instance. +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 The STACKIT portal project UUID the instance is part of. @@ -1273,6 +1370,7 @@ func (a *APIClient) GetKubeconfigByInstanceId(ctx context.Context, projectId str } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetKubeconfigByInstanceIdExecute(ctx context.Context, projectId string, regionId string, instanceId string) (*Kubeconfig, error) { r := GetKubeconfigByInstanceIdRequest{ apiService: a.defaultApi, @@ -1284,6 +1382,7 @@ func (a *APIClient) GetKubeconfigByInstanceIdExecute(ctx context.Context, projec return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetKubeconfigByInstanceNameRequest struct { ctx context.Context apiService *DefaultApiService @@ -1294,12 +1393,13 @@ type GetKubeconfigByInstanceNameRequest struct { } // Expiration of the included token in seconds - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetKubeconfigByInstanceNameRequest) ExpirationSeconds(expirationSeconds int64) ApiGetKubeconfigByInstanceNameRequest { r.expirationSeconds = &expirationSeconds return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetKubeconfigByInstanceNameRequest) Execute() (*Kubeconfig, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1422,7 +1522,7 @@ func (r GetKubeconfigByInstanceNameRequest) Execute() (*Kubeconfig, error) { /* GetKubeconfigByInstanceName: Method for GetKubeconfigByInstanceName -Returns the kubeconfig for the given instance. +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 The STACKIT portal project UUID the instance is part of. @@ -1440,6 +1540,7 @@ func (a *APIClient) GetKubeconfigByInstanceName(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) GetKubeconfigByInstanceNameExecute(ctx context.Context, projectId string, regionId string, displayName string) (*Kubeconfig, error) { r := GetKubeconfigByInstanceNameRequest{ apiService: a.defaultApi, @@ -1451,6 +1552,7 @@ func (a *APIClient) GetKubeconfigByInstanceNameExecute(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 GetTokenByInstanceIdRequest struct { ctx context.Context apiService *DefaultApiService @@ -1461,12 +1563,13 @@ type GetTokenByInstanceIdRequest struct { } // Expiration of the token in seconds - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetTokenByInstanceIdRequest) ExpirationSeconds(expirationSeconds int64) ApiGetTokenByInstanceIdRequest { r.expirationSeconds = &expirationSeconds return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetTokenByInstanceIdRequest) Execute() (*Token, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1589,7 +1692,7 @@ func (r GetTokenByInstanceIdRequest) Execute() (*Token, error) { /* GetTokenByInstanceId: Method for GetTokenByInstanceId -Returns an ServiceAccount token. +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 The STACKIT portal project UUID the instance is part of. @@ -1607,6 +1710,7 @@ func (a *APIClient) GetTokenByInstanceId(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) GetTokenByInstanceIdExecute(ctx context.Context, projectId string, regionId string, instanceId string) (*Token, error) { r := GetTokenByInstanceIdRequest{ apiService: a.defaultApi, @@ -1618,6 +1722,7 @@ func (a *APIClient) GetTokenByInstanceIdExecute(ctx context.Context, projectId s return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetTokenByInstanceNameRequest struct { ctx context.Context apiService *DefaultApiService @@ -1628,12 +1733,13 @@ type GetTokenByInstanceNameRequest struct { } // Expiration of the included token in seconds - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetTokenByInstanceNameRequest) ExpirationSeconds(expirationSeconds int64) ApiGetTokenByInstanceNameRequest { r.expirationSeconds = &expirationSeconds return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetTokenByInstanceNameRequest) Execute() (*Token, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1756,7 +1862,7 @@ func (r GetTokenByInstanceNameRequest) Execute() (*Token, error) { /* GetTokenByInstanceName: Method for GetTokenByInstanceName -Returns an ServiceAccount token. +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 The STACKIT portal project UUID the instance is part of. @@ -1774,6 +1880,7 @@ func (a *APIClient) GetTokenByInstanceName(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) GetTokenByInstanceNameExecute(ctx context.Context, projectId string, regionId string, displayName string) (*Token, error) { r := GetTokenByInstanceNameRequest{ apiService: a.defaultApi, @@ -1785,6 +1892,7 @@ func (a *APIClient) GetTokenByInstanceNameExecute(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 ListInstancesRequest struct { ctx context.Context apiService *DefaultApiService @@ -1792,6 +1900,7 @@ type ListInstancesRequest struct { regionId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListInstancesRequest) Execute() (*InstanceList, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1907,7 +2016,7 @@ func (r ListInstancesRequest) Execute() (*InstanceList, error) { /* ListInstances: Method for ListInstances -Returns a list of all instances within the project. +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 The STACKIT portal project UUID the instance is part of. @@ -1923,6 +2032,7 @@ func (a *APIClient) ListInstances(ctx context.Context, projectId string, regionI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string, regionId string) (*InstanceList, error) { r := ListInstancesRequest{ apiService: a.defaultApi, @@ -1933,11 +2043,13 @@ func (a *APIClient) ListInstancesExecute(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 ListPlansGlobalRequest struct { ctx context.Context apiService *DefaultApiService } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListPlansGlobalRequest) Execute() (*PlanList, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2051,7 +2163,7 @@ func (r ListPlansGlobalRequest) Execute() (*PlanList, error) { /* ListPlansGlobal: Method for ListPlansGlobal -Deprecated: DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead. +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(). @return ApiListPlansGlobalRequest @@ -2063,9 +2175,7 @@ func (a *APIClient) ListPlansGlobal(ctx context.Context) ApiListPlansGlobalReque } } -/* -Deprecated: DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead. -*/ +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListPlansGlobalExecute(ctx context.Context) (*PlanList, error) { r := ListPlansGlobalRequest{ apiService: a.defaultApi, @@ -2074,12 +2184,14 @@ func (a *APIClient) ListPlansGlobalExecute(ctx context.Context) (*PlanList, erro return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListPlansProjectRequest struct { ctx context.Context apiService *DefaultApiService projectId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListPlansProjectRequest) Execute() (*PlanList, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2194,7 +2306,7 @@ func (r ListPlansProjectRequest) Execute() (*PlanList, error) { /* ListPlansProject: Method for ListPlansProject -List all possible plans for the project. +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 The STACKIT portal project UUID the plan is part of. @@ -2208,6 +2320,7 @@ func (a *APIClient) ListPlansProject(ctx context.Context, projectId string) ApiL } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListPlansProjectExecute(ctx context.Context, projectId string) (*PlanList, error) { r := ListPlansProjectRequest{ apiService: a.defaultApi, @@ -2217,6 +2330,7 @@ func (a *APIClient) ListPlansProjectExecute(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 UpdateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -2226,11 +2340,13 @@ type UpdateInstanceRequest struct { updateInstancePayload *UpdateInstancePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { r.updateInstancePayload = &updateInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -2344,7 +2460,7 @@ func (r UpdateInstanceRequest) Execute() error { /* UpdateInstance: Method for UpdateInstance -Updates the given instance. +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 The STACKIT portal project UUID the instance is part of. @@ -2362,6 +2478,7 @@ func (a *APIClient) UpdateInstance(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) UpdateInstanceExecute(ctx context.Context, projectId string, regionId string, instanceId string) error { r := UpdateInstanceRequest{ apiService: a.defaultApi, @@ -2373,6 +2490,7 @@ func (a *APIClient) UpdateInstanceExecute(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 UpdateInstanceByNameRequest struct { ctx context.Context apiService *DefaultApiService @@ -2382,11 +2500,13 @@ type UpdateInstanceByNameRequest struct { updateInstanceByNamePayload *UpdateInstanceByNamePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceByNameRequest) UpdateInstanceByNamePayload(updateInstanceByNamePayload UpdateInstanceByNamePayload) ApiUpdateInstanceByNameRequest { r.updateInstanceByNamePayload = &updateInstanceByNamePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceByNameRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -2500,7 +2620,7 @@ func (r UpdateInstanceByNameRequest) Execute() error { /* UpdateInstanceByName: Method for UpdateInstanceByName -Updates the given instance. +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 The STACKIT portal project UUID the instance is part of. @@ -2518,6 +2638,7 @@ func (a *APIClient) UpdateInstanceByName(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) UpdateInstanceByNameExecute(ctx context.Context, projectId string, regionId string, displayName string) error { r := UpdateInstanceByNameRequest{ apiService: a.defaultApi, diff --git a/services/edge/client.go b/services/edge/client.go index c4cc299d2..cc0607032 100644 --- a/services/edge/client.go +++ b/services/edge/client.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -44,18 +45,21 @@ var ( // APIClient manages communication with the STACKIT Edge Cloud API API v1beta1 // 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/edge/configuration.go b/services/edge/configuration.go index 155e3dfc4..0bb848edb 100644 --- a/services/edge/configuration.go +++ b/services/edge/configuration.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge 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/edge/go.mod b/services/edge/go.mod index e0b8d5e5e..e6c632906 100644 --- a/services/edge/go.mod +++ b/services/edge/go.mod @@ -2,7 +2,7 @@ module github.com/stackitcloud/stackit-sdk-go/services/edge go 1.21 -require github.com/stackitcloud/stackit-sdk-go/core v0.21.1 +require github.com/stackitcloud/stackit-sdk-go/core v0.22.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect diff --git a/services/edge/go.sum b/services/edge/go.sum index ca103c909..195011dd5 100644 --- a/services/edge/go.sum +++ b/services/edge/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/edge/model_bad_request.go b/services/edge/model_bad_request.go index 59b511f11..592489389 100644 --- a/services/edge/model_bad_request.go +++ b/services/edge/model_bad_request.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &BadRequest{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetCodeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBadRequestGetCodeAttributeTypeOk(arg BadRequestGetCodeAttributeType) (ret BadRequestGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getBadRequestGetCodeAttributeTypeOk(arg BadRequestGetCodeAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBadRequestGetCodeAttributeType(arg *BadRequestGetCodeAttributeType, val BadRequestGetCodeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetCodeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetCodeRetType = string /* @@ -43,8 +50,10 @@ type BadRequestGetCodeRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBadRequestGetMessageAttributeTypeOk(arg BadRequestGetMessageAttributeType) (ret BadRequestGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getBadRequestGetMessageAttributeTypeOk(arg BadRequestGetMessageAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBadRequestGetMessageAttributeType(arg *BadRequestGetMessageAttributeType, val BadRequestGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetMessageRetType = string // BadRequest struct for BadRequest +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequest struct { Code BadRequestGetCodeAttributeType `json:"code,omitempty"` Message BadRequestGetMessageAttributeType `json:"message,omitempty"` @@ -69,6 +83,7 @@ type BadRequest 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 NewBadRequest() *BadRequest { this := BadRequest{} return &this @@ -77,12 +92,14 @@ func NewBadRequest() *BadRequest { // NewBadRequestWithDefaults instantiates a new BadRequest 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 NewBadRequestWithDefaults() *BadRequest { this := BadRequest{} 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 *BadRequest) GetCode() (res BadRequestGetCodeRetType) { res, _ = o.GetCodeOk() return @@ -90,22 +107,26 @@ func (o *BadRequest) GetCode() (res BadRequestGetCodeRetType) { // 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 *BadRequest) GetCodeOk() (ret BadRequestGetCodeRetType, ok bool) { return getBadRequestGetCodeAttributeTypeOk(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 *BadRequest) 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 *BadRequest) SetCode(v BadRequestGetCodeRetType) { setBadRequestGetCodeAttributeType(&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 *BadRequest) GetMessage() (res BadRequestGetMessageRetType) { res, _ = o.GetMessageOk() return @@ -113,21 +134,25 @@ func (o *BadRequest) GetMessage() (res BadRequestGetMessageRetType) { // 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 *BadRequest) GetMessageOk() (ret BadRequestGetMessageRetType, ok bool) { return getBadRequestGetMessageAttributeTypeOk(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 *BadRequest) 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 *BadRequest) SetMessage(v BadRequestGetMessageRetType) { setBadRequestGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o BadRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getBadRequestGetCodeAttributeTypeOk(o.Code); ok { @@ -139,37 +164,45 @@ func (o BadRequest) 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 NullableBadRequest struct { value *BadRequest isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBadRequest) Get() *BadRequest { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBadRequest) Set(val *BadRequest) { 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 NullableBadRequest) 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 *NullableBadRequest) 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 NewNullableBadRequest(val *BadRequest) *NullableBadRequest { return &NullableBadRequest{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 NullableBadRequest) 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 *NullableBadRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_create_instance_payload.go b/services/edge/model_create_instance_payload.go index b82c81439..09487f747 100644 --- a/services/edge/model_create_instance_payload.go +++ b/services/edge/model_create_instance_payload.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateInstancePayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetDescriptionAttributeTypeOk(arg CreateInstancePayloadGetDescriptionAttributeType) (ret CreateInstancePayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateInstancePayloadGetDescriptionAttributeTypeOk(arg CreateInstancePay return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetDescriptionAttributeType(arg *CreateInstancePayloadGetDescriptionAttributeType, val CreateInstancePayloadGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetDescriptionRetType = string /* @@ -43,8 +50,10 @@ type CreateInstancePayloadGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetDisplayNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetDisplayNameAttributeTypeOk(arg CreateInstancePayloadGetDisplayNameAttributeType) (ret CreateInstancePayloadGetDisplayNameRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getCreateInstancePayloadGetDisplayNameAttributeTypeOk(arg CreateInstancePay return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetDisplayNameAttributeType(arg *CreateInstancePayloadGetDisplayNameAttributeType, val CreateInstancePayloadGetDisplayNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetDisplayNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetDisplayNameRetType = string /* @@ -64,8 +77,10 @@ type CreateInstancePayloadGetDisplayNameRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetPlanIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetPlanIdAttributeTypeOk(arg CreateInstancePayloadGetPlanIdAttributeType) (ret CreateInstancePayloadGetPlanIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,14 +88,19 @@ func getCreateInstancePayloadGetPlanIdAttributeTypeOk(arg CreateInstancePayloadG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetPlanIdAttributeType(arg *CreateInstancePayloadGetPlanIdAttributeType, val CreateInstancePayloadGetPlanIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetPlanIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetPlanIdRetType = string // CreateInstancePayload struct for CreateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayload struct { // A user chosen description to distinguish multiple instances. Description CreateInstancePayloadGetDescriptionAttributeType `json:"description,omitempty"` @@ -92,12 +112,14 @@ type CreateInstancePayload struct { PlanId CreateInstancePayloadGetPlanIdAttributeType `json:"planId" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateInstancePayload CreateInstancePayload // NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(displayName CreateInstancePayloadGetDisplayNameArgType, planId CreateInstancePayloadGetPlanIdArgType) *CreateInstancePayload { this := CreateInstancePayload{} setCreateInstancePayloadGetDisplayNameAttributeType(&this.DisplayName, displayName) @@ -108,12 +130,14 @@ func NewCreateInstancePayload(displayName CreateInstancePayloadGetDisplayNameArg // NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { this := CreateInstancePayload{} return &this } // GetDescription returns the Description 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 *CreateInstancePayload) GetDescription() (res CreateInstancePayloadGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -121,22 +145,26 @@ func (o *CreateInstancePayload) GetDescription() (res CreateInstancePayloadGetDe // GetDescriptionOk returns a tuple with the Description 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 *CreateInstancePayload) GetDescriptionOk() (ret CreateInstancePayloadGetDescriptionRetType, ok bool) { return getCreateInstancePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription 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 *CreateInstancePayload) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetDescription(v CreateInstancePayloadGetDescriptionRetType) { setCreateInstancePayloadGetDescriptionAttributeType(&o.Description, v) } // GetDisplayName returns the DisplayName field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetDisplayName() (ret CreateInstancePayloadGetDisplayNameRetType) { ret, _ = o.GetDisplayNameOk() return ret @@ -144,16 +172,19 @@ func (o *CreateInstancePayload) GetDisplayName() (ret CreateInstancePayloadGetDi // GetDisplayNameOk returns a tuple with the DisplayName 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 *CreateInstancePayload) GetDisplayNameOk() (ret CreateInstancePayloadGetDisplayNameRetType, ok bool) { return getCreateInstancePayloadGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetDisplayName(v CreateInstancePayloadGetDisplayNameRetType) { setCreateInstancePayloadGetDisplayNameAttributeType(&o.DisplayName, v) } // GetPlanId returns the PlanId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetPlanId() (ret CreateInstancePayloadGetPlanIdRetType) { ret, _ = o.GetPlanIdOk() return ret @@ -161,15 +192,18 @@ func (o *CreateInstancePayload) GetPlanId() (ret CreateInstancePayloadGetPlanIdR // GetPlanIdOk returns a tuple with the PlanId 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 *CreateInstancePayload) GetPlanIdOk() (ret CreateInstancePayloadGetPlanIdRetType, ok bool) { return getCreateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetPlanId(v CreateInstancePayloadGetPlanIdRetType) { setCreateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstancePayloadGetDescriptionAttributeTypeOk(o.Description); ok { @@ -184,37 +218,45 @@ func (o CreateInstancePayload) 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 NullableCreateInstancePayload struct { value *CreateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { 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 NullableCreateInstancePayload) 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 *NullableCreateInstancePayload) 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 NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { return &NullableCreateInstancePayload{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 NullableCreateInstancePayload) 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 *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_instance.go b/services/edge/model_instance.go index 7552d64de..ea235fcab 100644 --- a/services/edge/model_instance.go +++ b/services/edge/model_instance.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -24,10 +25,16 @@ var _ MappedNullable = &Instance{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreatedAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreatedArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreatedRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetCreatedAttributeTypeOk(arg InstanceGetCreatedAttributeType) (ret InstanceGetCreatedRetType, ok bool) { if arg == nil { return ret, false @@ -35,6 +42,7 @@ func getInstanceGetCreatedAttributeTypeOk(arg InstanceGetCreatedAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetCreatedAttributeType(arg *InstanceGetCreatedAttributeType, val InstanceGetCreatedRetType) { *arg = &val } @@ -44,8 +52,10 @@ func setInstanceGetCreatedAttributeType(arg *InstanceGetCreatedAttributeType, va */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetDescriptionAttributeTypeOk(arg InstanceGetDescriptionAttributeType) (ret InstanceGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +63,15 @@ func getInstanceGetDescriptionAttributeTypeOk(arg InstanceGetDescriptionAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetDescriptionAttributeType(arg *InstanceGetDescriptionAttributeType, val InstanceGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetDescriptionRetType = string /* @@ -65,8 +79,10 @@ type InstanceGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetDisplayNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetDisplayNameAttributeTypeOk(arg InstanceGetDisplayNameAttributeType) (ret InstanceGetDisplayNameRetType, ok bool) { if arg == nil { return ret, false @@ -74,11 +90,15 @@ func getInstanceGetDisplayNameAttributeTypeOk(arg InstanceGetDisplayNameAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetDisplayNameAttributeType(arg *InstanceGetDisplayNameAttributeType, val InstanceGetDisplayNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetDisplayNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetDisplayNameRetType = string /* @@ -86,8 +106,10 @@ type InstanceGetDisplayNameRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetFrontendUrlAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetFrontendUrlAttributeTypeOk(arg InstanceGetFrontendUrlAttributeType) (ret InstanceGetFrontendUrlRetType, ok bool) { if arg == nil { return ret, false @@ -95,11 +117,15 @@ func getInstanceGetFrontendUrlAttributeTypeOk(arg InstanceGetFrontendUrlAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetFrontendUrlAttributeType(arg *InstanceGetFrontendUrlAttributeType, val InstanceGetFrontendUrlRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetFrontendUrlArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetFrontendUrlRetType = string /* @@ -107,8 +133,10 @@ type InstanceGetFrontendUrlRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret InstanceGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -116,11 +144,15 @@ func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret Instan return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetIdAttributeType(arg *InstanceGetIdAttributeType, val InstanceGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdRetType = string /* @@ -128,8 +160,10 @@ type InstanceGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetPlanIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetPlanIdAttributeTypeOk(arg InstanceGetPlanIdAttributeType) (ret InstanceGetPlanIdRetType, ok bool) { if arg == nil { return ret, false @@ -137,11 +171,15 @@ func getInstanceGetPlanIdAttributeTypeOk(arg InstanceGetPlanIdAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetPlanIdAttributeType(arg *InstanceGetPlanIdAttributeType, val InstanceGetPlanIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetPlanIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetPlanIdRetType = string /* @@ -152,17 +190,23 @@ type InstanceGetPlanIdRetType = string // InstanceStatus The current status of the instance. // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceStatus string // List of Status const ( - INSTANCESTATUS_ERROR InstanceStatus = "error" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_ERROR InstanceStatus = "error" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead INSTANCESTATUS_RECONCILING InstanceStatus = "reconciling" - INSTANCESTATUS_ACTIVE InstanceStatus = "active" - INSTANCESTATUS_DELETING InstanceStatus = "deleting" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_ACTIVE InstanceStatus = "active" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_DELETING InstanceStatus = "deleting" ) // All allowed values of Instance enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedInstanceStatusEnumValues = []InstanceStatus{ "error", "reconciling", @@ -170,6 +214,7 @@ var AllowedInstanceStatusEnumValues = []InstanceStatus{ "deleting", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *InstanceStatus) 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 @@ -197,6 +242,7 @@ func (v *InstanceStatus) UnmarshalJSON(src []byte) error { // NewInstanceStatusFromValue returns a pointer to a valid InstanceStatus // 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 NewInstanceStatusFromValue(v InstanceStatus) (*InstanceStatus, error) { ev := InstanceStatus(v) if ev.IsValid() { @@ -207,6 +253,7 @@ func NewInstanceStatusFromValue(v InstanceStatus) (*InstanceStatus, 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 InstanceStatus) IsValid() bool { for _, existing := range AllowedInstanceStatusEnumValues { if existing == v { @@ -217,50 +264,65 @@ func (v InstanceStatus) IsValid() bool { } // Ptr returns reference to StatusStatus value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v InstanceStatus) Ptr() *InstanceStatus { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInstanceStatus struct { value *InstanceStatus isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceStatus) Get() *InstanceStatus { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceStatus) Set(val *InstanceStatus) { 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 NullableInstanceStatus) 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 *NullableInstanceStatus) 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 NewNullableInstanceStatus(val *InstanceStatus) *NullableInstanceStatus { return &NullableInstanceStatus{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 NullableInstanceStatus) 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 *NullableInstanceStatus) 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 InstanceGetStatusAttributeType = *InstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStatusArgType = InstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStatusRetType = InstanceStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetStatusAttributeTypeOk(arg InstanceGetStatusAttributeType) (ret InstanceGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -268,11 +330,13 @@ func getInstanceGetStatusAttributeTypeOk(arg InstanceGetStatusAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetStatusAttributeType(arg *InstanceGetStatusAttributeType, val InstanceGetStatusRetType) { *arg = &val } // Instance struct for Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Instance struct { // The date and time the creation of the instance was triggered. // REQUIRED @@ -296,12 +360,14 @@ type Instance struct { Status InstanceGetStatusAttributeType `json:"status" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Instance Instance // NewInstance instantiates a new Instance 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 NewInstance(created InstanceGetCreatedArgType, displayName InstanceGetDisplayNameArgType, frontendUrl InstanceGetFrontendUrlArgType, id InstanceGetIdArgType, planId InstanceGetPlanIdArgType, status InstanceGetStatusArgType) *Instance { this := Instance{} setInstanceGetCreatedAttributeType(&this.Created, created) @@ -316,12 +382,14 @@ func NewInstance(created InstanceGetCreatedArgType, displayName InstanceGetDispl // NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { this := Instance{} return &this } // GetCreated returns the Created field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetCreated() (ret InstanceGetCreatedRetType) { ret, _ = o.GetCreatedOk() return ret @@ -329,16 +397,19 @@ func (o *Instance) GetCreated() (ret InstanceGetCreatedRetType) { // GetCreatedOk returns a tuple with the Created 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 *Instance) GetCreatedOk() (ret InstanceGetCreatedRetType, ok bool) { return getInstanceGetCreatedAttributeTypeOk(o.Created) } // SetCreated sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetCreated(v InstanceGetCreatedRetType) { setInstanceGetCreatedAttributeType(&o.Created, v) } // GetDescription returns the Description 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 *Instance) GetDescription() (res InstanceGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -346,22 +417,26 @@ func (o *Instance) GetDescription() (res InstanceGetDescriptionRetType) { // GetDescriptionOk returns a tuple with the Description 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 *Instance) GetDescriptionOk() (ret InstanceGetDescriptionRetType, ok bool) { return getInstanceGetDescriptionAttributeTypeOk(o.Description) } // HasDescription 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 *Instance) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetDescription(v InstanceGetDescriptionRetType) { setInstanceGetDescriptionAttributeType(&o.Description, v) } // GetDisplayName returns the DisplayName field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetDisplayName() (ret InstanceGetDisplayNameRetType) { ret, _ = o.GetDisplayNameOk() return ret @@ -369,16 +444,19 @@ func (o *Instance) GetDisplayName() (ret InstanceGetDisplayNameRetType) { // GetDisplayNameOk returns a tuple with the DisplayName 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 *Instance) GetDisplayNameOk() (ret InstanceGetDisplayNameRetType, ok bool) { return getInstanceGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetDisplayName(v InstanceGetDisplayNameRetType) { setInstanceGetDisplayNameAttributeType(&o.DisplayName, v) } // GetFrontendUrl returns the FrontendUrl field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetFrontendUrl() (ret InstanceGetFrontendUrlRetType) { ret, _ = o.GetFrontendUrlOk() return ret @@ -386,16 +464,19 @@ func (o *Instance) GetFrontendUrl() (ret InstanceGetFrontendUrlRetType) { // GetFrontendUrlOk returns a tuple with the FrontendUrl 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 *Instance) GetFrontendUrlOk() (ret InstanceGetFrontendUrlRetType, ok bool) { return getInstanceGetFrontendUrlAttributeTypeOk(o.FrontendUrl) } // SetFrontendUrl sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetFrontendUrl(v InstanceGetFrontendUrlRetType) { setInstanceGetFrontendUrlAttributeType(&o.FrontendUrl, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetId() (ret InstanceGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -403,16 +484,19 @@ func (o *Instance) GetId() (ret InstanceGetIdRetType) { // GetIdOk returns a tuple with the Id 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 *Instance) GetIdOk() (ret InstanceGetIdRetType, ok bool) { return getInstanceGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetId(v InstanceGetIdRetType) { setInstanceGetIdAttributeType(&o.Id, v) } // GetPlanId returns the PlanId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetPlanId() (ret InstanceGetPlanIdRetType) { ret, _ = o.GetPlanIdOk() return ret @@ -420,16 +504,19 @@ func (o *Instance) GetPlanId() (ret InstanceGetPlanIdRetType) { // GetPlanIdOk returns a tuple with the PlanId 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 *Instance) GetPlanIdOk() (ret InstanceGetPlanIdRetType, ok bool) { return getInstanceGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetPlanId(v InstanceGetPlanIdRetType) { setInstanceGetPlanIdAttributeType(&o.PlanId, v) } // GetStatus returns the Status field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetStatus() (ret InstanceGetStatusRetType) { ret, _ = o.GetStatusOk() return ret @@ -437,15 +524,18 @@ func (o *Instance) GetStatus() (ret InstanceGetStatusRetType) { // GetStatusOk returns a tuple with the Status 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 *Instance) GetStatusOk() (ret InstanceGetStatusRetType, ok bool) { return getInstanceGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetStatus(v InstanceGetStatusRetType) { setInstanceGetStatusAttributeType(&o.Status, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceGetCreatedAttributeTypeOk(o.Created); ok { @@ -472,37 +562,45 @@ func (o Instance) 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 NullableInstance struct { value *Instance isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstance) Get() *Instance { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstance) Set(val *Instance) { 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 NullableInstance) 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 *NullableInstance) 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 NewNullableInstance(val *Instance) *NullableInstance { return &NullableInstance{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 NullableInstance) 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 *NullableInstance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_instance_list.go b/services/edge/model_instance_list.go index 222d96a33..4bd23426d 100644 --- a/services/edge/model_instance_list.go +++ b/services/edge/model_instance_list.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &InstanceList{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListGetInstancesAttributeType = *[]Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListGetInstancesArgType = []Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListGetInstancesRetType = []Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceListGetInstancesAttributeTypeOk(arg InstanceListGetInstancesAttributeType) (ret InstanceListGetInstancesRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getInstanceListGetInstancesAttributeTypeOk(arg InstanceListGetInstancesAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceListGetInstancesAttributeType(arg *InstanceListGetInstancesAttributeType, val InstanceListGetInstancesRetType) { *arg = &val } // InstanceList struct for InstanceList +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceList struct { // REQUIRED Instances InstanceListGetInstancesAttributeType `json:"instances" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _InstanceList InstanceList // NewInstanceList instantiates a new InstanceList 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 NewInstanceList(instances InstanceListGetInstancesArgType) *InstanceList { this := InstanceList{} setInstanceListGetInstancesAttributeType(&this.Instances, instances) @@ -58,12 +69,14 @@ func NewInstanceList(instances InstanceListGetInstancesArgType) *InstanceList { // NewInstanceListWithDefaults instantiates a new InstanceList 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 NewInstanceListWithDefaults() *InstanceList { this := InstanceList{} return &this } // GetInstances returns the Instances field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceList) GetInstances() (ret InstanceListGetInstancesRetType) { ret, _ = o.GetInstancesOk() return ret @@ -71,15 +84,18 @@ func (o *InstanceList) GetInstances() (ret InstanceListGetInstancesRetType) { // GetInstancesOk returns a tuple with the Instances 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 *InstanceList) GetInstancesOk() (ret InstanceListGetInstancesRetType, ok bool) { return getInstanceListGetInstancesAttributeTypeOk(o.Instances) } // SetInstances sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceList) SetInstances(v InstanceListGetInstancesRetType) { setInstanceListGetInstancesAttributeType(&o.Instances, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o InstanceList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceListGetInstancesAttributeTypeOk(o.Instances); ok { @@ -88,37 +104,45 @@ func (o InstanceList) 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 NullableInstanceList struct { value *InstanceList isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceList) Get() *InstanceList { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceList) Set(val *InstanceList) { 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 NullableInstanceList) 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 *NullableInstanceList) 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 NewNullableInstanceList(val *InstanceList) *NullableInstanceList { return &NullableInstanceList{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 NullableInstanceList) 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 *NullableInstanceList) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_kubeconfig.go b/services/edge/model_kubeconfig.go index 87e3f48e4..ed9aabb7c 100644 --- a/services/edge/model_kubeconfig.go +++ b/services/edge/model_kubeconfig.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Kubeconfig{} */ // isFreeform +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetKubeconfigAttributeType = *map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetKubeconfigArgType = map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KubeconfigGetKubeconfigRetType = map[string]interface{} +// 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 @@ -33,23 +40,27 @@ 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 } // 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 { // The kubeconfig for the instance. // REQUIRED Kubeconfig KubeconfigGetKubeconfigAttributeType `json:"kubeconfig" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Kubeconfig Kubeconfig // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewKubeconfig(kubeconfig KubeconfigGetKubeconfigArgType) *Kubeconfig { this := Kubeconfig{} setKubeconfigGetKubeconfigAttributeType(&this.Kubeconfig, kubeconfig) @@ -59,12 +70,14 @@ func NewKubeconfig(kubeconfig KubeconfigGetKubeconfigArgType) *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 } // GetKubeconfig returns the Kubeconfig field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Kubeconfig) GetKubeconfig() (ret KubeconfigGetKubeconfigRetType) { ret, _ = o.GetKubeconfigOk() return ret @@ -72,15 +85,18 @@ func (o *Kubeconfig) GetKubeconfig() (ret KubeconfigGetKubeconfigRetType) { // GetKubeconfigOk returns a tuple with the Kubeconfig 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 *Kubeconfig) GetKubeconfigOk() (ret KubeconfigGetKubeconfigRetType, ok bool) { return getKubeconfigGetKubeconfigAttributeTypeOk(o.Kubeconfig) } // SetKubeconfig sets field value +// 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 := getKubeconfigGetKubeconfigAttributeTypeOk(o.Kubeconfig); ok { @@ -89,37 +105,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/edge/model_plan.go b/services/edge/model_plan.go index 265dd8173..49e8ef521 100644 --- a/services/edge/model_plan.go +++ b/services/edge/model_plan.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Plan{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPlanGetDescriptionAttributeTypeOk(arg PlanGetDescriptionAttributeType) (ret PlanGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getPlanGetDescriptionAttributeTypeOk(arg PlanGetDescriptionAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPlanGetDescriptionAttributeType(arg *PlanGetDescriptionAttributeType, val PlanGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetDescriptionRetType = string /* @@ -43,8 +50,10 @@ type PlanGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPlanGetIdAttributeTypeOk(arg PlanGetIdAttributeType) (ret PlanGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getPlanGetIdAttributeTypeOk(arg PlanGetIdAttributeType) (ret PlanGetIdRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPlanGetIdAttributeType(arg *PlanGetIdAttributeType, val PlanGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetIdRetType = string /* @@ -64,10 +77,16 @@ type PlanGetIdRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetMaxEdgeHostsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetMaxEdgeHostsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetMaxEdgeHostsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPlanGetMaxEdgeHostsAttributeTypeOk(arg PlanGetMaxEdgeHostsAttributeType) (ret PlanGetMaxEdgeHostsRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +94,7 @@ func getPlanGetMaxEdgeHostsAttributeTypeOk(arg PlanGetMaxEdgeHostsAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPlanGetMaxEdgeHostsAttributeType(arg *PlanGetMaxEdgeHostsAttributeType, val PlanGetMaxEdgeHostsRetType) { *arg = &val } @@ -84,8 +104,10 @@ func setPlanGetMaxEdgeHostsAttributeType(arg *PlanGetMaxEdgeHostsAttributeType, */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPlanGetNameAttributeTypeOk(arg PlanGetNameAttributeType) (ret PlanGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -93,14 +115,19 @@ func getPlanGetNameAttributeTypeOk(arg PlanGetNameAttributeType) (ret PlanGetNam return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPlanGetNameAttributeType(arg *PlanGetNameAttributeType, val PlanGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanGetNameRetType = string // Plan struct for Plan +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Plan struct { // Description Description PlanGetDescriptionAttributeType `json:"description,omitempty"` @@ -117,6 +144,7 @@ type Plan 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 NewPlan() *Plan { this := Plan{} return &this @@ -125,12 +153,14 @@ func NewPlan() *Plan { // NewPlanWithDefaults instantiates a new Plan 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 NewPlanWithDefaults() *Plan { this := Plan{} return &this } // GetDescription returns the Description 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 *Plan) GetDescription() (res PlanGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -138,22 +168,26 @@ func (o *Plan) GetDescription() (res PlanGetDescriptionRetType) { // GetDescriptionOk returns a tuple with the Description 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 *Plan) GetDescriptionOk() (ret PlanGetDescriptionRetType, ok bool) { return getPlanGetDescriptionAttributeTypeOk(o.Description) } // HasDescription 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 *Plan) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Plan) SetDescription(v PlanGetDescriptionRetType) { setPlanGetDescriptionAttributeType(&o.Description, 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 *Plan) GetId() (res PlanGetIdRetType) { res, _ = o.GetIdOk() return @@ -161,22 +195,26 @@ func (o *Plan) GetId() (res PlanGetIdRetType) { // 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 *Plan) GetIdOk() (ret PlanGetIdRetType, ok bool) { return getPlanGetIdAttributeTypeOk(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 *Plan) 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 *Plan) SetId(v PlanGetIdRetType) { setPlanGetIdAttributeType(&o.Id, v) } // GetMaxEdgeHosts returns the MaxEdgeHosts 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 *Plan) GetMaxEdgeHosts() (res PlanGetMaxEdgeHostsRetType) { res, _ = o.GetMaxEdgeHostsOk() return @@ -184,22 +222,26 @@ func (o *Plan) GetMaxEdgeHosts() (res PlanGetMaxEdgeHostsRetType) { // GetMaxEdgeHostsOk returns a tuple with the MaxEdgeHosts 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 *Plan) GetMaxEdgeHostsOk() (ret PlanGetMaxEdgeHostsRetType, ok bool) { return getPlanGetMaxEdgeHostsAttributeTypeOk(o.MaxEdgeHosts) } // HasMaxEdgeHosts 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 *Plan) HasMaxEdgeHosts() bool { _, ok := o.GetMaxEdgeHostsOk() return ok } // SetMaxEdgeHosts gets a reference to the given int64 and assigns it to the MaxEdgeHosts field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Plan) SetMaxEdgeHosts(v PlanGetMaxEdgeHostsRetType) { setPlanGetMaxEdgeHostsAttributeType(&o.MaxEdgeHosts, 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 *Plan) GetName() (res PlanGetNameRetType) { res, _ = o.GetNameOk() return @@ -207,21 +249,25 @@ func (o *Plan) GetName() (res PlanGetNameRetType) { // 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 *Plan) GetNameOk() (ret PlanGetNameRetType, ok bool) { return getPlanGetNameAttributeTypeOk(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 *Plan) 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 *Plan) SetName(v PlanGetNameRetType) { setPlanGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Plan) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPlanGetDescriptionAttributeTypeOk(o.Description); ok { @@ -239,37 +285,45 @@ func (o Plan) 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 NullablePlan struct { value *Plan isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePlan) Get() *Plan { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePlan) Set(val *Plan) { 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 NullablePlan) 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 *NullablePlan) 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 NewNullablePlan(val *Plan) *NullablePlan { return &NullablePlan{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 NullablePlan) 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 *NullablePlan) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_plan_list.go b/services/edge/model_plan_list.go index c625d8a0f..0b0d7b591 100644 --- a/services/edge/model_plan_list.go +++ b/services/edge/model_plan_list.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &PlanList{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanListGetValidPlansAttributeType = *[]Plan + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanListGetValidPlansArgType = []Plan + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanListGetValidPlansRetType = []Plan +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPlanListGetValidPlansAttributeTypeOk(arg PlanListGetValidPlansAttributeType) (ret PlanListGetValidPlansRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getPlanListGetValidPlansAttributeTypeOk(arg PlanListGetValidPlansAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPlanListGetValidPlansAttributeType(arg *PlanListGetValidPlansAttributeType, val PlanListGetValidPlansRetType) { *arg = &val } // PlanList struct for PlanList +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PlanList struct { ValidPlans PlanListGetValidPlansAttributeType `json:"validPlans,omitempty"` } @@ -46,6 +55,7 @@ type PlanList 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 NewPlanList() *PlanList { this := PlanList{} return &this @@ -54,12 +64,14 @@ func NewPlanList() *PlanList { // NewPlanListWithDefaults instantiates a new PlanList 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 NewPlanListWithDefaults() *PlanList { this := PlanList{} return &this } // GetValidPlans returns the ValidPlans 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 *PlanList) GetValidPlans() (res PlanListGetValidPlansRetType) { res, _ = o.GetValidPlansOk() return @@ -67,21 +79,25 @@ func (o *PlanList) GetValidPlans() (res PlanListGetValidPlansRetType) { // GetValidPlansOk returns a tuple with the ValidPlans 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 *PlanList) GetValidPlansOk() (ret PlanListGetValidPlansRetType, ok bool) { return getPlanListGetValidPlansAttributeTypeOk(o.ValidPlans) } // HasValidPlans 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 *PlanList) HasValidPlans() bool { _, ok := o.GetValidPlansOk() return ok } // SetValidPlans gets a reference to the given []Plan and assigns it to the ValidPlans field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PlanList) SetValidPlans(v PlanListGetValidPlansRetType) { setPlanListGetValidPlansAttributeType(&o.ValidPlans, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PlanList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPlanListGetValidPlansAttributeTypeOk(o.ValidPlans); ok { @@ -90,37 +106,45 @@ func (o PlanList) 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 NullablePlanList struct { value *PlanList isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePlanList) Get() *PlanList { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePlanList) Set(val *PlanList) { 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 NullablePlanList) 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 *NullablePlanList) 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 NewNullablePlanList(val *PlanList) *NullablePlanList { return &NullablePlanList{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 NullablePlanList) 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 *NullablePlanList) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_token.go b/services/edge/model_token.go index 3650303ee..ccd1efd06 100644 --- a/services/edge/model_token.go +++ b/services/edge/model_token.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Token{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TokenGetTokenAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getTokenGetTokenAttributeTypeOk(arg TokenGetTokenAttributeType) (ret TokenGetTokenRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getTokenGetTokenAttributeTypeOk(arg TokenGetTokenAttributeType) (ret TokenG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setTokenGetTokenAttributeType(arg *TokenGetTokenAttributeType, val TokenGetTokenRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TokenGetTokenArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type TokenGetTokenRetType = string // Token struct for Token +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Token struct { // The token for the instance. // REQUIRED Token TokenGetTokenAttributeType `json:"token" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Token Token // NewToken instantiates a new Token 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 NewToken(token TokenGetTokenArgType) *Token { this := Token{} setTokenGetTokenAttributeType(&this.Token, token) @@ -60,12 +70,14 @@ func NewToken(token TokenGetTokenArgType) *Token { // NewTokenWithDefaults instantiates a new Token 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 NewTokenWithDefaults() *Token { this := Token{} return &this } // GetToken returns the Token field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Token) GetToken() (ret TokenGetTokenRetType) { ret, _ = o.GetTokenOk() return ret @@ -73,15 +85,18 @@ func (o *Token) GetToken() (ret TokenGetTokenRetType) { // GetTokenOk returns a tuple with the Token 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 *Token) GetTokenOk() (ret TokenGetTokenRetType, ok bool) { return getTokenGetTokenAttributeTypeOk(o.Token) } // SetToken sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Token) SetToken(v TokenGetTokenRetType) { setTokenGetTokenAttributeType(&o.Token, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Token) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getTokenGetTokenAttributeTypeOk(o.Token); ok { @@ -90,37 +105,45 @@ func (o Token) 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 NullableToken struct { value *Token isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableToken) Get() *Token { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableToken) Set(val *Token) { 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 NullableToken) 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 *NullableToken) 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 NewNullableToken(val *Token) *NullableToken { return &NullableToken{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 NullableToken) 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 *NullableToken) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_unauthorized_request.go b/services/edge/model_unauthorized_request.go index 2ebd9b891..db40094d3 100644 --- a/services/edge/model_unauthorized_request.go +++ b/services/edge/model_unauthorized_request.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UnauthorizedRequest{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequestGetCodeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUnauthorizedRequestGetCodeAttributeTypeOk(arg UnauthorizedRequestGetCodeAttributeType) (ret UnauthorizedRequestGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUnauthorizedRequestGetCodeAttributeTypeOk(arg UnauthorizedRequestGetCode return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUnauthorizedRequestGetCodeAttributeType(arg *UnauthorizedRequestGetCodeAttributeType, val UnauthorizedRequestGetCodeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequestGetCodeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequestGetCodeRetType = string /* @@ -43,8 +50,10 @@ type UnauthorizedRequestGetCodeRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequestGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUnauthorizedRequestGetMessageAttributeTypeOk(arg UnauthorizedRequestGetMessageAttributeType) (ret UnauthorizedRequestGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getUnauthorizedRequestGetMessageAttributeTypeOk(arg UnauthorizedRequestGetM return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUnauthorizedRequestGetMessageAttributeType(arg *UnauthorizedRequestGetMessageAttributeType, val UnauthorizedRequestGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequestGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequestGetMessageRetType = string // UnauthorizedRequest struct for UnauthorizedRequest +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UnauthorizedRequest struct { Code UnauthorizedRequestGetCodeAttributeType `json:"code,omitempty"` Message UnauthorizedRequestGetMessageAttributeType `json:"message,omitempty"` @@ -69,6 +83,7 @@ type UnauthorizedRequest 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 NewUnauthorizedRequest() *UnauthorizedRequest { this := UnauthorizedRequest{} return &this @@ -77,12 +92,14 @@ func NewUnauthorizedRequest() *UnauthorizedRequest { // NewUnauthorizedRequestWithDefaults instantiates a new UnauthorizedRequest 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 NewUnauthorizedRequestWithDefaults() *UnauthorizedRequest { this := UnauthorizedRequest{} 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 *UnauthorizedRequest) GetCode() (res UnauthorizedRequestGetCodeRetType) { res, _ = o.GetCodeOk() return @@ -90,22 +107,26 @@ func (o *UnauthorizedRequest) GetCode() (res UnauthorizedRequestGetCodeRetType) // 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 *UnauthorizedRequest) GetCodeOk() (ret UnauthorizedRequestGetCodeRetType, ok bool) { return getUnauthorizedRequestGetCodeAttributeTypeOk(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 *UnauthorizedRequest) 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 *UnauthorizedRequest) SetCode(v UnauthorizedRequestGetCodeRetType) { setUnauthorizedRequestGetCodeAttributeType(&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 *UnauthorizedRequest) GetMessage() (res UnauthorizedRequestGetMessageRetType) { res, _ = o.GetMessageOk() return @@ -113,21 +134,25 @@ func (o *UnauthorizedRequest) GetMessage() (res UnauthorizedRequestGetMessageRet // 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 *UnauthorizedRequest) GetMessageOk() (ret UnauthorizedRequestGetMessageRetType, ok bool) { return getUnauthorizedRequestGetMessageAttributeTypeOk(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 *UnauthorizedRequest) 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 *UnauthorizedRequest) SetMessage(v UnauthorizedRequestGetMessageRetType) { setUnauthorizedRequestGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UnauthorizedRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUnauthorizedRequestGetCodeAttributeTypeOk(o.Code); ok { @@ -139,37 +164,45 @@ func (o UnauthorizedRequest) 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 NullableUnauthorizedRequest struct { value *UnauthorizedRequest isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUnauthorizedRequest) Get() *UnauthorizedRequest { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUnauthorizedRequest) Set(val *UnauthorizedRequest) { 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 NullableUnauthorizedRequest) 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 *NullableUnauthorizedRequest) 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 NewNullableUnauthorizedRequest(val *UnauthorizedRequest) *NullableUnauthorizedRequest { return &NullableUnauthorizedRequest{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 NullableUnauthorizedRequest) 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 *NullableUnauthorizedRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_update_instance_by_name_payload.go b/services/edge/model_update_instance_by_name_payload.go index 50669641b..f68a74029 100644 --- a/services/edge/model_update_instance_by_name_payload.go +++ b/services/edge/model_update_instance_by_name_payload.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateInstanceByNamePayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayloadGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstanceByNamePayloadGetDescriptionAttributeTypeOk(arg UpdateInstanceByNamePayloadGetDescriptionAttributeType) (ret UpdateInstanceByNamePayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUpdateInstanceByNamePayloadGetDescriptionAttributeTypeOk(arg UpdateInsta return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstanceByNamePayloadGetDescriptionAttributeType(arg *UpdateInstanceByNamePayloadGetDescriptionAttributeType, val UpdateInstanceByNamePayloadGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayloadGetDescriptionRetType = string /* @@ -43,8 +50,10 @@ type UpdateInstanceByNamePayloadGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayloadGetPlanIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstanceByNamePayloadGetPlanIdAttributeTypeOk(arg UpdateInstanceByNamePayloadGetPlanIdAttributeType) (ret UpdateInstanceByNamePayloadGetPlanIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getUpdateInstanceByNamePayloadGetPlanIdAttributeTypeOk(arg UpdateInstanceBy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstanceByNamePayloadGetPlanIdAttributeType(arg *UpdateInstanceByNamePayloadGetPlanIdAttributeType, val UpdateInstanceByNamePayloadGetPlanIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayloadGetPlanIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayloadGetPlanIdRetType = string // UpdateInstanceByNamePayload struct for UpdateInstanceByNamePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceByNamePayload struct { // A user chosen description to distinguish multiple instances. Description UpdateInstanceByNamePayloadGetDescriptionAttributeType `json:"description,omitempty"` @@ -71,6 +85,7 @@ type UpdateInstanceByNamePayload 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 NewUpdateInstanceByNamePayload() *UpdateInstanceByNamePayload { this := UpdateInstanceByNamePayload{} return &this @@ -79,12 +94,14 @@ func NewUpdateInstanceByNamePayload() *UpdateInstanceByNamePayload { // NewUpdateInstanceByNamePayloadWithDefaults instantiates a new UpdateInstanceByNamePayload 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 NewUpdateInstanceByNamePayloadWithDefaults() *UpdateInstanceByNamePayload { this := UpdateInstanceByNamePayload{} return &this } // GetDescription returns the Description 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 *UpdateInstanceByNamePayload) GetDescription() (res UpdateInstanceByNamePayloadGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -92,22 +109,26 @@ func (o *UpdateInstanceByNamePayload) GetDescription() (res UpdateInstanceByName // GetDescriptionOk returns a tuple with the Description 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 *UpdateInstanceByNamePayload) GetDescriptionOk() (ret UpdateInstanceByNamePayloadGetDescriptionRetType, ok bool) { return getUpdateInstanceByNamePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription 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 *UpdateInstanceByNamePayload) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstanceByNamePayload) SetDescription(v UpdateInstanceByNamePayloadGetDescriptionRetType) { setUpdateInstanceByNamePayloadGetDescriptionAttributeType(&o.Description, v) } // GetPlanId returns the PlanId 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 *UpdateInstanceByNamePayload) GetPlanId() (res UpdateInstanceByNamePayloadGetPlanIdRetType) { res, _ = o.GetPlanIdOk() return @@ -115,21 +136,25 @@ func (o *UpdateInstanceByNamePayload) GetPlanId() (res UpdateInstanceByNamePaylo // GetPlanIdOk returns a tuple with the PlanId 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 *UpdateInstanceByNamePayload) GetPlanIdOk() (ret UpdateInstanceByNamePayloadGetPlanIdRetType, ok bool) { return getUpdateInstanceByNamePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId 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 *UpdateInstanceByNamePayload) HasPlanId() bool { _, ok := o.GetPlanIdOk() return ok } // SetPlanId gets a reference to the given string and assigns it to the PlanId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstanceByNamePayload) SetPlanId(v UpdateInstanceByNamePayloadGetPlanIdRetType) { setUpdateInstanceByNamePayloadGetPlanIdAttributeType(&o.PlanId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateInstanceByNamePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateInstanceByNamePayloadGetDescriptionAttributeTypeOk(o.Description); ok { @@ -141,37 +166,45 @@ func (o UpdateInstanceByNamePayload) 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 NullableUpdateInstanceByNamePayload struct { value *UpdateInstanceByNamePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstanceByNamePayload) Get() *UpdateInstanceByNamePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstanceByNamePayload) Set(val *UpdateInstanceByNamePayload) { 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 NullableUpdateInstanceByNamePayload) 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 *NullableUpdateInstanceByNamePayload) 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 NewNullableUpdateInstanceByNamePayload(val *UpdateInstanceByNamePayload) *NullableUpdateInstanceByNamePayload { return &NullableUpdateInstanceByNamePayload{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 NullableUpdateInstanceByNamePayload) 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 *NullableUpdateInstanceByNamePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_update_instance_payload.go b/services/edge/model_update_instance_payload.go index 76a25bdf4..8bdff74fb 100644 --- a/services/edge/model_update_instance_payload.go +++ b/services/edge/model_update_instance_payload.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateInstancePayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetDescriptionAttributeTypeOk(arg UpdateInstancePayloadGetDescriptionAttributeType) (ret UpdateInstancePayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUpdateInstancePayloadGetDescriptionAttributeTypeOk(arg UpdateInstancePay return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetDescriptionAttributeType(arg *UpdateInstancePayloadGetDescriptionAttributeType, val UpdateInstancePayloadGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetDescriptionRetType = string /* @@ -43,8 +50,10 @@ type UpdateInstancePayloadGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetPlanIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetPlanIdAttributeTypeOk(arg UpdateInstancePayloadGetPlanIdAttributeType) (ret UpdateInstancePayloadGetPlanIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getUpdateInstancePayloadGetPlanIdAttributeTypeOk(arg UpdateInstancePayloadG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetPlanIdAttributeType(arg *UpdateInstancePayloadGetPlanIdAttributeType, val UpdateInstancePayloadGetPlanIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetPlanIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetPlanIdRetType = string // UpdateInstancePayload struct for UpdateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayload struct { // A user chosen description to distinguish multiple instances. Description UpdateInstancePayloadGetDescriptionAttributeType `json:"description,omitempty"` @@ -71,6 +85,7 @@ type UpdateInstancePayload 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 NewUpdateInstancePayload() *UpdateInstancePayload { this := UpdateInstancePayload{} return &this @@ -79,12 +94,14 @@ func NewUpdateInstancePayload() *UpdateInstancePayload { // NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { this := UpdateInstancePayload{} return &this } // GetDescription returns the Description 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 *UpdateInstancePayload) GetDescription() (res UpdateInstancePayloadGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -92,22 +109,26 @@ func (o *UpdateInstancePayload) GetDescription() (res UpdateInstancePayloadGetDe // GetDescriptionOk returns a tuple with the Description 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 *UpdateInstancePayload) GetDescriptionOk() (ret UpdateInstancePayloadGetDescriptionRetType, ok bool) { return getUpdateInstancePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription 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 *UpdateInstancePayload) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetDescription(v UpdateInstancePayloadGetDescriptionRetType) { setUpdateInstancePayloadGetDescriptionAttributeType(&o.Description, v) } // GetPlanId returns the PlanId 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 *UpdateInstancePayload) GetPlanId() (res UpdateInstancePayloadGetPlanIdRetType) { res, _ = o.GetPlanIdOk() return @@ -115,21 +136,25 @@ func (o *UpdateInstancePayload) GetPlanId() (res UpdateInstancePayloadGetPlanIdR // GetPlanIdOk returns a tuple with the PlanId 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 *UpdateInstancePayload) GetPlanIdOk() (ret UpdateInstancePayloadGetPlanIdRetType, ok bool) { return getUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId 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 *UpdateInstancePayload) HasPlanId() bool { _, ok := o.GetPlanIdOk() return ok } // SetPlanId gets a reference to the given string and assigns it to the PlanId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetPlanId(v UpdateInstancePayloadGetPlanIdRetType) { setUpdateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateInstancePayloadGetDescriptionAttributeTypeOk(o.Description); ok { @@ -141,37 +166,45 @@ func (o UpdateInstancePayload) 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 NullableUpdateInstancePayload struct { value *UpdateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { 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 NullableUpdateInstancePayload) 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 *NullableUpdateInstancePayload) 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 NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { return &NullableUpdateInstancePayload{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 NullableUpdateInstancePayload) 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 *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/model_user.go b/services/edge/model_user.go index 436f1934d..925434bfd 100644 --- a/services/edge/model_user.go +++ b/services/edge/model_user.go @@ -8,6 +8,7 @@ API version: 1beta1 // 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 edge import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &User{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetEmailAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetEmailAttributeTypeOk(arg UserGetEmailAttributeType) (ret UserGetEmailRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUserGetEmailAttributeTypeOk(arg UserGetEmailAttributeType) (ret UserGetE return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetEmailAttributeType(arg *UserGetEmailAttributeType, val UserGetEmailRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetEmailArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetEmailRetType = string /* @@ -43,8 +50,10 @@ type UserGetEmailRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetInternalIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetInternalIdAttributeTypeOk(arg UserGetInternalIdAttributeType) (ret UserGetInternalIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getUserGetInternalIdAttributeTypeOk(arg UserGetInternalIdAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetInternalIdAttributeType(arg *UserGetInternalIdAttributeType, val UserGetInternalIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetInternalIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetInternalIdRetType = string // User struct for User +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type User struct { // The email of the user. // REQUIRED @@ -69,12 +83,14 @@ type User struct { InternalId UserGetInternalIdAttributeType `json:"internalId" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _User User // NewUser instantiates a new User 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 NewUser(email UserGetEmailArgType, internalId UserGetInternalIdArgType) *User { this := User{} setUserGetEmailAttributeType(&this.Email, email) @@ -85,12 +101,14 @@ func NewUser(email UserGetEmailArgType, internalId UserGetInternalIdArgType) *Us // NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { this := User{} return &this } // GetEmail returns the Email field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetEmail() (ret UserGetEmailRetType) { ret, _ = o.GetEmailOk() return ret @@ -98,16 +116,19 @@ func (o *User) GetEmail() (ret UserGetEmailRetType) { // GetEmailOk returns a tuple with the Email 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 *User) GetEmailOk() (ret UserGetEmailRetType, ok bool) { return getUserGetEmailAttributeTypeOk(o.Email) } // SetEmail sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetEmail(v UserGetEmailRetType) { setUserGetEmailAttributeType(&o.Email, v) } // GetInternalId returns the InternalId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetInternalId() (ret UserGetInternalIdRetType) { ret, _ = o.GetInternalIdOk() return ret @@ -115,15 +136,18 @@ func (o *User) GetInternalId() (ret UserGetInternalIdRetType) { // GetInternalIdOk returns a tuple with the InternalId 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 *User) GetInternalIdOk() (ret UserGetInternalIdRetType, ok bool) { return getUserGetInternalIdAttributeTypeOk(o.InternalId) } // SetInternalId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetInternalId(v UserGetInternalIdRetType) { setUserGetInternalIdAttributeType(&o.InternalId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUserGetEmailAttributeTypeOk(o.Email); ok { @@ -135,37 +159,45 @@ func (o User) 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 NullableUser struct { value *User isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUser) Get() *User { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUser) Set(val *User) { 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 NullableUser) 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 *NullableUser) 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 NewNullableUser(val *User) *NullableUser { return &NullableUser{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 NullableUser) 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 *NullableUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/edge/oas_commit b/services/edge/oas_commit index 064e1081f..ec77cb063 100644 --- a/services/edge/oas_commit +++ b/services/edge/oas_commit @@ -1 +1 @@ -cfcfc32bc1ae335acecd7bf7ffb60354fdc565ab +ab3356e493e0efd28729e6c6b454fa694ebcc897 diff --git a/services/edge/utils.go b/services/edge/utils.go index 4cc8a5c7c..67ef5a8c4 100644 --- a/services/edge/utils.go +++ b/services/edge/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/edge/v1beta1api/api_default.go b/services/edge/v1beta1api/api_default.go new file mode 100644 index 000000000..2a24b5b3a --- /dev/null +++ b/services/edge/v1beta1api/api_default.go @@ -0,0 +1,2347 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1beta1api + +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 { + + /* + CreateInstance Method for CreateInstance + + Creates a new instance within the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @return ApiCreateInstanceRequest + */ + CreateInstance(ctx context.Context, projectId string, regionId string) ApiCreateInstanceRequest + + // CreateInstanceExecute executes the request + // @return Instance + CreateInstanceExecute(r ApiCreateInstanceRequest) (*Instance, error) + + /* + DeleteInstance Method for DeleteInstance + + Deletes the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiDeleteInstanceRequest + */ + DeleteInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiDeleteInstanceRequest + + // DeleteInstanceExecute executes the request + DeleteInstanceExecute(r ApiDeleteInstanceRequest) error + + /* + DeleteInstanceByName Method for DeleteInstanceByName + + Deletes the given instance by name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiDeleteInstanceByNameRequest + */ + DeleteInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiDeleteInstanceByNameRequest + + // DeleteInstanceByNameExecute executes the request + DeleteInstanceByNameExecute(r ApiDeleteInstanceByNameRequest) error + + /* + GetInstance Method for GetInstance + + Returns the details for the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiGetInstanceRequest + */ + GetInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetInstanceRequest + + // GetInstanceExecute executes the request + // @return Instance + GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) + + /* + GetInstanceByName Method for GetInstanceByName + + Returns the details for the given instance by name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiGetInstanceByNameRequest + */ + GetInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetInstanceByNameRequest + + // GetInstanceByNameExecute executes the request + // @return Instance + GetInstanceByNameExecute(r ApiGetInstanceByNameRequest) (*Instance, error) + + /* + GetKubeconfigByInstanceId Method for GetKubeconfigByInstanceId + + Returns the kubeconfig for the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiGetKubeconfigByInstanceIdRequest + */ + GetKubeconfigByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetKubeconfigByInstanceIdRequest + + // GetKubeconfigByInstanceIdExecute executes the request + // @return Kubeconfig + GetKubeconfigByInstanceIdExecute(r ApiGetKubeconfigByInstanceIdRequest) (*Kubeconfig, error) + + /* + GetKubeconfigByInstanceName Method for GetKubeconfigByInstanceName + + Returns the kubeconfig for the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiGetKubeconfigByInstanceNameRequest + */ + GetKubeconfigByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetKubeconfigByInstanceNameRequest + + // GetKubeconfigByInstanceNameExecute executes the request + // @return Kubeconfig + GetKubeconfigByInstanceNameExecute(r ApiGetKubeconfigByInstanceNameRequest) (*Kubeconfig, error) + + /* + GetTokenByInstanceId Method for GetTokenByInstanceId + + Returns an ServiceAccount token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The instance UUID. + @return ApiGetTokenByInstanceIdRequest + */ + GetTokenByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetTokenByInstanceIdRequest + + // GetTokenByInstanceIdExecute executes the request + // @return Token + GetTokenByInstanceIdExecute(r ApiGetTokenByInstanceIdRequest) (*Token, error) + + /* + GetTokenByInstanceName Method for GetTokenByInstanceName + + Returns an ServiceAccount token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiGetTokenByInstanceNameRequest + */ + GetTokenByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetTokenByInstanceNameRequest + + // GetTokenByInstanceNameExecute executes the request + // @return Token + GetTokenByInstanceNameExecute(r ApiGetTokenByInstanceNameRequest) (*Token, error) + + /* + ListInstances Method for ListInstances + + Returns a list of all instances within the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @return ApiListInstancesRequest + */ + ListInstances(ctx context.Context, projectId string, regionId string) ApiListInstancesRequest + + // ListInstancesExecute executes the request + // @return InstanceList + ListInstancesExecute(r ApiListInstancesRequest) (*InstanceList, error) + + /* + ListPlansGlobal Method for ListPlansGlobal + + DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPlansGlobalRequest + + Deprecated + */ + ListPlansGlobal(ctx context.Context) ApiListPlansGlobalRequest + + // ListPlansGlobalExecute executes the request + // @return PlanList + // Deprecated + ListPlansGlobalExecute(r ApiListPlansGlobalRequest) (*PlanList, error) + + /* + ListPlansProject Method for ListPlansProject + + List all possible plans for the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the plan is part of. + @return ApiListPlansProjectRequest + */ + ListPlansProject(ctx context.Context, projectId string) ApiListPlansProjectRequest + + // ListPlansProjectExecute executes the request + // @return PlanList + ListPlansProjectExecute(r ApiListPlansProjectRequest) (*PlanList, error) + + /* + UpdateInstance Method for UpdateInstance + + Updates the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiUpdateInstanceRequest + */ + UpdateInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiUpdateInstanceRequest + + // UpdateInstanceExecute executes the request + UpdateInstanceExecute(r ApiUpdateInstanceRequest) error + + /* + UpdateInstanceByName Method for UpdateInstanceByName + + Updates the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiUpdateInstanceByNameRequest + */ + UpdateInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiUpdateInstanceByNameRequest + + // UpdateInstanceByNameExecute executes the request + UpdateInstanceByNameExecute(r ApiUpdateInstanceByNameRequest) error +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + createInstancePayload *CreateInstancePayload +} + +func (r ApiCreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { + r.createInstancePayload = &createInstancePayload + return r +} + +func (r ApiCreateInstanceRequest) Execute() (*Instance, error) { + return r.ApiService.CreateInstanceExecute(r) +} + +/* +CreateInstance Method for CreateInstance + +Creates a new instance within the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @return ApiCreateInstanceRequest +*/ +func (a *DefaultAPIService) CreateInstance(ctx context.Context, projectId string, regionId string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + } +} + +// Execute executes the request +// +// @return Instance +func (a *DefaultAPIService) CreateInstanceExecute(r ApiCreateInstanceRequest) (*Instance, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Instance + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createInstancePayload == nil { + return localVarReturnValue, reportError("createInstancePayload 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.createInstancePayload + 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 UnauthorizedRequest + 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 + } + 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 ApiDeleteInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + instanceId string +} + +func (r ApiDeleteInstanceRequest) Execute() error { + return r.ApiService.DeleteInstanceExecute(r) +} + +/* +DeleteInstance Method for DeleteInstance + +Deletes the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiDeleteInstanceRequest +*/ +func (a *DefaultAPIService) DeleteInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.instanceId) > 16 { + return reportError("instanceId must have less than 16 elements") + } + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v UnauthorizedRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + return newErr + } + + return nil +} + +type ApiDeleteInstanceByNameRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + displayName string +} + +func (r ApiDeleteInstanceByNameRequest) Execute() error { + return r.ApiService.DeleteInstanceByNameExecute(r) +} + +/* +DeleteInstanceByName Method for DeleteInstanceByName + +Deletes the given instance by name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiDeleteInstanceByNameRequest +*/ +func (a *DefaultAPIService) DeleteInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiDeleteInstanceByNameRequest { + return ApiDeleteInstanceByNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteInstanceByNameExecute(r ApiDeleteInstanceByNameRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteInstanceByName") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"displayName"+"}", url.PathEscape(parameterValueToString(r.displayName, "displayName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.displayName) > 8 { + return reportError("displayName must have less than 8 elements") + } + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v UnauthorizedRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + return newErr + } + + return nil +} + +type ApiGetInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + instanceId string +} + +func (r ApiGetInstanceRequest) Execute() (*Instance, error) { + return r.ApiService.GetInstanceExecute(r) +} + +/* +GetInstance Method for GetInstance + +Returns the details for the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiGetInstanceRequest +*/ +func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return Instance +func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Instance + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.instanceId) > 16 { + return localVarReturnValue, reportError("instanceId must have less than 16 elements") + } + + // 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiGetInstanceByNameRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + displayName string +} + +func (r ApiGetInstanceByNameRequest) Execute() (*Instance, error) { + return r.ApiService.GetInstanceByNameExecute(r) +} + +/* +GetInstanceByName Method for GetInstanceByName + +Returns the details for the given instance by name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiGetInstanceByNameRequest +*/ +func (a *DefaultAPIService) GetInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetInstanceByNameRequest { + return ApiGetInstanceByNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// Execute executes the request +// +// @return Instance +func (a *DefaultAPIService) GetInstanceByNameExecute(r ApiGetInstanceByNameRequest) (*Instance, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Instance + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstanceByName") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"displayName"+"}", url.PathEscape(parameterValueToString(r.displayName, "displayName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.displayName) > 8 { + return localVarReturnValue, reportError("displayName must have less than 8 elements") + } + + // 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiGetKubeconfigByInstanceIdRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + instanceId string + expirationSeconds *int64 +} + +// Expiration of the included token in seconds +func (r ApiGetKubeconfigByInstanceIdRequest) ExpirationSeconds(expirationSeconds int64) ApiGetKubeconfigByInstanceIdRequest { + r.expirationSeconds = &expirationSeconds + return r +} + +func (r ApiGetKubeconfigByInstanceIdRequest) Execute() (*Kubeconfig, error) { + return r.ApiService.GetKubeconfigByInstanceIdExecute(r) +} + +/* +GetKubeconfigByInstanceId Method for GetKubeconfigByInstanceId + +Returns the kubeconfig for the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiGetKubeconfigByInstanceIdRequest +*/ +func (a *DefaultAPIService) GetKubeconfigByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetKubeconfigByInstanceIdRequest { + return ApiGetKubeconfigByInstanceIdRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return Kubeconfig +func (a *DefaultAPIService) GetKubeconfigByInstanceIdExecute(r ApiGetKubeconfigByInstanceIdRequest) (*Kubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Kubeconfig + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetKubeconfigByInstanceId") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}/kubeconfig" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.instanceId) > 16 { + return localVarReturnValue, reportError("instanceId must have less than 16 elements") + } + + if r.expirationSeconds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", r.expirationSeconds, "form", "") + } else { + var defaultValue int64 = 3600 + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", defaultValue, "form", "") + r.expirationSeconds = &defaultValue + } + // 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiGetKubeconfigByInstanceNameRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + displayName string + expirationSeconds *int64 +} + +// Expiration of the included token in seconds +func (r ApiGetKubeconfigByInstanceNameRequest) ExpirationSeconds(expirationSeconds int64) ApiGetKubeconfigByInstanceNameRequest { + r.expirationSeconds = &expirationSeconds + return r +} + +func (r ApiGetKubeconfigByInstanceNameRequest) Execute() (*Kubeconfig, error) { + return r.ApiService.GetKubeconfigByInstanceNameExecute(r) +} + +/* +GetKubeconfigByInstanceName Method for GetKubeconfigByInstanceName + +Returns the kubeconfig for the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiGetKubeconfigByInstanceNameRequest +*/ +func (a *DefaultAPIService) GetKubeconfigByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetKubeconfigByInstanceNameRequest { + return ApiGetKubeconfigByInstanceNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// Execute executes the request +// +// @return Kubeconfig +func (a *DefaultAPIService) GetKubeconfigByInstanceNameExecute(r ApiGetKubeconfigByInstanceNameRequest) (*Kubeconfig, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Kubeconfig + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetKubeconfigByInstanceName") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}/kubeconfig" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"displayName"+"}", url.PathEscape(parameterValueToString(r.displayName, "displayName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.displayName) > 8 { + return localVarReturnValue, reportError("displayName must have less than 8 elements") + } + + if r.expirationSeconds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", r.expirationSeconds, "form", "") + } else { + var defaultValue int64 = 3600 + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", defaultValue, "form", "") + r.expirationSeconds = &defaultValue + } + // 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiGetTokenByInstanceIdRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + instanceId string + expirationSeconds *int64 +} + +// Expiration of the token in seconds +func (r ApiGetTokenByInstanceIdRequest) ExpirationSeconds(expirationSeconds int64) ApiGetTokenByInstanceIdRequest { + r.expirationSeconds = &expirationSeconds + return r +} + +func (r ApiGetTokenByInstanceIdRequest) Execute() (*Token, error) { + return r.ApiService.GetTokenByInstanceIdExecute(r) +} + +/* +GetTokenByInstanceId Method for GetTokenByInstanceId + +Returns an ServiceAccount token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The instance UUID. + @return ApiGetTokenByInstanceIdRequest +*/ +func (a *DefaultAPIService) GetTokenByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetTokenByInstanceIdRequest { + return ApiGetTokenByInstanceIdRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return Token +func (a *DefaultAPIService) GetTokenByInstanceIdExecute(r ApiGetTokenByInstanceIdRequest) (*Token, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Token + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetTokenByInstanceId") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}/token" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.instanceId) > 16 { + return localVarReturnValue, reportError("instanceId must have less than 16 elements") + } + + if r.expirationSeconds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", r.expirationSeconds, "form", "") + } else { + var defaultValue int64 = 3600 + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", defaultValue, "form", "") + r.expirationSeconds = &defaultValue + } + // 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiGetTokenByInstanceNameRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + displayName string + expirationSeconds *int64 +} + +// Expiration of the included token in seconds +func (r ApiGetTokenByInstanceNameRequest) ExpirationSeconds(expirationSeconds int64) ApiGetTokenByInstanceNameRequest { + r.expirationSeconds = &expirationSeconds + return r +} + +func (r ApiGetTokenByInstanceNameRequest) Execute() (*Token, error) { + return r.ApiService.GetTokenByInstanceNameExecute(r) +} + +/* +GetTokenByInstanceName Method for GetTokenByInstanceName + +Returns an ServiceAccount token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiGetTokenByInstanceNameRequest +*/ +func (a *DefaultAPIService) GetTokenByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetTokenByInstanceNameRequest { + return ApiGetTokenByInstanceNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// Execute executes the request +// +// @return Token +func (a *DefaultAPIService) GetTokenByInstanceNameExecute(r ApiGetTokenByInstanceNameRequest) (*Token, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Token + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetTokenByInstanceName") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}/token" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"displayName"+"}", url.PathEscape(parameterValueToString(r.displayName, "displayName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.displayName) > 8 { + return localVarReturnValue, reportError("displayName must have less than 8 elements") + } + + if r.expirationSeconds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", r.expirationSeconds, "form", "") + } else { + var defaultValue int64 = 3600 + parameterAddToHeaderOrQuery(localVarQueryParams, "expirationSeconds", defaultValue, "form", "") + r.expirationSeconds = &defaultValue + } + // 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiListInstancesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string +} + +func (r ApiListInstancesRequest) Execute() (*InstanceList, error) { + return r.ApiService.ListInstancesExecute(r) +} + +/* +ListInstances Method for ListInstances + +Returns a list of all instances within the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @return ApiListInstancesRequest +*/ +func (a *DefaultAPIService) ListInstances(ctx context.Context, projectId string, regionId string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + } +} + +// Execute executes the request +// +// @return InstanceList +func (a *DefaultAPIService) ListInstancesExecute(r ApiListInstancesRequest) (*InstanceList, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InstanceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListInstances") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiListPlansGlobalRequest struct { + ctx context.Context + ApiService DefaultAPI +} + +func (r ApiListPlansGlobalRequest) Execute() (*PlanList, error) { + return r.ApiService.ListPlansGlobalExecute(r) +} + +/* +ListPlansGlobal Method for ListPlansGlobal + +DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPlansGlobalRequest + +Deprecated +*/ +func (a *DefaultAPIService) ListPlansGlobal(ctx context.Context) ApiListPlansGlobalRequest { + return ApiListPlansGlobalRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PlanList +// +// Deprecated +func (a *DefaultAPIService) ListPlansGlobalExecute(r ApiListPlansGlobalRequest) (*PlanList, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PlanList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListPlansGlobal") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/plans" + + 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiListPlansProjectRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListPlansProjectRequest) Execute() (*PlanList, error) { + return r.ApiService.ListPlansProjectExecute(r) +} + +/* +ListPlansProject Method for ListPlansProject + +List all possible plans for the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the plan is part of. + @return ApiListPlansProjectRequest +*/ +func (a *DefaultAPIService) ListPlansProject(ctx context.Context, projectId string) ApiListPlansProjectRequest { + return ApiListPlansProjectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return PlanList +func (a *DefaultAPIService) ListPlansProjectExecute(r ApiListPlansProjectRequest) (*PlanList, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PlanList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListPlansProject") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/plans" + 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 BadRequest + 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 UnauthorizedRequest + 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 + } + 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 ApiUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + instanceId string + updateInstancePayload *UpdateInstancePayload +} + +func (r ApiUpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload + return r +} + +func (r ApiUpdateInstanceRequest) Execute() error { + return r.ApiService.UpdateInstanceExecute(r) +} + +/* +UpdateInstance Method for UpdateInstance + +Updates the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param instanceId The full ID of the instance, -. + @return ApiUpdateInstanceRequest +*/ +func (a *DefaultAPIService) UpdateInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateInstanceExecute(r ApiUpdateInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.instanceId) > 16 { + return reportError("instanceId must have less than 16 elements") + } + if r.updateInstancePayload == nil { + return reportError("updateInstancePayload 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.updateInstancePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v UnauthorizedRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + return newErr + } + + return nil +} + +type ApiUpdateInstanceByNameRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + regionId string + displayName string + updateInstanceByNamePayload *UpdateInstanceByNamePayload +} + +func (r ApiUpdateInstanceByNameRequest) UpdateInstanceByNamePayload(updateInstanceByNamePayload UpdateInstanceByNamePayload) ApiUpdateInstanceByNameRequest { + r.updateInstanceByNamePayload = &updateInstanceByNamePayload + return r +} + +func (r ApiUpdateInstanceByNameRequest) Execute() error { + return r.ApiService.UpdateInstanceByNameExecute(r) +} + +/* +UpdateInstanceByName Method for UpdateInstanceByName + +Updates the given instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the instance is part of. + @param regionId The STACKIT region the instance is part of. + @param displayName The instance display name. + @return ApiUpdateInstanceByNameRequest +*/ +func (a *DefaultAPIService) UpdateInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiUpdateInstanceByNameRequest { + return ApiUpdateInstanceByNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateInstanceByNameExecute(r ApiUpdateInstanceByNameRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateInstanceByName") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", url.PathEscape(parameterValueToString(r.regionId, "regionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"displayName"+"}", url.PathEscape(parameterValueToString(r.displayName, "displayName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.displayName) > 8 { + return reportError("displayName must have less than 8 elements") + } + if r.updateInstanceByNamePayload == nil { + return reportError("updateInstanceByNamePayload 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.updateInstanceByNamePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v UnauthorizedRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + return newErr + } + + return nil +} diff --git a/services/edge/v1beta1api/api_default_mock.go b/services/edge/v1beta1api/api_default_mock.go new file mode 100644 index 000000000..06580a197 --- /dev/null +++ b/services/edge/v1beta1api/api_default_mock.go @@ -0,0 +1,321 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +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 { + // CreateInstanceExecuteMock can be populated to implement the behavior of the CreateInstanceExecute function of this mock + CreateInstanceExecuteMock *func(r ApiCreateInstanceRequest) (*Instance, error) + // DeleteInstanceExecuteMock can be populated to implement the behavior of the DeleteInstanceExecute function of this mock + DeleteInstanceExecuteMock *func(r ApiDeleteInstanceRequest) error + // DeleteInstanceByNameExecuteMock can be populated to implement the behavior of the DeleteInstanceByNameExecute function of this mock + DeleteInstanceByNameExecuteMock *func(r ApiDeleteInstanceByNameRequest) error + // GetInstanceExecuteMock can be populated to implement the behavior of the GetInstanceExecute function of this mock + GetInstanceExecuteMock *func(r ApiGetInstanceRequest) (*Instance, error) + // GetInstanceByNameExecuteMock can be populated to implement the behavior of the GetInstanceByNameExecute function of this mock + GetInstanceByNameExecuteMock *func(r ApiGetInstanceByNameRequest) (*Instance, error) + // GetKubeconfigByInstanceIdExecuteMock can be populated to implement the behavior of the GetKubeconfigByInstanceIdExecute function of this mock + GetKubeconfigByInstanceIdExecuteMock *func(r ApiGetKubeconfigByInstanceIdRequest) (*Kubeconfig, error) + // GetKubeconfigByInstanceNameExecuteMock can be populated to implement the behavior of the GetKubeconfigByInstanceNameExecute function of this mock + GetKubeconfigByInstanceNameExecuteMock *func(r ApiGetKubeconfigByInstanceNameRequest) (*Kubeconfig, error) + // GetTokenByInstanceIdExecuteMock can be populated to implement the behavior of the GetTokenByInstanceIdExecute function of this mock + GetTokenByInstanceIdExecuteMock *func(r ApiGetTokenByInstanceIdRequest) (*Token, error) + // GetTokenByInstanceNameExecuteMock can be populated to implement the behavior of the GetTokenByInstanceNameExecute function of this mock + GetTokenByInstanceNameExecuteMock *func(r ApiGetTokenByInstanceNameRequest) (*Token, error) + // ListInstancesExecuteMock can be populated to implement the behavior of the ListInstancesExecute function of this mock + ListInstancesExecuteMock *func(r ApiListInstancesRequest) (*InstanceList, error) + // Deprecated: ListPlansGlobalExecuteMock can be populated to implement the behavior of the ListPlansGlobalExecute function of this mock + ListPlansGlobalExecuteMock *func(r ApiListPlansGlobalRequest) (*PlanList, error) + // ListPlansProjectExecuteMock can be populated to implement the behavior of the ListPlansProjectExecute function of this mock + ListPlansProjectExecuteMock *func(r ApiListPlansProjectRequest) (*PlanList, error) + // UpdateInstanceExecuteMock can be populated to implement the behavior of the UpdateInstanceExecute function of this mock + UpdateInstanceExecuteMock *func(r ApiUpdateInstanceRequest) error + // UpdateInstanceByNameExecuteMock can be populated to implement the behavior of the UpdateInstanceByNameExecute function of this mock + UpdateInstanceByNameExecuteMock *func(r ApiUpdateInstanceByNameRequest) error +} + +func (a DefaultAPIServiceMock) CreateInstance(ctx context.Context, projectId string, regionId string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + } +} + +// CreateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateInstanceExecute(r ApiCreateInstanceRequest) (*Instance, error) { + if a.CreateInstanceExecuteMock == nil { + var localVarReturnValue *Instance + return localVarReturnValue, nil + } + + return (*a.CreateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// DeleteInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + if a.DeleteInstanceExecuteMock == nil { + return nil + } + + return (*a.DeleteInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiDeleteInstanceByNameRequest { + return ApiDeleteInstanceByNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// DeleteInstanceByNameExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteInstanceByNameExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteInstanceByNameExecute(r ApiDeleteInstanceByNameRequest) error { + if a.DeleteInstanceByNameExecuteMock == nil { + return nil + } + + return (*a.DeleteInstanceByNameExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// GetInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) { + if a.GetInstanceExecuteMock == nil { + var localVarReturnValue *Instance + return localVarReturnValue, nil + } + + return (*a.GetInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetInstanceByNameRequest { + return ApiGetInstanceByNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// GetInstanceByNameExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetInstanceByNameExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetInstanceByNameExecute(r ApiGetInstanceByNameRequest) (*Instance, error) { + if a.GetInstanceByNameExecuteMock == nil { + var localVarReturnValue *Instance + return localVarReturnValue, nil + } + + return (*a.GetInstanceByNameExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetKubeconfigByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetKubeconfigByInstanceIdRequest { + return ApiGetKubeconfigByInstanceIdRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// GetKubeconfigByInstanceIdExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetKubeconfigByInstanceIdExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetKubeconfigByInstanceIdExecute(r ApiGetKubeconfigByInstanceIdRequest) (*Kubeconfig, error) { + if a.GetKubeconfigByInstanceIdExecuteMock == nil { + var localVarReturnValue *Kubeconfig + return localVarReturnValue, nil + } + + return (*a.GetKubeconfigByInstanceIdExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetKubeconfigByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetKubeconfigByInstanceNameRequest { + return ApiGetKubeconfigByInstanceNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// GetKubeconfigByInstanceNameExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetKubeconfigByInstanceNameExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetKubeconfigByInstanceNameExecute(r ApiGetKubeconfigByInstanceNameRequest) (*Kubeconfig, error) { + if a.GetKubeconfigByInstanceNameExecuteMock == nil { + var localVarReturnValue *Kubeconfig + return localVarReturnValue, nil + } + + return (*a.GetKubeconfigByInstanceNameExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetTokenByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) ApiGetTokenByInstanceIdRequest { + return ApiGetTokenByInstanceIdRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// GetTokenByInstanceIdExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetTokenByInstanceIdExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetTokenByInstanceIdExecute(r ApiGetTokenByInstanceIdRequest) (*Token, error) { + if a.GetTokenByInstanceIdExecuteMock == nil { + var localVarReturnValue *Token + return localVarReturnValue, nil + } + + return (*a.GetTokenByInstanceIdExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetTokenByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) ApiGetTokenByInstanceNameRequest { + return ApiGetTokenByInstanceNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// GetTokenByInstanceNameExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetTokenByInstanceNameExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetTokenByInstanceNameExecute(r ApiGetTokenByInstanceNameRequest) (*Token, error) { + if a.GetTokenByInstanceNameExecuteMock == nil { + var localVarReturnValue *Token + return localVarReturnValue, nil + } + + return (*a.GetTokenByInstanceNameExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListInstances(ctx context.Context, projectId string, regionId string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + } +} + +// ListInstancesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListInstancesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListInstancesExecute(r ApiListInstancesRequest) (*InstanceList, error) { + if a.ListInstancesExecuteMock == nil { + var localVarReturnValue *InstanceList + return localVarReturnValue, nil + } + + return (*a.ListInstancesExecuteMock)(r) +} + +// Deprecated +func (a DefaultAPIServiceMock) ListPlansGlobal(ctx context.Context) ApiListPlansGlobalRequest { + return ApiListPlansGlobalRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Deprecated: ListPlansGlobalExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPlansGlobalExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListPlansGlobalExecute(r ApiListPlansGlobalRequest) (*PlanList, error) { + if a.ListPlansGlobalExecuteMock == nil { + var localVarReturnValue *PlanList + return localVarReturnValue, nil + } + + return (*a.ListPlansGlobalExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListPlansProject(ctx context.Context, projectId string) ApiListPlansProjectRequest { + return ApiListPlansProjectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListPlansProjectExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPlansProjectExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListPlansProjectExecute(r ApiListPlansProjectRequest) (*PlanList, error) { + if a.ListPlansProjectExecuteMock == nil { + var localVarReturnValue *PlanList + return localVarReturnValue, nil + } + + return (*a.ListPlansProjectExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstance(ctx context.Context, projectId string, regionId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + instanceId: instanceId, + } +} + +// UpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceExecute(r ApiUpdateInstanceRequest) error { + if a.UpdateInstanceExecuteMock == nil { + return nil + } + + return (*a.UpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstanceByName(ctx context.Context, projectId string, regionId string, displayName string) ApiUpdateInstanceByNameRequest { + return ApiUpdateInstanceByNameRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + regionId: regionId, + displayName: displayName, + } +} + +// UpdateInstanceByNameExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceByNameExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceByNameExecute(r ApiUpdateInstanceByNameRequest) error { + if a.UpdateInstanceByNameExecuteMock == nil { + return nil + } + + return (*a.UpdateInstanceByNameExecuteMock)(r) +} diff --git a/services/edge/v1beta1api/client.go b/services/edge/v1beta1api/client.go new file mode 100644 index 000000000..f7fb82cfe --- /dev/null +++ b/services/edge/v1beta1api/client.go @@ -0,0 +1,658 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1beta1api + +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 Edge Cloud API API v1beta1 +// 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/edge/v1beta1api/configuration.go b/services/edge/v1beta1api/configuration.go new file mode 100644 index 000000000..7d4d5199a --- /dev/null +++ b/services/edge/v1beta1api/configuration.go @@ -0,0 +1,37 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1beta1api + +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/edge", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://edge.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/edge/v1beta1api/model_bad_request.go b/services/edge/v1beta1api/model_bad_request.go new file mode 100644 index 000000000..308f1b4f2 --- /dev/null +++ b/services/edge/v1beta1api/model_bad_request.go @@ -0,0 +1,160 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the BadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BadRequest{} + +// BadRequest struct for BadRequest +type BadRequest struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewBadRequest instantiates a new BadRequest 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 NewBadRequest() *BadRequest { + this := BadRequest{} + return &this +} + +// NewBadRequestWithDefaults instantiates a new BadRequest 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 NewBadRequestWithDefaults() *BadRequest { + this := BadRequest{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *BadRequest) 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 *BadRequest) 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 *BadRequest) 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 *BadRequest) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *BadRequest) 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 *BadRequest) 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 *BadRequest) 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 *BadRequest) SetMessage(v string) { + o.Message = &v +} + +func (o BadRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BadRequest) 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 NullableBadRequest struct { + value *BadRequest + isSet bool +} + +func (v NullableBadRequest) Get() *BadRequest { + return v.value +} + +func (v *NullableBadRequest) Set(val *BadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBadRequest(val *BadRequest) *NullableBadRequest { + return &NullableBadRequest{value: val, isSet: true} +} + +func (v NullableBadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_create_instance_payload.go b/services/edge/v1beta1api/model_create_instance_payload.go new file mode 100644 index 000000000..87faa2628 --- /dev/null +++ b/services/edge/v1beta1api/model_create_instance_payload.go @@ -0,0 +1,223 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + +// CreateInstancePayload struct for CreateInstancePayload +type CreateInstancePayload struct { + // A user chosen description to distinguish multiple instances. + Description *string `json:"description,omitempty"` + // The displayed name to distinguish multiple instances. + DisplayName string `json:"displayName"` + // Service Plan configures the size of the Instance. + PlanId string `json:"planId"` +} + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(displayName string, planId string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.DisplayName = displayName + this.PlanId = planId + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateInstancePayload) SetDescription(v string) { + o.Description = &v +} + +// GetDisplayName returns the DisplayName field value +func (o *CreateInstancePayload) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *CreateInstancePayload) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetPlanId returns the PlanId field value +func (o *CreateInstancePayload) GetPlanId() string { + if o == nil { + var ret string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PlanId, true +} + +// SetPlanId sets field value +func (o *CreateInstancePayload) SetPlanId(v string) { + o.PlanId = v +} + +func (o CreateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["displayName"] = o.DisplayName + toSerialize["planId"] = o.PlanId + return toSerialize, nil +} + +func (o *CreateInstancePayload) 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{ + "displayName", + "planId", + } + + 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) + } + } + + varCreateInstancePayload := _CreateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateInstancePayload) + + if err != nil { + return err + } + + *o = CreateInstancePayload(varCreateInstancePayload) + + return err +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_instance.go b/services/edge/v1beta1api/model_instance.go new file mode 100644 index 000000000..8fe9ab578 --- /dev/null +++ b/services/edge/v1beta1api/model_instance.go @@ -0,0 +1,340 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Instance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Instance{} + +// Instance struct for Instance +type Instance struct { + // The date and time the creation of the instance was triggered. + Created time.Time `json:"created"` + // A user chosen description to distinguish multiple instances. + Description *string `json:"description,omitempty"` + // The displayed name of the instance. + DisplayName string `json:"displayName"` + // URL to the Management UI of the Instance. + FrontendUrl string `json:"frontendUrl"` + // A auto generated unique id which identifies the instance. + Id string `json:"id"` + // Service Plan configures the size of the Instance. + PlanId string `json:"planId"` + // The current status of the instance. + Status string `json:"status"` +} + +type _Instance Instance + +// NewInstance instantiates a new Instance 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 NewInstance(created time.Time, displayName string, frontendUrl string, id string, planId string, status string) *Instance { + this := Instance{} + this.Created = created + this.DisplayName = displayName + this.FrontendUrl = frontendUrl + this.Id = id + this.PlanId = planId + this.Status = status + return &this +} + +// NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { + this := Instance{} + return &this +} + +// GetCreated returns the Created field value +func (o *Instance) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Instance) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Instance) SetCreated(v time.Time) { + o.Created = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Instance) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Instance) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Instance) SetDescription(v string) { + o.Description = &v +} + +// GetDisplayName returns the DisplayName field value +func (o *Instance) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *Instance) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *Instance) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetFrontendUrl returns the FrontendUrl field value +func (o *Instance) GetFrontendUrl() string { + if o == nil { + var ret string + return ret + } + + return o.FrontendUrl +} + +// GetFrontendUrlOk returns a tuple with the FrontendUrl field value +// and a boolean to check if the value has been set. +func (o *Instance) GetFrontendUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FrontendUrl, true +} + +// SetFrontendUrl sets field value +func (o *Instance) SetFrontendUrl(v string) { + o.FrontendUrl = v +} + +// GetId returns the Id field value +func (o *Instance) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Instance) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Instance) SetId(v string) { + o.Id = v +} + +// GetPlanId returns the PlanId field value +func (o *Instance) GetPlanId() string { + if o == nil { + var ret string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *Instance) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PlanId, true +} + +// SetPlanId sets field value +func (o *Instance) SetPlanId(v string) { + o.PlanId = v +} + +// GetStatus returns the Status field value +func (o *Instance) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Instance) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Instance) SetStatus(v string) { + o.Status = v +} + +func (o Instance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Instance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["created"] = o.Created + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["displayName"] = o.DisplayName + toSerialize["frontendUrl"] = o.FrontendUrl + toSerialize["id"] = o.Id + toSerialize["planId"] = o.PlanId + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *Instance) 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{ + "created", + "displayName", + "frontendUrl", + "id", + "planId", + "status", + } + + 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) + } + } + + varInstance := _Instance{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInstance) + + if err != nil { + return err + } + + *o = Instance(varInstance) + + return err +} + +type NullableInstance struct { + value *Instance + isSet bool +} + +func (v NullableInstance) Get() *Instance { + return v.value +} + +func (v *NullableInstance) Set(val *Instance) { + v.value = val + v.isSet = true +} + +func (v NullableInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstance(val *Instance) *NullableInstance { + return &NullableInstance{value: val, isSet: true} +} + +func (v NullableInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_instance_list.go b/services/edge/v1beta1api/model_instance_list.go new file mode 100644 index 000000000..9d544806b --- /dev/null +++ b/services/edge/v1beta1api/model_instance_list.go @@ -0,0 +1,156 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the InstanceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceList{} + +// InstanceList struct for InstanceList +type InstanceList struct { + Instances []Instance `json:"instances"` +} + +type _InstanceList InstanceList + +// NewInstanceList instantiates a new InstanceList 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 NewInstanceList(instances []Instance) *InstanceList { + this := InstanceList{} + this.Instances = instances + return &this +} + +// NewInstanceListWithDefaults instantiates a new InstanceList 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 NewInstanceListWithDefaults() *InstanceList { + this := InstanceList{} + return &this +} + +// GetInstances returns the Instances field value +func (o *InstanceList) GetInstances() []Instance { + if o == nil { + var ret []Instance + return ret + } + + return o.Instances +} + +// GetInstancesOk returns a tuple with the Instances field value +// and a boolean to check if the value has been set. +func (o *InstanceList) GetInstancesOk() ([]Instance, bool) { + if o == nil { + return nil, false + } + return o.Instances, true +} + +// SetInstances sets field value +func (o *InstanceList) SetInstances(v []Instance) { + o.Instances = v +} + +func (o InstanceList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instances"] = o.Instances + return toSerialize, nil +} + +func (o *InstanceList) 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{ + "instances", + } + + 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) + } + } + + varInstanceList := _InstanceList{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInstanceList) + + if err != nil { + return err + } + + *o = InstanceList(varInstanceList) + + return err +} + +type NullableInstanceList struct { + value *InstanceList + isSet bool +} + +func (v NullableInstanceList) Get() *InstanceList { + return v.value +} + +func (v *NullableInstanceList) Set(val *InstanceList) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceList) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceList(val *InstanceList) *NullableInstanceList { + return &NullableInstanceList{value: val, isSet: true} +} + +func (v NullableInstanceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_kubeconfig.go b/services/edge/v1beta1api/model_kubeconfig.go new file mode 100644 index 000000000..246cc5d33 --- /dev/null +++ b/services/edge/v1beta1api/model_kubeconfig.go @@ -0,0 +1,157 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Kubeconfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Kubeconfig{} + +// Kubeconfig struct for Kubeconfig +type Kubeconfig struct { + // The kubeconfig for the instance. + Kubeconfig map[string]interface{} `json:"kubeconfig"` +} + +type _Kubeconfig Kubeconfig + +// 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 map[string]interface{}) *Kubeconfig { + this := Kubeconfig{} + this.Kubeconfig = 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 +} + +// GetKubeconfig returns the Kubeconfig field value +func (o *Kubeconfig) GetKubeconfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Kubeconfig +} + +// GetKubeconfigOk returns a tuple with the Kubeconfig field value +// and a boolean to check if the value has been set. +func (o *Kubeconfig) GetKubeconfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Kubeconfig, true +} + +// SetKubeconfig sets field value +func (o *Kubeconfig) SetKubeconfig(v map[string]interface{}) { + 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{}{} + toSerialize["kubeconfig"] = o.Kubeconfig + return toSerialize, nil +} + +func (o *Kubeconfig) 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{ + "kubeconfig", + } + + 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) + } + } + + varKubeconfig := _Kubeconfig{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKubeconfig) + + if err != nil { + return err + } + + *o = Kubeconfig(varKubeconfig) + + return err +} + +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/edge/v1beta1api/model_plan.go b/services/edge/v1beta1api/model_plan.go new file mode 100644 index 000000000..c9791825f --- /dev/null +++ b/services/edge/v1beta1api/model_plan.go @@ -0,0 +1,236 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the Plan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Plan{} + +// Plan struct for Plan +type Plan struct { + // Description + Description *string `json:"description,omitempty"` + // Service Plan Identifier + Id *string `json:"id,omitempty"` + // Maximum number of EdgeHosts + MaxEdgeHosts *int32 `json:"maxEdgeHosts,omitempty"` + // Service Plan Name + Name *string `json:"name,omitempty"` +} + +// NewPlan instantiates a new Plan 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 NewPlan() *Plan { + this := Plan{} + return &this +} + +// NewPlanWithDefaults instantiates a new Plan 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 NewPlanWithDefaults() *Plan { + this := Plan{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Plan) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Plan) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Plan) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Plan) 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 *Plan) 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 *Plan) 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 *Plan) SetId(v string) { + o.Id = &v +} + +// GetMaxEdgeHosts returns the MaxEdgeHosts field value if set, zero value otherwise. +func (o *Plan) GetMaxEdgeHosts() int32 { + if o == nil || IsNil(o.MaxEdgeHosts) { + var ret int32 + return ret + } + return *o.MaxEdgeHosts +} + +// GetMaxEdgeHostsOk returns a tuple with the MaxEdgeHosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetMaxEdgeHostsOk() (*int32, bool) { + if o == nil || IsNil(o.MaxEdgeHosts) { + return nil, false + } + return o.MaxEdgeHosts, true +} + +// HasMaxEdgeHosts returns a boolean if a field has been set. +func (o *Plan) HasMaxEdgeHosts() bool { + if o != nil && !IsNil(o.MaxEdgeHosts) { + return true + } + + return false +} + +// SetMaxEdgeHosts gets a reference to the given int32 and assigns it to the MaxEdgeHosts field. +func (o *Plan) SetMaxEdgeHosts(v int32) { + o.MaxEdgeHosts = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Plan) 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 *Plan) 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 *Plan) 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 *Plan) SetName(v string) { + o.Name = &v +} + +func (o Plan) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Plan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.MaxEdgeHosts) { + toSerialize["maxEdgeHosts"] = o.MaxEdgeHosts + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullablePlan struct { + value *Plan + isSet bool +} + +func (v NullablePlan) Get() *Plan { + return v.value +} + +func (v *NullablePlan) Set(val *Plan) { + v.value = val + v.isSet = true +} + +func (v NullablePlan) IsSet() bool { + return v.isSet +} + +func (v *NullablePlan) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlan(val *Plan) *NullablePlan { + return &NullablePlan{value: val, isSet: true} +} + +func (v NullablePlan) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlan) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_plan_list.go b/services/edge/v1beta1api/model_plan_list.go new file mode 100644 index 000000000..60b3cd7d1 --- /dev/null +++ b/services/edge/v1beta1api/model_plan_list.go @@ -0,0 +1,124 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the PlanList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanList{} + +// PlanList struct for PlanList +type PlanList struct { + ValidPlans []Plan `json:"validPlans,omitempty"` +} + +// NewPlanList instantiates a new PlanList 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 NewPlanList() *PlanList { + this := PlanList{} + return &this +} + +// NewPlanListWithDefaults instantiates a new PlanList 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 NewPlanListWithDefaults() *PlanList { + this := PlanList{} + return &this +} + +// GetValidPlans returns the ValidPlans field value if set, zero value otherwise. +func (o *PlanList) GetValidPlans() []Plan { + if o == nil || IsNil(o.ValidPlans) { + var ret []Plan + return ret + } + return o.ValidPlans +} + +// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanList) GetValidPlansOk() ([]Plan, bool) { + if o == nil || IsNil(o.ValidPlans) { + return nil, false + } + return o.ValidPlans, true +} + +// HasValidPlans returns a boolean if a field has been set. +func (o *PlanList) HasValidPlans() bool { + if o != nil && !IsNil(o.ValidPlans) { + return true + } + + return false +} + +// SetValidPlans gets a reference to the given []Plan and assigns it to the ValidPlans field. +func (o *PlanList) SetValidPlans(v []Plan) { + o.ValidPlans = v +} + +func (o PlanList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlanList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ValidPlans) { + toSerialize["validPlans"] = o.ValidPlans + } + return toSerialize, nil +} + +type NullablePlanList struct { + value *PlanList + isSet bool +} + +func (v NullablePlanList) Get() *PlanList { + return v.value +} + +func (v *NullablePlanList) Set(val *PlanList) { + v.value = val + v.isSet = true +} + +func (v NullablePlanList) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanList(val *PlanList) *NullablePlanList { + return &NullablePlanList{value: val, isSet: true} +} + +func (v NullablePlanList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_token.go b/services/edge/v1beta1api/model_token.go new file mode 100644 index 000000000..d4547acb2 --- /dev/null +++ b/services/edge/v1beta1api/model_token.go @@ -0,0 +1,157 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Token type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Token{} + +// Token struct for Token +type Token struct { + // The token for the instance. + Token string `json:"token"` +} + +type _Token Token + +// NewToken instantiates a new Token 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 NewToken(token string) *Token { + this := Token{} + this.Token = token + return &this +} + +// NewTokenWithDefaults instantiates a new Token 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 NewTokenWithDefaults() *Token { + this := Token{} + return &this +} + +// GetToken returns the Token field value +func (o *Token) GetToken() string { + if o == nil { + var ret string + return ret + } + + return o.Token +} + +// GetTokenOk returns a tuple with the Token field value +// and a boolean to check if the value has been set. +func (o *Token) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Token, true +} + +// SetToken sets field value +func (o *Token) SetToken(v string) { + o.Token = v +} + +func (o Token) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Token) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["token"] = o.Token + return toSerialize, nil +} + +func (o *Token) 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{ + "token", + } + + 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) + } + } + + varToken := _Token{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varToken) + + if err != nil { + return err + } + + *o = Token(varToken) + + return err +} + +type NullableToken struct { + value *Token + isSet bool +} + +func (v NullableToken) Get() *Token { + return v.value +} + +func (v *NullableToken) Set(val *Token) { + v.value = val + v.isSet = true +} + +func (v NullableToken) IsSet() bool { + return v.isSet +} + +func (v *NullableToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToken(val *Token) *NullableToken { + return &NullableToken{value: val, isSet: true} +} + +func (v NullableToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_unauthorized_request.go b/services/edge/v1beta1api/model_unauthorized_request.go new file mode 100644 index 000000000..74459e24b --- /dev/null +++ b/services/edge/v1beta1api/model_unauthorized_request.go @@ -0,0 +1,160 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the UnauthorizedRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UnauthorizedRequest{} + +// UnauthorizedRequest struct for UnauthorizedRequest +type UnauthorizedRequest struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewUnauthorizedRequest instantiates a new UnauthorizedRequest 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 NewUnauthorizedRequest() *UnauthorizedRequest { + this := UnauthorizedRequest{} + return &this +} + +// NewUnauthorizedRequestWithDefaults instantiates a new UnauthorizedRequest 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 NewUnauthorizedRequestWithDefaults() *UnauthorizedRequest { + this := UnauthorizedRequest{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *UnauthorizedRequest) 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 *UnauthorizedRequest) 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 *UnauthorizedRequest) 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 *UnauthorizedRequest) SetCode(v string) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *UnauthorizedRequest) 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 *UnauthorizedRequest) 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 *UnauthorizedRequest) 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 *UnauthorizedRequest) SetMessage(v string) { + o.Message = &v +} + +func (o UnauthorizedRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UnauthorizedRequest) 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 NullableUnauthorizedRequest struct { + value *UnauthorizedRequest + isSet bool +} + +func (v NullableUnauthorizedRequest) Get() *UnauthorizedRequest { + return v.value +} + +func (v *NullableUnauthorizedRequest) Set(val *UnauthorizedRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUnauthorizedRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUnauthorizedRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUnauthorizedRequest(val *UnauthorizedRequest) *NullableUnauthorizedRequest { + return &NullableUnauthorizedRequest{value: val, isSet: true} +} + +func (v NullableUnauthorizedRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUnauthorizedRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_update_instance_by_name_payload.go b/services/edge/v1beta1api/model_update_instance_by_name_payload.go new file mode 100644 index 000000000..e6297e061 --- /dev/null +++ b/services/edge/v1beta1api/model_update_instance_by_name_payload.go @@ -0,0 +1,162 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the UpdateInstanceByNamePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceByNamePayload{} + +// UpdateInstanceByNamePayload struct for UpdateInstanceByNamePayload +type UpdateInstanceByNamePayload struct { + // A user chosen description to distinguish multiple instances. + Description *string `json:"description,omitempty"` + // Service Plan configures the size of the Instance. + PlanId *string `json:"planId,omitempty"` +} + +// NewUpdateInstanceByNamePayload instantiates a new UpdateInstanceByNamePayload 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 NewUpdateInstanceByNamePayload() *UpdateInstanceByNamePayload { + this := UpdateInstanceByNamePayload{} + return &this +} + +// NewUpdateInstanceByNamePayloadWithDefaults instantiates a new UpdateInstanceByNamePayload 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 NewUpdateInstanceByNamePayloadWithDefaults() *UpdateInstanceByNamePayload { + this := UpdateInstanceByNamePayload{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateInstanceByNamePayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstanceByNamePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateInstanceByNamePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateInstanceByNamePayload) SetDescription(v string) { + o.Description = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *UpdateInstanceByNamePayload) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstanceByNamePayload) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *UpdateInstanceByNamePayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *UpdateInstanceByNamePayload) SetPlanId(v string) { + o.PlanId = &v +} + +func (o UpdateInstanceByNamePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstanceByNamePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + return toSerialize, nil +} + +type NullableUpdateInstanceByNamePayload struct { + value *UpdateInstanceByNamePayload + isSet bool +} + +func (v NullableUpdateInstanceByNamePayload) Get() *UpdateInstanceByNamePayload { + return v.value +} + +func (v *NullableUpdateInstanceByNamePayload) Set(val *UpdateInstanceByNamePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstanceByNamePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstanceByNamePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstanceByNamePayload(val *UpdateInstanceByNamePayload) *NullableUpdateInstanceByNamePayload { + return &NullableUpdateInstanceByNamePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstanceByNamePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstanceByNamePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_update_instance_payload.go b/services/edge/v1beta1api/model_update_instance_payload.go new file mode 100644 index 000000000..ba91d043a --- /dev/null +++ b/services/edge/v1beta1api/model_update_instance_payload.go @@ -0,0 +1,162 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + +// UpdateInstancePayload struct for UpdateInstancePayload +type UpdateInstancePayload struct { + // A user chosen description to distinguish multiple instances. + Description *string `json:"description,omitempty"` + // Service Plan configures the size of the Instance. + PlanId *string `json:"planId,omitempty"` +} + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateInstancePayload) SetDescription(v string) { + o.Description = &v +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetPlanId() string { + if o == nil || IsNil(o.PlanId) { + var ret string + return ret + } + return *o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.PlanId) { + return nil, false + } + return o.PlanId, true +} + +// HasPlanId returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasPlanId() bool { + if o != nil && !IsNil(o.PlanId) { + return true + } + + return false +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *UpdateInstancePayload) SetPlanId(v string) { + o.PlanId = &v +} + +func (o UpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.PlanId) { + toSerialize["planId"] = o.PlanId + } + return toSerialize, nil +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_user.go b/services/edge/v1beta1api/model_user.go new file mode 100644 index 000000000..e5e90d39d --- /dev/null +++ b/services/edge/v1beta1api/model_user.go @@ -0,0 +1,186 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + // The email of the user. + Email string `json:"email"` + // The UUID of the user. + InternalId string `json:"internalId"` +} + +type _User User + +// NewUser instantiates a new User 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 NewUser(email string, internalId string) *User { + this := User{} + this.Email = email + this.InternalId = internalId + return &this +} + +// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetEmail returns the Email field value +func (o *User) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *User) SetEmail(v string) { + o.Email = v +} + +// GetInternalId returns the InternalId field value +func (o *User) GetInternalId() string { + if o == nil { + var ret string + return ret + } + + return o.InternalId +} + +// GetInternalIdOk returns a tuple with the InternalId field value +// and a boolean to check if the value has been set. +func (o *User) GetInternalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InternalId, true +} + +// SetInternalId sets field value +func (o *User) SetInternalId(v string) { + o.InternalId = v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["email"] = o.Email + toSerialize["internalId"] = o.InternalId + return toSerialize, nil +} + +func (o *User) 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{ + "email", + "internalId", + } + + 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) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/response.go b/services/edge/v1beta1api/response.go new file mode 100644 index 000000000..1c0e599aa --- /dev/null +++ b/services/edge/v1beta1api/response.go @@ -0,0 +1,47 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +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/edge/v1beta1api/utils.go b/services/edge/v1beta1api/utils.go new file mode 100644 index 000000000..bb2c8a484 --- /dev/null +++ b/services/edge/v1beta1api/utils.go @@ -0,0 +1,361 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +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/edge/wait/deprecation.go b/services/edge/wait/deprecation.go new file mode 100644 index 000000000..58f184c09 --- /dev/null +++ b/services/edge/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