From 8d397130e86e35c09d2b127f7fc9e7a49f1b7d5a Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 12 Oct 2026 13:40:34 +0000 Subject: [PATCH] Generate git --- services/git/.openapi-generator/VERSION | 1 - services/git/api_default.go | 3102 ----------------- services/git/client.go | 635 ---- services/git/configuration.go | 40 - services/git/go.mod | 2 +- services/git/go.sum | 4 +- services/git/model_already_exists_error.go | 149 - .../git/model_already_exists_error_test.go | 11 - services/git/model_authentication.go | 583 ---- services/git/model_authentication_list.go | 149 - .../git/model_authentication_list_test.go | 11 - services/git/model_authentication_test.go | 11 - services/git/model_bad_error_response.go | 209 -- services/git/model_bad_error_response_test.go | 11 - services/git/model_conflict_error_response.go | 209 -- .../git/model_conflict_error_response_test.go | 11 - .../model_create_authentication_payload.go | 493 --- ...odel_create_authentication_payload_test.go | 11 - services/git/model_create_instance_payload.go | 388 --- .../git/model_create_instance_payload_test.go | 58 - services/git/model_create_runner_payload.go | 149 - .../git/model_create_runner_payload_test.go | 11 - services/git/model_feature_toggle.go | 436 --- services/git/model_feature_toggle_test.go | 72 - services/git/model_flavor.go | 493 --- services/git/model_flavor_test.go | 72 - services/git/model_generic_error_response.go | 207 -- .../git/model_generic_error_response_test.go | 11 - services/git/model_instance.go | 823 ----- services/git/model_instance_test.go | 86 - .../model_internal_server_error_response.go | 209 -- ...del_internal_server_error_response_test.go | 11 - services/git/model_list_flavors.go | 149 - services/git/model_list_flavors_test.go | 11 - services/git/model_list_instances.go | 149 - services/git/model_list_instances_test.go | 11 - .../git/model_not_found_error_response.go | 209 -- .../model_not_found_error_response_test.go | 11 - .../git/model_patch_authentication_payload.go | 447 --- ...model_patch_authentication_payload_test.go | 11 - services/git/model_patch_instance_payload.go | 211 -- .../git/model_patch_instance_payload_test.go | 11 - services/git/model_patch_operation.go | 384 -- services/git/model_patch_operation_test.go | 58 - services/git/model_runner.go | 310 -- services/git/model_runner_runtime.go | 366 -- services/git/model_runner_runtime_list.go | 149 - .../git/model_runner_runtime_list_test.go | 11 - services/git/model_runner_runtime_test.go | 11 - services/git/model_runner_test.go | 11 - .../git/model_unauthorized_error_response.go | 382 -- .../model_unauthorized_error_response_test.go | 11 - services/git/oas_commit | 2 +- services/git/package.go | 1 + services/git/utils.go | 466 --- services/git/v1betaapi/api_default.go | 1118 +++++- services/git/v1betaapi/api_default_mock.go | 106 + services/git/v1betaapi/client.go | 9 + .../git/v1betaapi/model_authentication.go | 57 +- .../v1betaapi/model_authentication_status.go | 120 + .../model_create_authentication_payload.go | 4 +- .../model_create_instance_payload.go | 2 +- .../v1betaapi/model_create_user_payload.go | 300 ++ .../git/v1betaapi/model_feature_toggle.go | 86 +- services/git/v1betaapi/model_instance.go | 72 +- services/git/v1betaapi/model_list_users.go | 257 ++ .../model_patch_authentication_payload.go | 4 +- .../v1betaapi/model_patch_instance_payload.go | 80 +- services/git/v1betaapi/model_pipelines.go | 215 ++ .../git/v1betaapi/model_runner_runtime.go | 2 +- .../v1betaapi/model_update_user_payload.go | 231 ++ services/git/v1betaapi/model_user.go | 266 ++ services/git/wait/deprecation.go | 2 - services/git/wait/wait.go | 71 - services/git/wait/wait_test.go | 232 -- 75 files changed, 2753 insertions(+), 12531 deletions(-) delete mode 100644 services/git/.openapi-generator/VERSION delete mode 100644 services/git/api_default.go delete mode 100644 services/git/client.go delete mode 100644 services/git/configuration.go delete mode 100644 services/git/model_already_exists_error.go delete mode 100644 services/git/model_already_exists_error_test.go delete mode 100644 services/git/model_authentication.go delete mode 100644 services/git/model_authentication_list.go delete mode 100644 services/git/model_authentication_list_test.go delete mode 100644 services/git/model_authentication_test.go delete mode 100644 services/git/model_bad_error_response.go delete mode 100644 services/git/model_bad_error_response_test.go delete mode 100644 services/git/model_conflict_error_response.go delete mode 100644 services/git/model_conflict_error_response_test.go delete mode 100644 services/git/model_create_authentication_payload.go delete mode 100644 services/git/model_create_authentication_payload_test.go delete mode 100644 services/git/model_create_instance_payload.go delete mode 100644 services/git/model_create_instance_payload_test.go delete mode 100644 services/git/model_create_runner_payload.go delete mode 100644 services/git/model_create_runner_payload_test.go delete mode 100644 services/git/model_feature_toggle.go delete mode 100644 services/git/model_feature_toggle_test.go delete mode 100644 services/git/model_flavor.go delete mode 100644 services/git/model_flavor_test.go delete mode 100644 services/git/model_generic_error_response.go delete mode 100644 services/git/model_generic_error_response_test.go delete mode 100644 services/git/model_instance.go delete mode 100644 services/git/model_instance_test.go delete mode 100644 services/git/model_internal_server_error_response.go delete mode 100644 services/git/model_internal_server_error_response_test.go delete mode 100644 services/git/model_list_flavors.go delete mode 100644 services/git/model_list_flavors_test.go delete mode 100644 services/git/model_list_instances.go delete mode 100644 services/git/model_list_instances_test.go delete mode 100644 services/git/model_not_found_error_response.go delete mode 100644 services/git/model_not_found_error_response_test.go delete mode 100644 services/git/model_patch_authentication_payload.go delete mode 100644 services/git/model_patch_authentication_payload_test.go delete mode 100644 services/git/model_patch_instance_payload.go delete mode 100644 services/git/model_patch_instance_payload_test.go delete mode 100644 services/git/model_patch_operation.go delete mode 100644 services/git/model_patch_operation_test.go delete mode 100644 services/git/model_runner.go delete mode 100644 services/git/model_runner_runtime.go delete mode 100644 services/git/model_runner_runtime_list.go delete mode 100644 services/git/model_runner_runtime_list_test.go delete mode 100644 services/git/model_runner_runtime_test.go delete mode 100644 services/git/model_runner_test.go delete mode 100644 services/git/model_unauthorized_error_response.go delete mode 100644 services/git/model_unauthorized_error_response_test.go create mode 100644 services/git/package.go delete mode 100644 services/git/utils.go create mode 100644 services/git/v1betaapi/model_authentication_status.go create mode 100644 services/git/v1betaapi/model_create_user_payload.go create mode 100644 services/git/v1betaapi/model_list_users.go create mode 100644 services/git/v1betaapi/model_pipelines.go create mode 100644 services/git/v1betaapi/model_update_user_payload.go create mode 100644 services/git/v1betaapi/model_user.go delete mode 100644 services/git/wait/deprecation.go delete mode 100644 services/git/wait/wait.go delete mode 100644 services/git/wait/wait_test.go diff --git a/services/git/.openapi-generator/VERSION b/services/git/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/services/git/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/git/api_default.go b/services/git/api_default.go deleted file mode 100644 index 21e1022e91..0000000000 --- a/services/git/api_default.go +++ /dev/null @@ -1,3102 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "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 { - /* - CreateAuthentication Creates an authentication source - Creates an authentication source for the corresponding STACKIT Git instance - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return ApiCreateAuthenticationRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateAuthentication(ctx context.Context, projectId string, instanceId string) ApiCreateAuthenticationRequest - /* - CreateAuthenticationExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return Authentication - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateAuthenticationExecute(ctx context.Context, projectId string, instanceId string) (*Authentication, error) - /* - CreateInstance Create an Instance. - Creates a new STACKIT Git instance as a project resource. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @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) ApiCreateInstanceRequest - /* - CreateInstanceExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @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) (*Instance, error) - /* - CreateRunner Create the runner associated to this instance. - Creates the runner associated to this STACKIT Git instance. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return ApiCreateRunnerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateRunner(ctx context.Context, projectId string, instanceId string) ApiCreateRunnerRequest - /* - CreateRunnerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return Runner - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateRunnerExecute(ctx context.Context, projectId string, instanceId string) (*Runner, error) - /* - DeleteAuthentication Delete Authentication Source - Deletes the authentication source associated to this STACKIT Git instance. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiDeleteAuthenticationRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiDeleteAuthenticationRequest - /* - DeleteAuthenticationExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteAuthenticationExecute(ctx context.Context, projectId string, instanceId string, authenticationId string) error - /* - DeleteInstance Delete Instance. - Deletes a STACKIT Git instance and destroys all associated data. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @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, 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, instanceId string) error - /* - DeleteRunner Delete Runner. - Deletes the runner associated to this STACKIT Git instance and destroys all associated data. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return ApiDeleteRunnerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteRunner(ctx context.Context, projectId string, instanceId string) ApiDeleteRunnerRequest - /* - DeleteRunnerExecute executes the request - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteRunnerExecute(ctx context.Context, projectId string, instanceId string) error - /* - GetAuthentication Get authentication provider - Get authentication provider - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiGetAuthenticationRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiGetAuthenticationRequest - /* - GetAuthenticationExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return Authentication - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetAuthenticationExecute(ctx context.Context, projectId string, instanceId string, authenticationId string) (*Authentication, error) - /* - GetInstance Get Instance information. - Retrieves information about a STACKIT Git instance. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @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, instanceId string) ApiGetInstanceRequest - /* - GetInstanceExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @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, instanceId string) (*Instance, error) - /* - GetRunner Get Runner information. - Retrieves information about a runner in a STACKIT Git instance. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return ApiGetRunnerRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetRunner(ctx context.Context, projectId string, instanceId string) ApiGetRunnerRequest - /* - GetRunnerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return Runner - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetRunnerExecute(ctx context.Context, projectId string, instanceId string) (*Runner, error) - /* - ListAuthentication List authentication sources - Lists all authentication sources belonging to a specific instance - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return ApiListAuthenticationRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAuthentication(ctx context.Context, projectId string, instanceId string) ApiListAuthenticationRequest - /* - ListAuthenticationExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return AuthenticationList - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListAuthenticationExecute(ctx context.Context, projectId string, instanceId string) (*AuthenticationList, error) - /* - ListFlavors Returns the details for the given STACKIT Git flavors. - Provides detailed information about possible Git Flavors. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @return ApiListFlavorsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest - /* - ListFlavorsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @return ListFlavors - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListFlavorsExecute(ctx context.Context, projectId string) (*ListFlavors, error) - /* - ListInstances List Instances. - Lists all STACKIT Git instances within a project. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @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) ApiListInstancesRequest - /* - ListInstancesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @return ListInstances - - // 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) (*ListInstances, error) - /* - ListRunnerRuntimes Method for ListRunnerRuntimes - A list of runner runtimes that are available to be enabled for the project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @return ApiListRunnerRuntimesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRunnerRuntimes(ctx context.Context, projectId string) ApiListRunnerRuntimesRequest - /* - ListRunnerRuntimesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @return RunnerRuntimeList - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRunnerRuntimesExecute(ctx context.Context, projectId string) (*RunnerRuntimeList, error) - /* - PatchAuthentication Patch Authentication. - Patches the Authentication Provider. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiPatchAuthenticationRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PatchAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiPatchAuthenticationRequest - /* - PatchAuthenticationExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return Authentication - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PatchAuthenticationExecute(ctx context.Context, projectId string, instanceId string, authenticationId string) (*Authentication, error) - /* - PatchInstance Patch Instance. - Patches the Instance. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return ApiPatchInstanceRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PatchInstance(ctx context.Context, projectId string, instanceId string) ApiPatchInstanceRequest - /* - PatchInstanceExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project identifier. - @param instanceId Instance identifier. - @return Instance - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PatchInstanceExecute(ctx context.Context, projectId string, instanceId string) (*Instance, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateAuthenticationRequest interface { - // Authentication Definition configuration data. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateAuthenticationPayload(createAuthenticationPayload CreateAuthenticationPayload) ApiCreateAuthenticationRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Authentication, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateInstanceRequest interface { - // Instance configuration options. - // 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 ApiCreateRunnerRequest interface { - // Runner configuration options. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateRunnerPayload(createRunnerPayload CreateRunnerPayload) ApiCreateRunnerRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Runner, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteAuthenticationRequest 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 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 ApiDeleteRunnerRequest 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 ApiGetAuthenticationRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Authentication, 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 ApiGetRunnerRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Runner, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListAuthenticationRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*AuthenticationList, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListFlavorsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListFlavors, 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() (*ListInstances, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListRunnerRuntimesRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*RunnerRuntimeList, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPatchAuthenticationRequest interface { - // Authentication Definition configuration data. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PatchAuthenticationPayload(patchAuthenticationPayload PatchAuthenticationPayload) ApiPatchAuthenticationRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Authentication, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPatchInstanceRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PatchInstancePayload(patchInstancePayload PatchInstancePayload) ApiPatchInstanceRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*Instance, 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 CreateAuthenticationRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - createAuthenticationPayload *CreateAuthenticationPayload -} - -// Authentication Definition configuration data. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateAuthenticationRequest) CreateAuthenticationPayload(createAuthenticationPayload CreateAuthenticationPayload) ApiCreateAuthenticationRequest { - r.createAuthenticationPayload = &createAuthenticationPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateAuthenticationRequest) Execute() (*Authentication, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Authentication - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAuthentication") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 elements") - } - if r.createAuthenticationPayload == nil { - return localVarReturnValue, fmt.Errorf("createAuthenticationPayload 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.createAuthenticationPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v BadErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v NotFoundErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ConflictErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -CreateAuthentication: Creates an authentication source - -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 Project identifier. - @param instanceId Instance identifier. - @return ApiCreateAuthenticationRequest -*/ -func (a *APIClient) CreateAuthentication(ctx context.Context, projectId string, instanceId string) ApiCreateAuthenticationRequest { - return CreateAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateAuthenticationExecute(ctx context.Context, projectId string, instanceId string) (*Authentication, error) { - r := CreateAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// 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 - projectId string - createInstancePayload *CreateInstancePayload -} - -// Instance configuration options. -// 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 - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Instance - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateInstance") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.createInstancePayload == nil { - return localVarReturnValue, fmt.Errorf("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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -CreateInstance: Create an 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 Project identifier. - @return ApiCreateInstanceRequest -*/ -func (a *APIClient) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { - return CreateInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// 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) (*Instance, error) { - r := CreateInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateRunnerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - createRunnerPayload *CreateRunnerPayload -} - -// Runner configuration options. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateRunnerRequest) CreateRunnerPayload(createRunnerPayload CreateRunnerPayload) ApiCreateRunnerRequest { - r.createRunnerPayload = &createRunnerPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateRunnerRequest) Execute() (*Runner, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Runner - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRunner") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/runner" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 elements") - } - if r.createRunnerPayload == nil { - return localVarReturnValue, fmt.Errorf("createRunnerPayload 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.createRunnerPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v AlreadyExistsError - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -CreateRunner: Create the runner associated to this 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 Project identifier. - @param instanceId Instance identifier. - @return ApiCreateRunnerRequest -*/ -func (a *APIClient) CreateRunner(ctx context.Context, projectId string, instanceId string) ApiCreateRunnerRequest { - return CreateRunnerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateRunnerExecute(ctx context.Context, projectId string, instanceId string) (*Runner, error) { - r := CreateRunnerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteAuthenticationRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - authenticationId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteAuthenticationRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAuthentication") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications/{authenticationId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"authenticationId"+"}", url.PathEscape(ParameterValueToString(r.authenticationId, "authenticationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return fmt.Errorf("instanceId must have less than 36 elements") - } - if strlen(r.authenticationId) < 36 { - return fmt.Errorf("authenticationId must have at least 36 elements") - } - if strlen(r.authenticationId) > 36 { - return fmt.Errorf("authenticationId must have less than 36 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = 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 nil -} - -/* -DeleteAuthentication: Delete Authentication Source - -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 Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiDeleteAuthenticationRequest -*/ -func (a *APIClient) DeleteAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiDeleteAuthenticationRequest { - return DeleteAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteAuthenticationExecute(ctx context.Context, projectId string, instanceId string, authenticationId string) error { - r := DeleteAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, - } - 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 - projectId string - 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 - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteInstance") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return fmt.Errorf("instanceId must have less than 36 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = 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 nil -} - -/* -DeleteInstance: Delete 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 Project identifier. - @param instanceId Instance identifier. - @return ApiDeleteInstanceRequest -*/ -func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { - return DeleteInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// 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, instanceId string) error { - r := DeleteInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteRunnerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteRunnerRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRunner") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/runner" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return fmt.Errorf("instanceId must have less than 36 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 := 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 := 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = 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 - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = 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 nil -} - -/* -DeleteRunner: Delete Runner. - -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 Project identifier. - @param instanceId Instance identifier. - @return ApiDeleteRunnerRequest -*/ -func (a *APIClient) DeleteRunner(ctx context.Context, projectId string, instanceId string) ApiDeleteRunnerRequest { - return DeleteRunnerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteRunnerExecute(ctx context.Context, projectId string, instanceId string) error { - r := DeleteRunnerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetAuthenticationRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - authenticationId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetAuthenticationRequest) Execute() (*Authentication, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Authentication - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAuthentication") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications/{authenticationId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"authenticationId"+"}", url.PathEscape(ParameterValueToString(r.authenticationId, "authenticationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 elements") - } - if strlen(r.authenticationId) < 36 { - return localVarReturnValue, fmt.Errorf("authenticationId must have at least 36 elements") - } - if strlen(r.authenticationId) > 36 { - return localVarReturnValue, fmt.Errorf("authenticationId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v BadErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetAuthentication: Get authentication provider - -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 Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiGetAuthenticationRequest -*/ -func (a *APIClient) GetAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiGetAuthenticationRequest { - return GetAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetAuthenticationExecute(ctx context.Context, projectId string, instanceId string, authenticationId string) (*Authentication, error) { - r := GetAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, - } - 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 - projectId string - 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 - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Instance - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetInstance") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetInstance: Get Instance information. - -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 Project identifier. - @param instanceId Instance identifier. - @return ApiGetInstanceRequest -*/ -func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { - return GetInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// 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, instanceId string) (*Instance, error) { - r := GetInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetRunnerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetRunnerRequest) Execute() (*Runner, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Runner - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRunner") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/runner" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetRunner: Get Runner information. - -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 Project identifier. - @param instanceId Instance identifier. - @return ApiGetRunnerRequest -*/ -func (a *APIClient) GetRunner(ctx context.Context, projectId string, instanceId string) ApiGetRunnerRequest { - return GetRunnerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetRunnerExecute(ctx context.Context, projectId string, instanceId string) (*Runner, error) { - r := GetRunnerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuthenticationRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListAuthenticationRequest) Execute() (*AuthenticationList, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthenticationList - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAuthentication") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v BadErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListAuthentication: List authentication sources - -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 Project identifier. - @param instanceId Instance identifier. - @return ApiListAuthenticationRequest -*/ -func (a *APIClient) ListAuthentication(ctx context.Context, projectId string, instanceId string) ApiListAuthenticationRequest { - return ListAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListAuthenticationExecute(ctx context.Context, projectId string, instanceId string) (*AuthenticationList, error) { - r := ListAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsRequest 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 ListFlavorsRequest) Execute() (*ListFlavors, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListFlavors - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlavors") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/flavors" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListFlavors: Returns the details for the given STACKIT Git flavors. - -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 Project identifier. - @return ApiListFlavorsRequest -*/ -func (a *APIClient) ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest { - return ListFlavorsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListFlavorsExecute(ctx context.Context, projectId string) (*ListFlavors, error) { - r := ListFlavorsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: 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 - projectId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListInstancesRequest) Execute() (*ListInstances, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListInstances - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListInstances") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListInstances: List Instances. - -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 Project identifier. - @return ApiListInstancesRequest -*/ -func (a *APIClient) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { - return ListInstancesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// 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) (*ListInstances, error) { - r := ListInstancesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRunnerRuntimesRequest 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 ListRunnerRuntimesRequest) Execute() (*RunnerRuntimeList, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunnerRuntimeList - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRunnerRuntimes") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/runner-runtimes" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -ListRunnerRuntimes: Method for ListRunnerRuntimes - -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 Project identifier. - @return ApiListRunnerRuntimesRequest -*/ -func (a *APIClient) ListRunnerRuntimes(ctx context.Context, projectId string) ApiListRunnerRuntimesRequest { - return ListRunnerRuntimesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListRunnerRuntimesExecute(ctx context.Context, projectId string) (*RunnerRuntimeList, error) { - r := ListRunnerRuntimesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - authenticationId string - patchAuthenticationPayload *PatchAuthenticationPayload -} - -// Authentication Definition configuration data. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PatchAuthenticationRequest) PatchAuthenticationPayload(patchAuthenticationPayload PatchAuthenticationPayload) ApiPatchAuthenticationRequest { - r.patchAuthenticationPayload = &patchAuthenticationPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PatchAuthenticationRequest) Execute() (*Authentication, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Authentication - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PatchAuthentication") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications/{authenticationId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"authenticationId"+"}", url.PathEscape(ParameterValueToString(r.authenticationId, "authenticationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 elements") - } - if strlen(r.authenticationId) < 36 { - return localVarReturnValue, fmt.Errorf("authenticationId must have at least 36 elements") - } - if strlen(r.authenticationId) > 36 { - return localVarReturnValue, fmt.Errorf("authenticationId must have less than 36 elements") - } - if r.patchAuthenticationPayload == nil { - return localVarReturnValue, fmt.Errorf("patchAuthenticationPayload 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.patchAuthenticationPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v BadErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v NotFoundErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -PatchAuthentication: Patch Authentication. - -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 Project identifier. - @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiPatchAuthenticationRequest -*/ -func (a *APIClient) PatchAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiPatchAuthenticationRequest { - return PatchAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PatchAuthenticationExecute(ctx context.Context, projectId string, instanceId string, authenticationId string) (*Authentication, error) { - r := PatchAuthenticationRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstanceRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - patchInstancePayload *PatchInstancePayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PatchInstanceRequest) PatchInstancePayload(patchInstancePayload PatchInstancePayload) ApiPatchInstanceRequest { - r.patchInstancePayload = &patchInstancePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PatchInstanceRequest) Execute() (*Instance, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Instance - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PatchInstance") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.instanceId) < 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") - } - if strlen(r.instanceId) > 36 { - return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 elements") - } - if r.patchInstancePayload == nil { - return localVarReturnValue, fmt.Errorf("patchInstancePayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json", "application/json-patch+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.patchInstancePayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -PatchInstance: Patch 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 Project identifier. - @param instanceId Instance identifier. - @return ApiPatchInstanceRequest -*/ -func (a *APIClient) PatchInstance(ctx context.Context, projectId string, instanceId string) ApiPatchInstanceRequest { - return PatchInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PatchInstanceExecute(ctx context.Context, projectId string, instanceId string) (*Instance, error) { - r := PatchInstanceRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - } - return r.Execute() -} diff --git a/services/git/client.go b/services/git/client.go deleted file mode 100644 index 1188a394be..0000000000 --- a/services/git/client.go +++ /dev/null @@ -1,635 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "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)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") -) - -// APIClient manages communication with the STACKIT Git API API v1beta.0.4 -// 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() - - 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 - 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 -} - -// 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) - } - 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{}, 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, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), 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) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), 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(), collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), 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 -// 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 -} - -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 !IsNil(postBody) { - 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, fmt.Errorf("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, fmt.Errorf("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 fmt.Errorf("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 fmt.Errorf("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 -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// 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) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s", 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. -// 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 - 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) -} diff --git a/services/git/configuration.go b/services/git/configuration.go deleted file mode 100644 index 97aae6a2a3..0000000000 --- a/services/git/configuration.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -// 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), - UserAgent: "stackit-sdk-go/git", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://git.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/git/go.mod b/services/git/go.mod index 2bbb382df6..ec21dd8a90 100644 --- a/services/git/go.mod +++ b/services/git/go.mod @@ -5,7 +5,7 @@ go 1.25 require ( github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 - github.com/stackitcloud/stackit-sdk-go/core v0.27.0 + github.com/stackitcloud/stackit-sdk-go/core v0.27.1 ) require github.com/golang-jwt/jwt/v5 v5.3.1 // indirect diff --git a/services/git/go.sum b/services/git/go.sum index 042f4a71a5..5bae1d1250 100644 --- a/services/git/go.sum +++ b/services/git/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.27.0 h1:7lc6qStcFDFf8zHP4ORPa9joybw+Sa2LtB6BVjKQ+ek= -github.com/stackitcloud/stackit-sdk-go/core v0.27.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= +github.com/stackitcloud/stackit-sdk-go/core v0.27.1 h1:k7SrqqMoHjkvHbx6n6nV3Lt51itp8nNplht6vGHkPhw= +github.com/stackitcloud/stackit-sdk-go/core v0.27.1/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= diff --git a/services/git/model_already_exists_error.go b/services/git/model_already_exists_error.go deleted file mode 100644 index 2083901f81..0000000000 --- a/services/git/model_already_exists_error.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the AlreadyExistsError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AlreadyExistsError{} - -/* - types and functions for message -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AlreadyExistsErrorGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAlreadyExistsErrorGetMessageAttributeTypeOk(arg AlreadyExistsErrorGetMessageAttributeType) (ret AlreadyExistsErrorGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAlreadyExistsErrorGetMessageAttributeType(arg *AlreadyExistsErrorGetMessageAttributeType, val AlreadyExistsErrorGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AlreadyExistsErrorGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AlreadyExistsErrorGetMessageRetType = string - -// AlreadyExistsError Error response when a resource already exists. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AlreadyExistsError struct { - // REQUIRED - Message AlreadyExistsErrorGetMessageAttributeType `json:"message" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AlreadyExistsError AlreadyExistsError - -// NewAlreadyExistsError instantiates a new AlreadyExistsError 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 NewAlreadyExistsError(message AlreadyExistsErrorGetMessageArgType) *AlreadyExistsError { - this := AlreadyExistsError{} - setAlreadyExistsErrorGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewAlreadyExistsErrorWithDefaults instantiates a new AlreadyExistsError 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 NewAlreadyExistsErrorWithDefaults() *AlreadyExistsError { - this := AlreadyExistsError{} - return &this -} - -// GetMessage returns the Message field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AlreadyExistsError) GetMessage() (ret AlreadyExistsErrorGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message 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 *AlreadyExistsError) GetMessageOk() (ret AlreadyExistsErrorGetMessageRetType, ok bool) { - return getAlreadyExistsErrorGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AlreadyExistsError) SetMessage(v AlreadyExistsErrorGetMessageRetType) { - setAlreadyExistsErrorGetMessageAttributeType(&o.Message, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AlreadyExistsError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAlreadyExistsErrorGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAlreadyExistsError struct { - value *AlreadyExistsError - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAlreadyExistsError) Get() *AlreadyExistsError { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAlreadyExistsError) Set(val *AlreadyExistsError) { - 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 NullableAlreadyExistsError) 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 *NullableAlreadyExistsError) 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 NewNullableAlreadyExistsError(val *AlreadyExistsError) *NullableAlreadyExistsError { - return &NullableAlreadyExistsError{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 NullableAlreadyExistsError) 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 *NullableAlreadyExistsError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_already_exists_error_test.go b/services/git/model_already_exists_error_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_already_exists_error_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_authentication.go b/services/git/model_authentication.go deleted file mode 100644 index 5291ed29de..0000000000 --- a/services/git/model_authentication.go +++ /dev/null @@ -1,583 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "time" -) - -// checks if the Authentication type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Authentication{} - -/* - types and functions for auto_discover_url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetAutoDiscoverUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(arg AuthenticationGetAutoDiscoverUrlAttributeType) (ret AuthenticationGetAutoDiscoverUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetAutoDiscoverUrlAttributeType(arg *AuthenticationGetAutoDiscoverUrlAttributeType, val AuthenticationGetAutoDiscoverUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetAutoDiscoverUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetAutoDiscoverUrlRetType = string - -/* - types and functions for client_id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetClientIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetClientIdAttributeTypeOk(arg AuthenticationGetClientIdAttributeType) (ret AuthenticationGetClientIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetClientIdAttributeType(arg *AuthenticationGetClientIdAttributeType, val AuthenticationGetClientIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetClientIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetClientIdRetType = string - -/* - types and functions for created_at -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetCreatedAtAttributeTypeOk(arg AuthenticationGetCreatedAtAttributeType) (ret AuthenticationGetCreatedAtRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetCreatedAtAttributeType(arg *AuthenticationGetCreatedAtAttributeType, val AuthenticationGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for icon_url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetIconUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetIconUrlAttributeTypeOk(arg AuthenticationGetIconUrlAttributeType) (ret AuthenticationGetIconUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetIconUrlAttributeType(arg *AuthenticationGetIconUrlAttributeType, val AuthenticationGetIconUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetIconUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetIconUrlRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetIdAttributeTypeOk(arg AuthenticationGetIdAttributeType) (ret AuthenticationGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetIdAttributeType(arg *AuthenticationGetIdAttributeType, val AuthenticationGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetIdRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetNameAttributeTypeOk(arg AuthenticationGetNameAttributeType) (ret AuthenticationGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetNameAttributeType(arg *AuthenticationGetNameAttributeType, val AuthenticationGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetNameRetType = string - -/* - types and functions for provider -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetProviderAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetProviderAttributeTypeOk(arg AuthenticationGetProviderAttributeType) (ret AuthenticationGetProviderRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetProviderAttributeType(arg *AuthenticationGetProviderAttributeType, val AuthenticationGetProviderRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetProviderArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetProviderRetType = string - -/* - types and functions for scopes -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetScopesAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetScopesAttributeTypeOk(arg AuthenticationGetScopesAttributeType) (ret AuthenticationGetScopesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetScopesAttributeType(arg *AuthenticationGetScopesAttributeType, val AuthenticationGetScopesRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetScopesArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetScopesRetType = string - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationGetStatusAttributeTypeOk(arg AuthenticationGetStatusAttributeType) (ret AuthenticationGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationGetStatusAttributeType(arg *AuthenticationGetStatusAttributeType, val AuthenticationGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationGetStatusRetType = string - -// Authentication Describes an authentication definition associated to a STACKIT Git instance. The provider type will be an openidConnect type. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Authentication struct { - // The well-known configuration url to use for this authentication definition. - // REQUIRED - AutoDiscoverUrl AuthenticationGetAutoDiscoverUrlAttributeType `json:"auto_discover_url" required:"true"` - // The IDP client id to use. - // REQUIRED - ClientId AuthenticationGetClientIdAttributeType `json:"client_id" required:"true"` - // The date and time the creation of the authentication definition was triggered. - // REQUIRED - CreatedAt AuthenticationGetCreatedAtAttributeType `json:"created_at" required:"true"` - // The url of the icon to use for this authentication definition. - // REQUIRED - IconUrl AuthenticationGetIconUrlAttributeType `json:"icon_url" required:"true"` - // An auto generated unique uuid which identifies the authentication definition in STACKIT Git instances. - // REQUIRED - Id AuthenticationGetIdAttributeType `json:"id" required:"true"` - // The name to identify an authentication definition associated with a STACKIT Git instance. - // REQUIRED - Name AuthenticationGetNameAttributeType `json:"name" required:"true"` - // The Oauth2 provider to use. - // REQUIRED - Provider AuthenticationGetProviderAttributeType `json:"provider" required:"true"` - // Scopes defines the OIDC scopes to request. - // REQUIRED - Scopes AuthenticationGetScopesAttributeType `json:"scopes" required:"true"` - // The current status of the authentication definition. - // REQUIRED - Status AuthenticationGetStatusAttributeType `json:"status" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Authentication Authentication - -// NewAuthentication instantiates a new Authentication 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 NewAuthentication(autoDiscoverUrl AuthenticationGetAutoDiscoverUrlArgType, clientId AuthenticationGetClientIdArgType, createdAt AuthenticationGetCreatedAtArgType, iconUrl AuthenticationGetIconUrlArgType, id AuthenticationGetIdArgType, name AuthenticationGetNameArgType, provider AuthenticationGetProviderArgType, scopes AuthenticationGetScopesArgType, status AuthenticationGetStatusArgType) *Authentication { - this := Authentication{} - setAuthenticationGetAutoDiscoverUrlAttributeType(&this.AutoDiscoverUrl, autoDiscoverUrl) - setAuthenticationGetClientIdAttributeType(&this.ClientId, clientId) - setAuthenticationGetCreatedAtAttributeType(&this.CreatedAt, createdAt) - setAuthenticationGetIconUrlAttributeType(&this.IconUrl, iconUrl) - setAuthenticationGetIdAttributeType(&this.Id, id) - setAuthenticationGetNameAttributeType(&this.Name, name) - setAuthenticationGetProviderAttributeType(&this.Provider, provider) - setAuthenticationGetScopesAttributeType(&this.Scopes, scopes) - setAuthenticationGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewAuthenticationWithDefaults instantiates a new Authentication 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 NewAuthenticationWithDefaults() *Authentication { - this := Authentication{} - return &this -} - -// GetAutoDiscoverUrl returns the AutoDiscoverUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetAutoDiscoverUrl() (ret AuthenticationGetAutoDiscoverUrlRetType) { - ret, _ = o.GetAutoDiscoverUrlOk() - return ret -} - -// GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl 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 *Authentication) GetAutoDiscoverUrlOk() (ret AuthenticationGetAutoDiscoverUrlRetType, ok bool) { - return getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl) -} - -// SetAutoDiscoverUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetAutoDiscoverUrl(v AuthenticationGetAutoDiscoverUrlRetType) { - setAuthenticationGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v) -} - -// GetClientId returns the ClientId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetClientId() (ret AuthenticationGetClientIdRetType) { - ret, _ = o.GetClientIdOk() - return ret -} - -// GetClientIdOk returns a tuple with the ClientId 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 *Authentication) GetClientIdOk() (ret AuthenticationGetClientIdRetType, ok bool) { - return getAuthenticationGetClientIdAttributeTypeOk(o.ClientId) -} - -// SetClientId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetClientId(v AuthenticationGetClientIdRetType) { - setAuthenticationGetClientIdAttributeType(&o.ClientId, v) -} - -// GetCreatedAt returns the CreatedAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetCreatedAt() (ret AuthenticationGetCreatedAtRetType) { - ret, _ = o.GetCreatedAtOk() - return ret -} - -// GetCreatedAtOk returns a tuple with the CreatedAt 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 *Authentication) GetCreatedAtOk() (ret AuthenticationGetCreatedAtRetType, ok bool) { - return getAuthenticationGetCreatedAtAttributeTypeOk(o.CreatedAt) -} - -// SetCreatedAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetCreatedAt(v AuthenticationGetCreatedAtRetType) { - setAuthenticationGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetIconUrl returns the IconUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetIconUrl() (ret AuthenticationGetIconUrlRetType) { - ret, _ = o.GetIconUrlOk() - return ret -} - -// GetIconUrlOk returns a tuple with the IconUrl 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 *Authentication) GetIconUrlOk() (ret AuthenticationGetIconUrlRetType, ok bool) { - return getAuthenticationGetIconUrlAttributeTypeOk(o.IconUrl) -} - -// SetIconUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetIconUrl(v AuthenticationGetIconUrlRetType) { - setAuthenticationGetIconUrlAttributeType(&o.IconUrl, 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 *Authentication) GetId() (ret AuthenticationGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// 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 *Authentication) GetIdOk() (ret AuthenticationGetIdRetType, ok bool) { - return getAuthenticationGetIdAttributeTypeOk(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 *Authentication) SetId(v AuthenticationGetIdRetType) { - setAuthenticationGetIdAttributeType(&o.Id, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetName() (ret AuthenticationGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetNameOk() (ret AuthenticationGetNameRetType, ok bool) { - return getAuthenticationGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetName(v AuthenticationGetNameRetType) { - setAuthenticationGetNameAttributeType(&o.Name, v) -} - -// GetProvider returns the Provider field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetProvider() (ret AuthenticationGetProviderRetType) { - ret, _ = o.GetProviderOk() - return ret -} - -// GetProviderOk returns a tuple with the Provider 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 *Authentication) GetProviderOk() (ret AuthenticationGetProviderRetType, ok bool) { - return getAuthenticationGetProviderAttributeTypeOk(o.Provider) -} - -// SetProvider sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetProvider(v AuthenticationGetProviderRetType) { - setAuthenticationGetProviderAttributeType(&o.Provider, v) -} - -// GetScopes returns the Scopes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) GetScopes() (ret AuthenticationGetScopesRetType) { - ret, _ = o.GetScopesOk() - return ret -} - -// GetScopesOk returns a tuple with the Scopes 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 *Authentication) GetScopesOk() (ret AuthenticationGetScopesRetType, ok bool) { - return getAuthenticationGetScopesAttributeTypeOk(o.Scopes) -} - -// SetScopes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Authentication) SetScopes(v AuthenticationGetScopesRetType) { - setAuthenticationGetScopesAttributeType(&o.Scopes, 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 *Authentication) GetStatus() (ret AuthenticationGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// 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 *Authentication) GetStatusOk() (ret AuthenticationGetStatusRetType, ok bool) { - return getAuthenticationGetStatusAttributeTypeOk(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 *Authentication) SetStatus(v AuthenticationGetStatusRetType) { - setAuthenticationGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Authentication) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok { - toSerialize["AutoDiscoverUrl"] = val - } - if val, ok := getAuthenticationGetClientIdAttributeTypeOk(o.ClientId); ok { - toSerialize["ClientId"] = val - } - if val, ok := getAuthenticationGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getAuthenticationGetIconUrlAttributeTypeOk(o.IconUrl); ok { - toSerialize["IconUrl"] = val - } - if val, ok := getAuthenticationGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getAuthenticationGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getAuthenticationGetProviderAttributeTypeOk(o.Provider); ok { - toSerialize["Provider"] = val - } - if val, ok := getAuthenticationGetScopesAttributeTypeOk(o.Scopes); ok { - toSerialize["Scopes"] = val - } - if val, ok := getAuthenticationGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuthentication struct { - value *Authentication - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuthentication) Get() *Authentication { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuthentication) Set(val *Authentication) { - 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 NullableAuthentication) 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 *NullableAuthentication) 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 NewNullableAuthentication(val *Authentication) *NullableAuthentication { - return &NullableAuthentication{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 NullableAuthentication) 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 *NullableAuthentication) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_authentication_list.go b/services/git/model_authentication_list.go deleted file mode 100644 index 7d7f44e59f..0000000000 --- a/services/git/model_authentication_list.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the AuthenticationList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthenticationList{} - -/* - types and functions for authentication -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationListGetAuthenticationAttributeType = *[]Authentication - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationListGetAuthenticationArgType = []Authentication - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationListGetAuthenticationRetType = []Authentication - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuthenticationListGetAuthenticationAttributeTypeOk(arg AuthenticationListGetAuthenticationAttributeType) (ret AuthenticationListGetAuthenticationRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuthenticationListGetAuthenticationAttributeType(arg *AuthenticationListGetAuthenticationAttributeType, val AuthenticationListGetAuthenticationRetType) { - *arg = &val -} - -// AuthenticationList A list of authentications belonging to an Instance. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuthenticationList struct { - // REQUIRED - Authentication AuthenticationListGetAuthenticationAttributeType `json:"authentication" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AuthenticationList AuthenticationList - -// NewAuthenticationList instantiates a new AuthenticationList 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 NewAuthenticationList(authentication AuthenticationListGetAuthenticationArgType) *AuthenticationList { - this := AuthenticationList{} - setAuthenticationListGetAuthenticationAttributeType(&this.Authentication, authentication) - return &this -} - -// NewAuthenticationListWithDefaults instantiates a new AuthenticationList 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 NewAuthenticationListWithDefaults() *AuthenticationList { - this := AuthenticationList{} - return &this -} - -// GetAuthentication returns the Authentication field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuthenticationList) GetAuthentication() (ret AuthenticationListGetAuthenticationRetType) { - ret, _ = o.GetAuthenticationOk() - return ret -} - -// GetAuthenticationOk returns a tuple with the Authentication 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 *AuthenticationList) GetAuthenticationOk() (ret AuthenticationListGetAuthenticationRetType, ok bool) { - return getAuthenticationListGetAuthenticationAttributeTypeOk(o.Authentication) -} - -// SetAuthentication sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuthenticationList) SetAuthentication(v AuthenticationListGetAuthenticationRetType) { - setAuthenticationListGetAuthenticationAttributeType(&o.Authentication, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AuthenticationList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuthenticationListGetAuthenticationAttributeTypeOk(o.Authentication); ok { - toSerialize["Authentication"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuthenticationList struct { - value *AuthenticationList - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuthenticationList) Get() *AuthenticationList { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuthenticationList) Set(val *AuthenticationList) { - 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 NullableAuthenticationList) 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 *NullableAuthenticationList) 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 NewNullableAuthenticationList(val *AuthenticationList) *NullableAuthenticationList { - return &NullableAuthenticationList{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 NullableAuthenticationList) 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 *NullableAuthenticationList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_authentication_list_test.go b/services/git/model_authentication_list_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_authentication_list_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_authentication_test.go b/services/git/model_authentication_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_authentication_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_bad_error_response.go b/services/git/model_bad_error_response.go deleted file mode 100644 index 9d4a911e45..0000000000 --- a/services/git/model_bad_error_response.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the BadErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BadErrorResponse{} - -/* - types and functions for details -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponseGetDetailsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBadErrorResponseGetDetailsAttributeTypeOk(arg BadErrorResponseGetDetailsAttributeType) (ret BadErrorResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBadErrorResponseGetDetailsAttributeType(arg *BadErrorResponseGetDetailsAttributeType, val BadErrorResponseGetDetailsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponseGetDetailsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponseGetDetailsRetType = string - -/* - types and functions for error -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponseGetErrorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBadErrorResponseGetErrorAttributeTypeOk(arg BadErrorResponseGetErrorAttributeType) (ret BadErrorResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBadErrorResponseGetErrorAttributeType(arg *BadErrorResponseGetErrorAttributeType, val BadErrorResponseGetErrorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponseGetErrorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponseGetErrorRetType = string - -// BadErrorResponse 400 Error Response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BadErrorResponse struct { - Details BadErrorResponseGetDetailsAttributeType `json:"details,omitempty"` - Error BadErrorResponseGetErrorAttributeType `json:"error,omitempty"` -} - -// NewBadErrorResponse instantiates a new BadErrorResponse 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 NewBadErrorResponse() *BadErrorResponse { - this := BadErrorResponse{} - return &this -} - -// NewBadErrorResponseWithDefaults instantiates a new BadErrorResponse 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 NewBadErrorResponseWithDefaults() *BadErrorResponse { - this := BadErrorResponse{} - return &this -} - -// GetDetails returns the Details field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) GetDetails() (res BadErrorResponseGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) GetDetailsOk() (ret BadErrorResponseGetDetailsRetType, ok bool) { - return getBadErrorResponseGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) SetDetails(v BadErrorResponseGetDetailsRetType) { - setBadErrorResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetError returns the Error field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) GetError() (res BadErrorResponseGetErrorRetType) { - res, _ = o.GetErrorOk() - return -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) GetErrorOk() (ret BadErrorResponseGetErrorRetType, ok bool) { - return getBadErrorResponseGetErrorAttributeTypeOk(o.Error) -} - -// HasError returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) HasError() bool { - _, ok := o.GetErrorOk() - return ok -} - -// SetError gets a reference to the given string and assigns it to the Error field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BadErrorResponse) SetError(v BadErrorResponseGetErrorRetType) { - setBadErrorResponseGetErrorAttributeType(&o.Error, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BadErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBadErrorResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getBadErrorResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBadErrorResponse struct { - value *BadErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBadErrorResponse) Get() *BadErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBadErrorResponse) Set(val *BadErrorResponse) { - 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 NullableBadErrorResponse) 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 *NullableBadErrorResponse) 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 NewNullableBadErrorResponse(val *BadErrorResponse) *NullableBadErrorResponse { - return &NullableBadErrorResponse{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 NullableBadErrorResponse) 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 *NullableBadErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_bad_error_response_test.go b/services/git/model_bad_error_response_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_bad_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_conflict_error_response.go b/services/git/model_conflict_error_response.go deleted file mode 100644 index bd30dabe2a..0000000000 --- a/services/git/model_conflict_error_response.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the ConflictErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConflictErrorResponse{} - -/* - types and functions for details -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponseGetDetailsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConflictErrorResponseGetDetailsAttributeTypeOk(arg ConflictErrorResponseGetDetailsAttributeType) (ret ConflictErrorResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConflictErrorResponseGetDetailsAttributeType(arg *ConflictErrorResponseGetDetailsAttributeType, val ConflictErrorResponseGetDetailsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponseGetDetailsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponseGetDetailsRetType = string - -/* - types and functions for error -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponseGetErrorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConflictErrorResponseGetErrorAttributeTypeOk(arg ConflictErrorResponseGetErrorAttributeType) (ret ConflictErrorResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConflictErrorResponseGetErrorAttributeType(arg *ConflictErrorResponseGetErrorAttributeType, val ConflictErrorResponseGetErrorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponseGetErrorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponseGetErrorRetType = string - -// ConflictErrorResponse 409 Error Response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConflictErrorResponse struct { - Details ConflictErrorResponseGetDetailsAttributeType `json:"details,omitempty"` - Error ConflictErrorResponseGetErrorAttributeType `json:"error,omitempty"` -} - -// NewConflictErrorResponse instantiates a new ConflictErrorResponse 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 NewConflictErrorResponse() *ConflictErrorResponse { - this := ConflictErrorResponse{} - return &this -} - -// NewConflictErrorResponseWithDefaults instantiates a new ConflictErrorResponse 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 NewConflictErrorResponseWithDefaults() *ConflictErrorResponse { - this := ConflictErrorResponse{} - return &this -} - -// GetDetails returns the Details field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) GetDetails() (res ConflictErrorResponseGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) GetDetailsOk() (ret ConflictErrorResponseGetDetailsRetType, ok bool) { - return getConflictErrorResponseGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) SetDetails(v ConflictErrorResponseGetDetailsRetType) { - setConflictErrorResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetError returns the Error field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) GetError() (res ConflictErrorResponseGetErrorRetType) { - res, _ = o.GetErrorOk() - return -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) GetErrorOk() (ret ConflictErrorResponseGetErrorRetType, ok bool) { - return getConflictErrorResponseGetErrorAttributeTypeOk(o.Error) -} - -// HasError returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) HasError() bool { - _, ok := o.GetErrorOk() - return ok -} - -// SetError gets a reference to the given string and assigns it to the Error field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConflictErrorResponse) SetError(v ConflictErrorResponseGetErrorRetType) { - setConflictErrorResponseGetErrorAttributeType(&o.Error, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ConflictErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getConflictErrorResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getConflictErrorResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConflictErrorResponse struct { - value *ConflictErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConflictErrorResponse) Get() *ConflictErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConflictErrorResponse) Set(val *ConflictErrorResponse) { - 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 NullableConflictErrorResponse) 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 *NullableConflictErrorResponse) 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 NewNullableConflictErrorResponse(val *ConflictErrorResponse) *NullableConflictErrorResponse { - return &NullableConflictErrorResponse{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 NullableConflictErrorResponse) 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 *NullableConflictErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_conflict_error_response_test.go b/services/git/model_conflict_error_response_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_conflict_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_create_authentication_payload.go b/services/git/model_create_authentication_payload.go deleted file mode 100644 index 77fead5cee..0000000000 --- a/services/git/model_create_authentication_payload.go +++ /dev/null @@ -1,493 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the CreateAuthenticationPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateAuthenticationPayload{} - -/* - types and functions for auto_discover_url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(arg CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType) (ret CreateAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType(arg *CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType, val CreateAuthenticationPayloadGetAutoDiscoverUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetAutoDiscoverUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetAutoDiscoverUrlRetType = string - -/* - types and functions for client_id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetClientIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetClientIdAttributeTypeOk(arg CreateAuthenticationPayloadGetClientIdAttributeType) (ret CreateAuthenticationPayloadGetClientIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetClientIdAttributeType(arg *CreateAuthenticationPayloadGetClientIdAttributeType, val CreateAuthenticationPayloadGetClientIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetClientIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetClientIdRetType = string - -/* - types and functions for client_secret -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetClientSecretAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetClientSecretAttributeTypeOk(arg CreateAuthenticationPayloadGetClientSecretAttributeType) (ret CreateAuthenticationPayloadGetClientSecretRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetClientSecretAttributeType(arg *CreateAuthenticationPayloadGetClientSecretAttributeType, val CreateAuthenticationPayloadGetClientSecretRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetClientSecretArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetClientSecretRetType = string - -/* - types and functions for icon_url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetIconUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetIconUrlAttributeTypeOk(arg CreateAuthenticationPayloadGetIconUrlAttributeType) (ret CreateAuthenticationPayloadGetIconUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetIconUrlAttributeType(arg *CreateAuthenticationPayloadGetIconUrlAttributeType, val CreateAuthenticationPayloadGetIconUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetIconUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetIconUrlRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetNameAttributeTypeOk(arg CreateAuthenticationPayloadGetNameAttributeType) (ret CreateAuthenticationPayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetNameAttributeType(arg *CreateAuthenticationPayloadGetNameAttributeType, val CreateAuthenticationPayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetNameRetType = string - -/* - types and functions for provider -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetProviderAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetProviderAttributeTypeOk(arg CreateAuthenticationPayloadGetProviderAttributeType) (ret CreateAuthenticationPayloadGetProviderRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetProviderAttributeType(arg *CreateAuthenticationPayloadGetProviderAttributeType, val CreateAuthenticationPayloadGetProviderRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetProviderArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetProviderRetType = string - -/* - types and functions for scopes -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetScopesAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateAuthenticationPayloadGetScopesAttributeTypeOk(arg CreateAuthenticationPayloadGetScopesAttributeType) (ret CreateAuthenticationPayloadGetScopesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateAuthenticationPayloadGetScopesAttributeType(arg *CreateAuthenticationPayloadGetScopesAttributeType, val CreateAuthenticationPayloadGetScopesRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetScopesArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayloadGetScopesRetType = string - -// CreateAuthenticationPayload Properties to patch on an authentication. All fields are optional. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateAuthenticationPayload struct { - // The well-known configuration url to use for this authentication definition. - // REQUIRED - AutoDiscoverUrl CreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType `json:"auto_discover_url" required:"true"` - // The IDP client id to use. - // REQUIRED - ClientId CreateAuthenticationPayloadGetClientIdAttributeType `json:"client_id" required:"true"` - // The IDP client secret to use. - // REQUIRED - ClientSecret CreateAuthenticationPayloadGetClientSecretAttributeType `json:"client_secret" required:"true"` - // The url of the icon to use for this authentication definition. - IconUrl CreateAuthenticationPayloadGetIconUrlAttributeType `json:"icon_url,omitempty"` - // The name to identify an authentication definition associated with a STACKIT Git instance. - // REQUIRED - Name CreateAuthenticationPayloadGetNameAttributeType `json:"name" required:"true"` - // The Oauth2 provider to use. - Provider CreateAuthenticationPayloadGetProviderAttributeType `json:"provider,omitempty"` - // Scopes defines the OIDC scopes to request. - Scopes CreateAuthenticationPayloadGetScopesAttributeType `json:"scopes,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateAuthenticationPayload CreateAuthenticationPayload - -// NewCreateAuthenticationPayload instantiates a new CreateAuthenticationPayload 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 NewCreateAuthenticationPayload(autoDiscoverUrl CreateAuthenticationPayloadGetAutoDiscoverUrlArgType, clientId CreateAuthenticationPayloadGetClientIdArgType, clientSecret CreateAuthenticationPayloadGetClientSecretArgType, name CreateAuthenticationPayloadGetNameArgType) *CreateAuthenticationPayload { - this := CreateAuthenticationPayload{} - setCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType(&this.AutoDiscoverUrl, autoDiscoverUrl) - setCreateAuthenticationPayloadGetClientIdAttributeType(&this.ClientId, clientId) - setCreateAuthenticationPayloadGetClientSecretAttributeType(&this.ClientSecret, clientSecret) - setCreateAuthenticationPayloadGetNameAttributeType(&this.Name, name) - return &this -} - -// NewCreateAuthenticationPayloadWithDefaults instantiates a new CreateAuthenticationPayload 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 NewCreateAuthenticationPayloadWithDefaults() *CreateAuthenticationPayload { - this := CreateAuthenticationPayload{} - var provider string = "openidConnect" - this.Provider = &provider - var scopes string = "openid profile email" - this.Scopes = &scopes - return &this -} - -// GetAutoDiscoverUrl returns the AutoDiscoverUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) GetAutoDiscoverUrl() (ret CreateAuthenticationPayloadGetAutoDiscoverUrlRetType) { - ret, _ = o.GetAutoDiscoverUrlOk() - return ret -} - -// GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl 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 *CreateAuthenticationPayload) GetAutoDiscoverUrlOk() (ret CreateAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) { - return getCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl) -} - -// SetAutoDiscoverUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetAutoDiscoverUrl(v CreateAuthenticationPayloadGetAutoDiscoverUrlRetType) { - setCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v) -} - -// GetClientId returns the ClientId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) GetClientId() (ret CreateAuthenticationPayloadGetClientIdRetType) { - ret, _ = o.GetClientIdOk() - return ret -} - -// GetClientIdOk returns a tuple with the ClientId 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 *CreateAuthenticationPayload) GetClientIdOk() (ret CreateAuthenticationPayloadGetClientIdRetType, ok bool) { - return getCreateAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId) -} - -// SetClientId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetClientId(v CreateAuthenticationPayloadGetClientIdRetType) { - setCreateAuthenticationPayloadGetClientIdAttributeType(&o.ClientId, v) -} - -// GetClientSecret returns the ClientSecret field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) GetClientSecret() (ret CreateAuthenticationPayloadGetClientSecretRetType) { - ret, _ = o.GetClientSecretOk() - return ret -} - -// GetClientSecretOk returns a tuple with the ClientSecret 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 *CreateAuthenticationPayload) GetClientSecretOk() (ret CreateAuthenticationPayloadGetClientSecretRetType, ok bool) { - return getCreateAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret) -} - -// SetClientSecret sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetClientSecret(v CreateAuthenticationPayloadGetClientSecretRetType) { - setCreateAuthenticationPayloadGetClientSecretAttributeType(&o.ClientSecret, v) -} - -// GetIconUrl returns the IconUrl 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 *CreateAuthenticationPayload) GetIconUrl() (res CreateAuthenticationPayloadGetIconUrlRetType) { - res, _ = o.GetIconUrlOk() - return -} - -// GetIconUrlOk returns a tuple with the IconUrl 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 *CreateAuthenticationPayload) GetIconUrlOk() (ret CreateAuthenticationPayloadGetIconUrlRetType, ok bool) { - return getCreateAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl) -} - -// HasIconUrl 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 *CreateAuthenticationPayload) HasIconUrl() bool { - _, ok := o.GetIconUrlOk() - return ok -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetIconUrl(v CreateAuthenticationPayloadGetIconUrlRetType) { - setCreateAuthenticationPayloadGetIconUrlAttributeType(&o.IconUrl, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) GetName() (ret CreateAuthenticationPayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) GetNameOk() (ret CreateAuthenticationPayloadGetNameRetType, ok bool) { - return getCreateAuthenticationPayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetName(v CreateAuthenticationPayloadGetNameRetType) { - setCreateAuthenticationPayloadGetNameAttributeType(&o.Name, v) -} - -// GetProvider returns the Provider 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 *CreateAuthenticationPayload) GetProvider() (res CreateAuthenticationPayloadGetProviderRetType) { - res, _ = o.GetProviderOk() - return -} - -// GetProviderOk returns a tuple with the Provider 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 *CreateAuthenticationPayload) GetProviderOk() (ret CreateAuthenticationPayloadGetProviderRetType, ok bool) { - return getCreateAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider) -} - -// HasProvider 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 *CreateAuthenticationPayload) HasProvider() bool { - _, ok := o.GetProviderOk() - return ok -} - -// SetProvider gets a reference to the given string and assigns it to the Provider field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetProvider(v CreateAuthenticationPayloadGetProviderRetType) { - setCreateAuthenticationPayloadGetProviderAttributeType(&o.Provider, v) -} - -// GetScopes returns the Scopes 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 *CreateAuthenticationPayload) GetScopes() (res CreateAuthenticationPayloadGetScopesRetType) { - res, _ = o.GetScopesOk() - return -} - -// GetScopesOk returns a tuple with the Scopes 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 *CreateAuthenticationPayload) GetScopesOk() (ret CreateAuthenticationPayloadGetScopesRetType, ok bool) { - return getCreateAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes) -} - -// HasScopes 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 *CreateAuthenticationPayload) HasScopes() bool { - _, ok := o.GetScopesOk() - return ok -} - -// SetScopes gets a reference to the given string and assigns it to the Scopes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateAuthenticationPayload) SetScopes(v CreateAuthenticationPayloadGetScopesRetType) { - setCreateAuthenticationPayloadGetScopesAttributeType(&o.Scopes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateAuthenticationPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok { - toSerialize["AutoDiscoverUrl"] = val - } - if val, ok := getCreateAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId); ok { - toSerialize["ClientId"] = val - } - if val, ok := getCreateAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret); ok { - toSerialize["ClientSecret"] = val - } - if val, ok := getCreateAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl); ok { - toSerialize["IconUrl"] = val - } - if val, ok := getCreateAuthenticationPayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCreateAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider); ok { - toSerialize["Provider"] = val - } - if val, ok := getCreateAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes); ok { - toSerialize["Scopes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateAuthenticationPayload struct { - value *CreateAuthenticationPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateAuthenticationPayload) Get() *CreateAuthenticationPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateAuthenticationPayload) Set(val *CreateAuthenticationPayload) { - 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 NullableCreateAuthenticationPayload) 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 *NullableCreateAuthenticationPayload) 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 NewNullableCreateAuthenticationPayload(val *CreateAuthenticationPayload) *NullableCreateAuthenticationPayload { - return &NullableCreateAuthenticationPayload{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 NullableCreateAuthenticationPayload) 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 *NullableCreateAuthenticationPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_create_authentication_payload_test.go b/services/git/model_create_authentication_payload_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_create_authentication_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_create_instance_payload.go b/services/git/model_create_instance_payload.go deleted file mode 100644 index 40926a74de..0000000000 --- a/services/git/model_create_instance_payload.go +++ /dev/null @@ -1,388 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "fmt" -) - -// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateInstancePayload{} - -/* - types and functions for acl -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetAclAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetAclArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetAclRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetAclAttributeType) (ret CreateInstancePayloadGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadGetAclAttributeType(arg *CreateInstancePayloadGetAclAttributeType, val CreateInstancePayloadGetAclRetType) { - *arg = &val -} - -/* - types and functions for flavor -*/ - -// isEnum - -// CreateInstancePayloadFlavor the model 'CreateInstancePayload' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadFlavor string - -// List of Flavor -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATEINSTANCEPAYLOADFLAVOR__10 CreateInstancePayloadFlavor = "git-10" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CREATEINSTANCEPAYLOADFLAVOR__100 CreateInstancePayloadFlavor = "git-100" -) - -// All allowed values of CreateInstancePayload enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedCreateInstancePayloadFlavorEnumValues = []CreateInstancePayloadFlavor{ - "git-10", - "git-100", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *CreateInstancePayloadFlavor) 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 - type TmpJson CreateInstancePayloadFlavor - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := CreateInstancePayloadFlavor(value) - for _, existing := range AllowedCreateInstancePayloadFlavorEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid CreateInstancePayload", value) -} - -// NewCreateInstancePayloadFlavorFromValue returns a pointer to a valid CreateInstancePayloadFlavor -// 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 NewCreateInstancePayloadFlavorFromValue(v CreateInstancePayloadFlavor) (*CreateInstancePayloadFlavor, error) { - ev := CreateInstancePayloadFlavor(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CreateInstancePayloadFlavor: valid values are %v", v, AllowedCreateInstancePayloadFlavorEnumValues) - } -} - -// 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 CreateInstancePayloadFlavor) IsValid() bool { - for _, existing := range AllowedCreateInstancePayloadFlavorEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to FlavorFlavor value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v CreateInstancePayloadFlavor) Ptr() *CreateInstancePayloadFlavor { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateInstancePayloadFlavor struct { - value *CreateInstancePayloadFlavor - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateInstancePayloadFlavor) Get() *CreateInstancePayloadFlavor { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateInstancePayloadFlavor) Set(val *CreateInstancePayloadFlavor) { - 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 NullableCreateInstancePayloadFlavor) 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 *NullableCreateInstancePayloadFlavor) 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 NewNullableCreateInstancePayloadFlavor(val *CreateInstancePayloadFlavor) *NullableCreateInstancePayloadFlavor { - return &NullableCreateInstancePayloadFlavor{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 NullableCreateInstancePayloadFlavor) 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 *NullableCreateInstancePayloadFlavor) 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 CreateInstancePayloadGetFlavorAttributeType = *CreateInstancePayloadFlavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetFlavorArgType = CreateInstancePayloadFlavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetFlavorRetType = CreateInstancePayloadFlavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadGetFlavorAttributeTypeOk(arg CreateInstancePayloadGetFlavorAttributeType) (ret CreateInstancePayloadGetFlavorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadGetFlavorAttributeType(arg *CreateInstancePayloadGetFlavorAttributeType, val CreateInstancePayloadGetFlavorRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadGetNameAttributeTypeOk(arg CreateInstancePayloadGetNameAttributeType) (ret CreateInstancePayloadGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadGetNameAttributeType(arg *CreateInstancePayloadGetNameAttributeType, val CreateInstancePayloadGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetNameRetType = string - -// CreateInstancePayload Request a STACKIT Git instance to be created with these properties. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayload struct { - // A list of CIDR network addresses that are allowed to access the instance. - Acl CreateInstancePayloadGetAclAttributeType `json:"acl,omitempty"` - Flavor CreateInstancePayloadGetFlavorAttributeType `json:"flavor,omitempty"` - // A user chosen name to distinguish multiple STACKIT Git instances. - // REQUIRED - Name CreateInstancePayloadGetNameAttributeType `json:"name" 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(name CreateInstancePayloadGetNameArgType) *CreateInstancePayload { - this := CreateInstancePayload{} - setCreateInstancePayloadGetNameAttributeType(&this.Name, name) - 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 -// 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 -} - -// GetAcl returns the Acl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetAcl() (res CreateInstancePayloadGetAclRetType) { - res, _ = o.GetAclOk() - return -} - -// GetAclOk returns a tuple with the Acl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetAclOk() (ret CreateInstancePayloadGetAclRetType, ok bool) { - return getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl) -} - -// HasAcl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) HasAcl() bool { - _, ok := o.GetAclOk() - return ok -} - -// SetAcl gets a reference to the given []string and assigns it to the Acl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) SetAcl(v CreateInstancePayloadGetAclRetType) { - setCreateInstancePayloadGetAclAttributeType(&o.Acl, v) -} - -// GetFlavor returns the Flavor 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) GetFlavor() (res CreateInstancePayloadGetFlavorRetType) { - res, _ = o.GetFlavorOk() - return -} - -// GetFlavorOk returns a tuple with the Flavor 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) GetFlavorOk() (ret CreateInstancePayloadGetFlavorRetType, ok bool) { - return getCreateInstancePayloadGetFlavorAttributeTypeOk(o.Flavor) -} - -// HasFlavor 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) HasFlavor() bool { - _, ok := o.GetFlavorOk() - return ok -} - -// SetFlavor gets a reference to the given string and assigns it to the Flavor field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) SetFlavor(v CreateInstancePayloadGetFlavorRetType) { - setCreateInstancePayloadGetFlavorAttributeType(&o.Flavor, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetName() (ret CreateInstancePayloadGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetNameOk() (ret CreateInstancePayloadGetNameRetType, ok bool) { - return getCreateInstancePayloadGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) SetName(v CreateInstancePayloadGetNameRetType) { - setCreateInstancePayloadGetNameAttributeType(&o.Name, 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 := getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } - if val, ok := getCreateInstancePayloadGetFlavorAttributeTypeOk(o.Flavor); ok { - toSerialize["Flavor"] = val - } - if val, ok := getCreateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - 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/git/model_create_instance_payload_test.go b/services/git/model_create_instance_payload_test.go deleted file mode 100644 index f0259f88fc..0000000000 --- a/services/git/model_create_instance_payload_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git - -import ( - "testing" -) - -// isEnum - -func TestCreateInstancePayloadFlavor_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"git-10"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"git-100"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := CreateInstancePayloadFlavor("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/git/model_create_runner_payload.go b/services/git/model_create_runner_payload.go deleted file mode 100644 index 9e57f8da07..0000000000 --- a/services/git/model_create_runner_payload.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the CreateRunnerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateRunnerPayload{} - -/* - types and functions for labels -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateRunnerPayloadGetLabelsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateRunnerPayloadGetLabelsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateRunnerPayloadGetLabelsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateRunnerPayloadGetLabelsAttributeTypeOk(arg CreateRunnerPayloadGetLabelsAttributeType) (ret CreateRunnerPayloadGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateRunnerPayloadGetLabelsAttributeType(arg *CreateRunnerPayloadGetLabelsAttributeType, val CreateRunnerPayloadGetLabelsRetType) { - *arg = &val -} - -// CreateRunnerPayload Request a runner to be created supporting the requested list of runtime labels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateRunnerPayload struct { - // REQUIRED - Labels CreateRunnerPayloadGetLabelsAttributeType `json:"labels" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateRunnerPayload CreateRunnerPayload - -// NewCreateRunnerPayload instantiates a new CreateRunnerPayload 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 NewCreateRunnerPayload(labels CreateRunnerPayloadGetLabelsArgType) *CreateRunnerPayload { - this := CreateRunnerPayload{} - setCreateRunnerPayloadGetLabelsAttributeType(&this.Labels, labels) - return &this -} - -// NewCreateRunnerPayloadWithDefaults instantiates a new CreateRunnerPayload 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 NewCreateRunnerPayloadWithDefaults() *CreateRunnerPayload { - this := CreateRunnerPayload{} - return &this -} - -// GetLabels returns the Labels field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateRunnerPayload) GetLabels() (ret CreateRunnerPayloadGetLabelsRetType) { - ret, _ = o.GetLabelsOk() - return ret -} - -// GetLabelsOk returns a tuple with the Labels 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 *CreateRunnerPayload) GetLabelsOk() (ret CreateRunnerPayloadGetLabelsRetType, ok bool) { - return getCreateRunnerPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// SetLabels sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateRunnerPayload) SetLabels(v CreateRunnerPayloadGetLabelsRetType) { - setCreateRunnerPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateRunnerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateRunnerPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateRunnerPayload struct { - value *CreateRunnerPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateRunnerPayload) Get() *CreateRunnerPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateRunnerPayload) Set(val *CreateRunnerPayload) { - 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 NullableCreateRunnerPayload) 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 *NullableCreateRunnerPayload) 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 NewNullableCreateRunnerPayload(val *CreateRunnerPayload) *NullableCreateRunnerPayload { - return &NullableCreateRunnerPayload{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 NullableCreateRunnerPayload) 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 *NullableCreateRunnerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_create_runner_payload_test.go b/services/git/model_create_runner_payload_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_create_runner_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_feature_toggle.go b/services/git/model_feature_toggle.go deleted file mode 100644 index b2255d409e..0000000000 --- a/services/git/model_feature_toggle.go +++ /dev/null @@ -1,436 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "fmt" -) - -// checks if the FeatureToggle type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FeatureToggle{} - -/* - types and functions for default_email_notifications -*/ - -// isEnum - -// FeatureToggleDefaultEmailNotifications Default email notifications. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureToggleDefaultEmailNotifications string - -// List of DefaultEmailNotifications -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FEATURETOGGLEDEFAULT_EMAIL_NOTIFICATIONS_ENABLED FeatureToggleDefaultEmailNotifications = "enabled" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FEATURETOGGLEDEFAULT_EMAIL_NOTIFICATIONS_DISABLED FeatureToggleDefaultEmailNotifications = "disabled" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FEATURETOGGLEDEFAULT_EMAIL_NOTIFICATIONS_ONMENTION FeatureToggleDefaultEmailNotifications = "onmention" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FEATURETOGGLEDEFAULT_EMAIL_NOTIFICATIONS_ANDYOUROWN FeatureToggleDefaultEmailNotifications = "andyourown" -) - -// All allowed values of FeatureToggle enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedFeatureToggleDefaultEmailNotificationsEnumValues = []FeatureToggleDefaultEmailNotifications{ - "enabled", - "disabled", - "onmention", - "andyourown", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *FeatureToggleDefaultEmailNotifications) 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 - type TmpJson FeatureToggleDefaultEmailNotifications - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := FeatureToggleDefaultEmailNotifications(value) - for _, existing := range AllowedFeatureToggleDefaultEmailNotificationsEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid FeatureToggle", value) -} - -// NewFeatureToggleDefaultEmailNotificationsFromValue returns a pointer to a valid FeatureToggleDefaultEmailNotifications -// 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 NewFeatureToggleDefaultEmailNotificationsFromValue(v FeatureToggleDefaultEmailNotifications) (*FeatureToggleDefaultEmailNotifications, error) { - ev := FeatureToggleDefaultEmailNotifications(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for FeatureToggleDefaultEmailNotifications: valid values are %v", v, AllowedFeatureToggleDefaultEmailNotificationsEnumValues) - } -} - -// 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 FeatureToggleDefaultEmailNotifications) IsValid() bool { - for _, existing := range AllowedFeatureToggleDefaultEmailNotificationsEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to DefaultEmailNotificationsDefaultEmailNotifications value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v FeatureToggleDefaultEmailNotifications) Ptr() *FeatureToggleDefaultEmailNotifications { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFeatureToggleDefaultEmailNotifications struct { - value *FeatureToggleDefaultEmailNotifications - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFeatureToggleDefaultEmailNotifications) Get() *FeatureToggleDefaultEmailNotifications { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFeatureToggleDefaultEmailNotifications) Set(val *FeatureToggleDefaultEmailNotifications) { - 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 NullableFeatureToggleDefaultEmailNotifications) 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 *NullableFeatureToggleDefaultEmailNotifications) 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 NewNullableFeatureToggleDefaultEmailNotifications(val *FeatureToggleDefaultEmailNotifications) *NullableFeatureToggleDefaultEmailNotifications { - return &NullableFeatureToggleDefaultEmailNotifications{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 NullableFeatureToggleDefaultEmailNotifications) 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 *NullableFeatureToggleDefaultEmailNotifications) 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 FeatureToggleGetDefaultEmailNotificationsAttributeType = *FeatureToggleDefaultEmailNotifications - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureToggleGetDefaultEmailNotificationsArgType = *FeatureToggleDefaultEmailNotifications - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureToggleGetDefaultEmailNotificationsRetType = *FeatureToggleDefaultEmailNotifications - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFeatureToggleGetDefaultEmailNotificationsAttributeTypeOk(arg FeatureToggleGetDefaultEmailNotificationsAttributeType) (ret FeatureToggleGetDefaultEmailNotificationsRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFeatureToggleGetDefaultEmailNotificationsAttributeType(arg *FeatureToggleGetDefaultEmailNotificationsAttributeType, val FeatureToggleGetDefaultEmailNotificationsRetType) { - *arg = val -} - -/* - types and functions for enable_commit_signatures -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureTogglegetEnableCommitSignaturesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureTogglegetEnableCommitSignaturesArgType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureTogglegetEnableCommitSignaturesRetType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFeatureTogglegetEnableCommitSignaturesAttributeTypeOk(arg FeatureTogglegetEnableCommitSignaturesAttributeType) (ret FeatureTogglegetEnableCommitSignaturesRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFeatureTogglegetEnableCommitSignaturesAttributeType(arg *FeatureTogglegetEnableCommitSignaturesAttributeType, val FeatureTogglegetEnableCommitSignaturesRetType) { - *arg = val -} - -/* - types and functions for enable_local_login -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureTogglegetEnableLocalLoginAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureTogglegetEnableLocalLoginArgType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureTogglegetEnableLocalLoginRetType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFeatureTogglegetEnableLocalLoginAttributeTypeOk(arg FeatureTogglegetEnableLocalLoginAttributeType) (ret FeatureTogglegetEnableLocalLoginRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFeatureTogglegetEnableLocalLoginAttributeType(arg *FeatureTogglegetEnableLocalLoginAttributeType, val FeatureTogglegetEnableLocalLoginRetType) { - *arg = val -} - -// FeatureToggle Feature toggles for the instance. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FeatureToggle struct { - // Default email notifications. - DefaultEmailNotifications FeatureToggleGetDefaultEmailNotificationsAttributeType `json:"default_email_notifications,omitempty"` - // Enable commit signatures. - EnableCommitSignatures FeatureTogglegetEnableCommitSignaturesAttributeType `json:"enable_commit_signatures,omitempty"` - // Enable local login. - EnableLocalLogin FeatureTogglegetEnableLocalLoginAttributeType `json:"enable_local_login,omitempty"` -} - -// NewFeatureToggle instantiates a new FeatureToggle 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 NewFeatureToggle() *FeatureToggle { - this := FeatureToggle{} - return &this -} - -// NewFeatureToggleWithDefaults instantiates a new FeatureToggle 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 NewFeatureToggleWithDefaults() *FeatureToggle { - this := FeatureToggle{} - return &this -} - -// GetDefaultEmailNotifications returns the DefaultEmailNotifications field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) GetDefaultEmailNotifications() (res FeatureToggleGetDefaultEmailNotificationsRetType) { - res, _ = o.GetDefaultEmailNotificationsOk() - return -} - -// GetDefaultEmailNotificationsOk returns a tuple with the DefaultEmailNotifications field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) GetDefaultEmailNotificationsOk() (ret FeatureToggleGetDefaultEmailNotificationsRetType, ok bool) { - return getFeatureToggleGetDefaultEmailNotificationsAttributeTypeOk(o.DefaultEmailNotifications) -} - -// HasDefaultEmailNotifications 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 *FeatureToggle) HasDefaultEmailNotifications() bool { - _, ok := o.GetDefaultEmailNotificationsOk() - return ok -} - -// SetDefaultEmailNotifications gets a reference to the given string and assigns it to the DefaultEmailNotifications field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) SetDefaultEmailNotifications(v FeatureToggleGetDefaultEmailNotificationsRetType) { - setFeatureToggleGetDefaultEmailNotificationsAttributeType(&o.DefaultEmailNotifications, v) -} - -// SetDefaultEmailNotificationsNil sets the value for DefaultEmailNotifications to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) SetDefaultEmailNotificationsNil() { - o.DefaultEmailNotifications = nil -} - -// UnsetDefaultEmailNotifications ensures that no value is present for DefaultEmailNotifications, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) UnsetDefaultEmailNotifications() { - o.DefaultEmailNotifications = nil -} - -// GetEnableCommitSignatures returns the EnableCommitSignatures field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) GetEnableCommitSignatures() (res FeatureTogglegetEnableCommitSignaturesRetType) { - res, _ = o.GetEnableCommitSignaturesOk() - return -} - -// GetEnableCommitSignaturesOk returns a tuple with the EnableCommitSignatures field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) GetEnableCommitSignaturesOk() (ret FeatureTogglegetEnableCommitSignaturesRetType, ok bool) { - return getFeatureTogglegetEnableCommitSignaturesAttributeTypeOk(o.EnableCommitSignatures) -} - -// HasEnableCommitSignatures 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 *FeatureToggle) HasEnableCommitSignatures() bool { - _, ok := o.GetEnableCommitSignaturesOk() - return ok -} - -// SetEnableCommitSignatures gets a reference to the given bool and assigns it to the EnableCommitSignatures field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) SetEnableCommitSignatures(v FeatureTogglegetEnableCommitSignaturesRetType) { - setFeatureTogglegetEnableCommitSignaturesAttributeType(&o.EnableCommitSignatures, v) -} - -// SetEnableCommitSignaturesNil sets the value for EnableCommitSignatures to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) SetEnableCommitSignaturesNil() { - o.EnableCommitSignatures = nil -} - -// UnsetEnableCommitSignatures ensures that no value is present for EnableCommitSignatures, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) UnsetEnableCommitSignatures() { - o.EnableCommitSignatures = nil -} - -// GetEnableLocalLogin returns the EnableLocalLogin field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) GetEnableLocalLogin() (res FeatureTogglegetEnableLocalLoginRetType) { - res, _ = o.GetEnableLocalLoginOk() - return -} - -// GetEnableLocalLoginOk returns a tuple with the EnableLocalLogin field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) GetEnableLocalLoginOk() (ret FeatureTogglegetEnableLocalLoginRetType, ok bool) { - return getFeatureTogglegetEnableLocalLoginAttributeTypeOk(o.EnableLocalLogin) -} - -// HasEnableLocalLogin 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 *FeatureToggle) HasEnableLocalLogin() bool { - _, ok := o.GetEnableLocalLoginOk() - return ok -} - -// SetEnableLocalLogin gets a reference to the given bool and assigns it to the EnableLocalLogin field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) SetEnableLocalLogin(v FeatureTogglegetEnableLocalLoginRetType) { - setFeatureTogglegetEnableLocalLoginAttributeType(&o.EnableLocalLogin, v) -} - -// SetEnableLocalLoginNil sets the value for EnableLocalLogin to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) SetEnableLocalLoginNil() { - o.EnableLocalLogin = nil -} - -// UnsetEnableLocalLogin ensures that no value is present for EnableLocalLogin, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FeatureToggle) UnsetEnableLocalLogin() { - o.EnableLocalLogin = nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o FeatureToggle) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getFeatureToggleGetDefaultEmailNotificationsAttributeTypeOk(o.DefaultEmailNotifications); ok { - toSerialize["DefaultEmailNotifications"] = val - } - if val, ok := getFeatureTogglegetEnableCommitSignaturesAttributeTypeOk(o.EnableCommitSignatures); ok { - toSerialize["EnableCommitSignatures"] = val - } - if val, ok := getFeatureTogglegetEnableLocalLoginAttributeTypeOk(o.EnableLocalLogin); ok { - toSerialize["EnableLocalLogin"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFeatureToggle struct { - value *FeatureToggle - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFeatureToggle) Get() *FeatureToggle { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFeatureToggle) Set(val *FeatureToggle) { - 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 NullableFeatureToggle) 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 *NullableFeatureToggle) 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 NewNullableFeatureToggle(val *FeatureToggle) *NullableFeatureToggle { - return &NullableFeatureToggle{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 NullableFeatureToggle) 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 *NullableFeatureToggle) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_feature_toggle_test.go b/services/git/model_feature_toggle_test.go deleted file mode 100644 index db419df584..0000000000 --- a/services/git/model_feature_toggle_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git - -import ( - "testing" -) - -// isEnum - -func TestFeatureToggleDefaultEmailNotifications_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"enabled"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"disabled"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"onmention"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"andyourown"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := FeatureToggleDefaultEmailNotifications("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/git/model_flavor.go b/services/git/model_flavor.go deleted file mode 100644 index 692b26c7cf..0000000000 --- a/services/git/model_flavor.go +++ /dev/null @@ -1,493 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "fmt" -) - -// checks if the Flavor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Flavor{} - -/* - types and functions for availability -*/ - -// isEnum - -// FlavorAvailability Defines the flavor availability. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorAvailability string - -// List of Availability -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FLAVORAVAILABILITY_AVAILABLE FlavorAvailability = "available" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FLAVORAVAILABILITY_UNAVAILABLE FlavorAvailability = "unavailable" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FLAVORAVAILABILITY_INTERNAL FlavorAvailability = "internal" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - FLAVORAVAILABILITY_DEPRECATED FlavorAvailability = "deprecated" -) - -// All allowed values of Flavor enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedFlavorAvailabilityEnumValues = []FlavorAvailability{ - "available", - "unavailable", - "internal", - "deprecated", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *FlavorAvailability) 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 - type TmpJson FlavorAvailability - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := FlavorAvailability(value) - for _, existing := range AllowedFlavorAvailabilityEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Flavor", value) -} - -// NewFlavorAvailabilityFromValue returns a pointer to a valid FlavorAvailability -// 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 NewFlavorAvailabilityFromValue(v FlavorAvailability) (*FlavorAvailability, error) { - ev := FlavorAvailability(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for FlavorAvailability: valid values are %v", v, AllowedFlavorAvailabilityEnumValues) - } -} - -// 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 FlavorAvailability) IsValid() bool { - for _, existing := range AllowedFlavorAvailabilityEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to AvailabilityAvailability value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v FlavorAvailability) Ptr() *FlavorAvailability { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFlavorAvailability struct { - value *FlavorAvailability - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFlavorAvailability) Get() *FlavorAvailability { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFlavorAvailability) Set(val *FlavorAvailability) { - 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 NullableFlavorAvailability) 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 *NullableFlavorAvailability) 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 NewNullableFlavorAvailability(val *FlavorAvailability) *NullableFlavorAvailability { - return &NullableFlavorAvailability{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 NullableFlavorAvailability) 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 *NullableFlavorAvailability) 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 FlavorGetAvailabilityAttributeType = *FlavorAvailability - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetAvailabilityArgType = FlavorAvailability - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetAvailabilityRetType = FlavorAvailability - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetAvailabilityAttributeTypeOk(arg FlavorGetAvailabilityAttributeType) (ret FlavorGetAvailabilityRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetAvailabilityAttributeType(arg *FlavorGetAvailabilityAttributeType, val FlavorGetAvailabilityRetType) { - *arg = &val -} - -/* - types and functions for description -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetDescriptionAttributeTypeOk(arg FlavorGetDescriptionAttributeType) (ret FlavorGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetDescriptionAttributeType(arg *FlavorGetDescriptionAttributeType, val FlavorGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDescriptionRetType = string - -/* - types and functions for display_name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetDisplayNameAttributeTypeOk(arg FlavorGetDisplayNameAttributeType) (ret FlavorGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetDisplayNameAttributeType(arg *FlavorGetDisplayNameAttributeType, val FlavorGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDisplayNameRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetIdAttributeTypeOk(arg FlavorGetIdAttributeType) (ret FlavorGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetIdAttributeType(arg *FlavorGetIdAttributeType, val FlavorGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetIdRetType = string - -/* - types and functions for sku -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetSkuAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetSkuAttributeTypeOk(arg FlavorGetSkuAttributeType) (ret FlavorGetSkuRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetSkuAttributeType(arg *FlavorGetSkuAttributeType, val FlavorGetSkuRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetSkuArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetSkuRetType = string - -// Flavor Describes a STACKIT Git Flavor. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Flavor struct { - // Defines the flavor availability. - // REQUIRED - Availability FlavorGetAvailabilityAttributeType `json:"availability" required:"true"` - // Flavor description. - // REQUIRED - Description FlavorGetDescriptionAttributeType `json:"description" required:"true"` - // The display name that will be shown in the Portal. - // REQUIRED - DisplayName FlavorGetDisplayNameAttributeType `json:"display_name" required:"true"` - // Flavor id. - // REQUIRED - Id FlavorGetIdAttributeType `json:"id" required:"true"` - // SAP article number. - // REQUIRED - Sku FlavorGetSkuAttributeType `json:"sku" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Flavor Flavor - -// NewFlavor instantiates a new Flavor 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 NewFlavor(availability FlavorGetAvailabilityArgType, description FlavorGetDescriptionArgType, displayName FlavorGetDisplayNameArgType, id FlavorGetIdArgType, sku FlavorGetSkuArgType) *Flavor { - this := Flavor{} - setFlavorGetAvailabilityAttributeType(&this.Availability, availability) - setFlavorGetDescriptionAttributeType(&this.Description, description) - setFlavorGetDisplayNameAttributeType(&this.DisplayName, displayName) - setFlavorGetIdAttributeType(&this.Id, id) - setFlavorGetSkuAttributeType(&this.Sku, sku) - return &this -} - -// NewFlavorWithDefaults instantiates a new Flavor 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 NewFlavorWithDefaults() *Flavor { - this := Flavor{} - return &this -} - -// GetAvailability returns the Availability field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetAvailability() (ret FlavorGetAvailabilityRetType) { - ret, _ = o.GetAvailabilityOk() - return ret -} - -// GetAvailabilityOk returns a tuple with the Availability 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 *Flavor) GetAvailabilityOk() (ret FlavorGetAvailabilityRetType, ok bool) { - return getFlavorGetAvailabilityAttributeTypeOk(o.Availability) -} - -// SetAvailability sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetAvailability(v FlavorGetAvailabilityRetType) { - setFlavorGetAvailabilityAttributeType(&o.Availability, v) -} - -// GetDescription returns the Description field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetDescription() (ret FlavorGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description 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 *Flavor) GetDescriptionOk() (ret FlavorGetDescriptionRetType, ok bool) { - return getFlavorGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetDescription(v FlavorGetDescriptionRetType) { - setFlavorGetDescriptionAttributeType(&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 *Flavor) GetDisplayName() (ret FlavorGetDisplayNameRetType) { - ret, _ = o.GetDisplayNameOk() - return ret -} - -// 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 *Flavor) GetDisplayNameOk() (ret FlavorGetDisplayNameRetType, ok bool) { - return getFlavorGetDisplayNameAttributeTypeOk(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 *Flavor) SetDisplayName(v FlavorGetDisplayNameRetType) { - setFlavorGetDisplayNameAttributeType(&o.DisplayName, 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 *Flavor) GetId() (ret FlavorGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// 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 *Flavor) GetIdOk() (ret FlavorGetIdRetType, ok bool) { - return getFlavorGetIdAttributeTypeOk(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 *Flavor) SetId(v FlavorGetIdRetType) { - setFlavorGetIdAttributeType(&o.Id, v) -} - -// GetSku returns the Sku field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetSku() (ret FlavorGetSkuRetType) { - ret, _ = o.GetSkuOk() - return ret -} - -// GetSkuOk returns a tuple with the Sku 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 *Flavor) GetSkuOk() (ret FlavorGetSkuRetType, ok bool) { - return getFlavorGetSkuAttributeTypeOk(o.Sku) -} - -// SetSku sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetSku(v FlavorGetSkuRetType) { - setFlavorGetSkuAttributeType(&o.Sku, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Flavor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getFlavorGetAvailabilityAttributeTypeOk(o.Availability); ok { - toSerialize["Availability"] = val - } - if val, ok := getFlavorGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getFlavorGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getFlavorGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getFlavorGetSkuAttributeTypeOk(o.Sku); ok { - toSerialize["Sku"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFlavor struct { - value *Flavor - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFlavor) Get() *Flavor { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFlavor) Set(val *Flavor) { - 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 NullableFlavor) 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 *NullableFlavor) 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 NewNullableFlavor(val *Flavor) *NullableFlavor { - return &NullableFlavor{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 NullableFlavor) 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 *NullableFlavor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_flavor_test.go b/services/git/model_flavor_test.go deleted file mode 100644 index 34b708ac2c..0000000000 --- a/services/git/model_flavor_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git - -import ( - "testing" -) - -// isEnum - -func TestFlavorAvailability_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"available"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"unavailable"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"internal"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"deprecated"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := FlavorAvailability("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/git/model_generic_error_response.go b/services/git/model_generic_error_response.go deleted file mode 100644 index 1d2eb1c09c..0000000000 --- a/services/git/model_generic_error_response.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the GenericErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenericErrorResponse{} - -/* - types and functions for details -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponseGetDetailsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponseGetDetailsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponseGetDetailsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGenericErrorResponseGetDetailsAttributeTypeOk(arg GenericErrorResponseGetDetailsAttributeType) (ret GenericErrorResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGenericErrorResponseGetDetailsAttributeType(arg *GenericErrorResponseGetDetailsAttributeType, val GenericErrorResponseGetDetailsRetType) { - *arg = &val -} - -/* - types and functions for message -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponseGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGenericErrorResponseGetMessageAttributeTypeOk(arg GenericErrorResponseGetMessageAttributeType) (ret GenericErrorResponseGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGenericErrorResponseGetMessageAttributeType(arg *GenericErrorResponseGetMessageAttributeType, val GenericErrorResponseGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponseGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponseGetMessageRetType = string - -// GenericErrorResponse Generic Error Response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericErrorResponse struct { - Details GenericErrorResponseGetDetailsAttributeType `json:"details,omitempty"` - // REQUIRED - Message GenericErrorResponseGetMessageAttributeType `json:"message" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GenericErrorResponse GenericErrorResponse - -// NewGenericErrorResponse instantiates a new GenericErrorResponse 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 NewGenericErrorResponse(message GenericErrorResponseGetMessageArgType) *GenericErrorResponse { - this := GenericErrorResponse{} - setGenericErrorResponseGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewGenericErrorResponseWithDefaults instantiates a new GenericErrorResponse 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 NewGenericErrorResponseWithDefaults() *GenericErrorResponse { - this := GenericErrorResponse{} - return &this -} - -// GetDetails returns the Details field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericErrorResponse) GetDetails() (res GenericErrorResponseGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericErrorResponse) GetDetailsOk() (ret GenericErrorResponseGetDetailsRetType, ok bool) { - return getGenericErrorResponseGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericErrorResponse) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given []string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericErrorResponse) SetDetails(v GenericErrorResponseGetDetailsRetType) { - setGenericErrorResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetMessage returns the Message field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericErrorResponse) GetMessage() (ret GenericErrorResponseGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message 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 *GenericErrorResponse) GetMessageOk() (ret GenericErrorResponseGetMessageRetType, ok bool) { - return getGenericErrorResponseGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericErrorResponse) SetMessage(v GenericErrorResponseGetMessageRetType) { - setGenericErrorResponseGetMessageAttributeType(&o.Message, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GenericErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGenericErrorResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getGenericErrorResponseGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGenericErrorResponse struct { - value *GenericErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGenericErrorResponse) Get() *GenericErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGenericErrorResponse) Set(val *GenericErrorResponse) { - 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 NullableGenericErrorResponse) 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 *NullableGenericErrorResponse) 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 NewNullableGenericErrorResponse(val *GenericErrorResponse) *NullableGenericErrorResponse { - return &NullableGenericErrorResponse{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 NullableGenericErrorResponse) 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 *NullableGenericErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_generic_error_response_test.go b/services/git/model_generic_error_response_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_generic_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_instance.go b/services/git/model_instance.go deleted file mode 100644 index 661e2d7fa2..0000000000 --- a/services/git/model_instance.go +++ /dev/null @@ -1,823 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the Instance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Instance{} - -/* - types and functions for acl -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetAclAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetAclArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetAclRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetAclAttributeTypeOk(arg InstanceGetAclAttributeType) (ret InstanceGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetAclAttributeType(arg *InstanceGetAclAttributeType, val InstanceGetAclRetType) { - *arg = &val -} - -/* - types and functions for consumed_disk -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetConsumedDiskAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetConsumedDiskAttributeTypeOk(arg InstanceGetConsumedDiskAttributeType) (ret InstanceGetConsumedDiskRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetConsumedDiskAttributeType(arg *InstanceGetConsumedDiskAttributeType, val InstanceGetConsumedDiskRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetConsumedDiskArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetConsumedDiskRetType = string - -/* - types and functions for consumed_object_storage -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetConsumedObjectStorageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetConsumedObjectStorageAttributeTypeOk(arg InstanceGetConsumedObjectStorageAttributeType) (ret InstanceGetConsumedObjectStorageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetConsumedObjectStorageAttributeType(arg *InstanceGetConsumedObjectStorageAttributeType, val InstanceGetConsumedObjectStorageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetConsumedObjectStorageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetConsumedObjectStorageRetType = string - -/* - types and functions for created -*/ - -// 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 - } - 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 -} - -/* - types and functions for feature_toggle -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFeatureToggleAttributeType = *FeatureToggle - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFeatureToggleArgType = FeatureToggle - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFeatureToggleRetType = FeatureToggle - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetFeatureToggleAttributeTypeOk(arg InstanceGetFeatureToggleAttributeType) (ret InstanceGetFeatureToggleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetFeatureToggleAttributeType(arg *InstanceGetFeatureToggleAttributeType, val InstanceGetFeatureToggleRetType) { - *arg = &val -} - -/* - types and functions for flavor -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFlavorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetFlavorAttributeTypeOk(arg InstanceGetFlavorAttributeType) (ret InstanceGetFlavorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetFlavorAttributeType(arg *InstanceGetFlavorAttributeType, val InstanceGetFlavorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFlavorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFlavorRetType = string - -/* - types and functions for id -*/ - -// 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 - } - 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 - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret InstanceGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetNameAttributeType(arg *InstanceGetNameAttributeType, val InstanceGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetNameRetType = string - -/* - types and functions for state -*/ - -// isEnum - -// InstanceState The current state of the STACKIT Git 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 InstanceState string - -// List of State -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - INSTANCESTATE_CREATING InstanceState = "Creating" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - INSTANCESTATE_WAITING_FOR_RESOURCES InstanceState = "WaitingForResources" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - INSTANCESTATE_UPDATING InstanceState = "Updating" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - INSTANCESTATE_DELETING InstanceState = "Deleting" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - INSTANCESTATE_READY InstanceState = "Ready" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - INSTANCESTATE_ERROR InstanceState = "Error" -) - -// 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 AllowedInstanceStateEnumValues = []InstanceState{ - "Creating", - "WaitingForResources", - "Updating", - "Deleting", - "Ready", - "Error", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *InstanceState) 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 - type TmpJson InstanceState - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := InstanceState(value) - for _, existing := range AllowedInstanceStateEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Instance", value) -} - -// NewInstanceStateFromValue returns a pointer to a valid InstanceState -// 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 NewInstanceStateFromValue(v InstanceState) (*InstanceState, error) { - ev := InstanceState(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for InstanceState: valid values are %v", v, AllowedInstanceStateEnumValues) - } -} - -// 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 InstanceState) IsValid() bool { - for _, existing := range AllowedInstanceStateEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StateState value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v InstanceState) Ptr() *InstanceState { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceState struct { - value *InstanceState - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceState) Get() *InstanceState { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceState) Set(val *InstanceState) { - 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 NullableInstanceState) 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 *NullableInstanceState) 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 NewNullableInstanceState(val *InstanceState) *NullableInstanceState { - return &NullableInstanceState{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 NullableInstanceState) 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 *NullableInstanceState) 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 InstanceGetStateAttributeType = *InstanceState - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStateArgType = InstanceState - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStateRetType = InstanceState - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetStateAttributeTypeOk(arg InstanceGetStateAttributeType) (ret InstanceGetStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetStateAttributeType(arg *InstanceGetStateAttributeType, val InstanceGetStateRetType) { - *arg = &val -} - -/* - types and functions for url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetUrlAttributeTypeOk(arg InstanceGetUrlAttributeType) (ret InstanceGetUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetUrlAttributeType(arg *InstanceGetUrlAttributeType, val InstanceGetUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetUrlRetType = string - -/* - types and functions for version -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetVersionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetVersionAttributeTypeOk(arg InstanceGetVersionAttributeType) (ret InstanceGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetVersionAttributeType(arg *InstanceGetVersionAttributeType, val InstanceGetVersionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetVersionRetType = string - -// Instance Describes a STACKIT Git instance. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Instance struct { - // Restricted ACL for instance access. - // REQUIRED - Acl InstanceGetAclAttributeType `json:"acl" required:"true"` - // How many bytes of disk space is consumed. Read Only. - // REQUIRED - ConsumedDisk InstanceGetConsumedDiskAttributeType `json:"consumed_disk" required:"true"` - // How many bytes of Object Storage is consumed. Read Only. - // REQUIRED - ConsumedObjectStorage InstanceGetConsumedObjectStorageAttributeType `json:"consumed_object_storage" required:"true"` - // The date and time the creation of the STACKIT Git instance was triggered. - // REQUIRED - Created InstanceGetCreatedAttributeType `json:"created" required:"true"` - // REQUIRED - FeatureToggle InstanceGetFeatureToggleAttributeType `json:"feature_toggle" required:"true"` - // Instance flavor. - // REQUIRED - Flavor InstanceGetFlavorAttributeType `json:"flavor" required:"true"` - // A auto generated unique id which identifies the STACKIT Git instances. - // REQUIRED - Id InstanceGetIdAttributeType `json:"id" required:"true"` - // A user chosen name to distinguish multiple STACKIT Git instances. - // REQUIRED - Name InstanceGetNameAttributeType `json:"name" required:"true"` - // The current state of the STACKIT Git instance. - // REQUIRED - State InstanceGetStateAttributeType `json:"state" required:"true"` - // The URL for reaching the STACKIT Git instance. - // REQUIRED - Url InstanceGetUrlAttributeType `json:"url" required:"true"` - // The current version of STACKIT Git deployed to the instance. - // REQUIRED - Version InstanceGetVersionAttributeType `json:"version" 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(acl InstanceGetAclArgType, consumedDisk InstanceGetConsumedDiskArgType, consumedObjectStorage InstanceGetConsumedObjectStorageArgType, created InstanceGetCreatedArgType, featureToggle InstanceGetFeatureToggleArgType, flavor InstanceGetFlavorArgType, id InstanceGetIdArgType, name InstanceGetNameArgType, state InstanceGetStateArgType, url InstanceGetUrlArgType, version InstanceGetVersionArgType) *Instance { - this := Instance{} - setInstanceGetAclAttributeType(&this.Acl, acl) - setInstanceGetConsumedDiskAttributeType(&this.ConsumedDisk, consumedDisk) - setInstanceGetConsumedObjectStorageAttributeType(&this.ConsumedObjectStorage, consumedObjectStorage) - setInstanceGetCreatedAttributeType(&this.Created, created) - setInstanceGetFeatureToggleAttributeType(&this.FeatureToggle, featureToggle) - setInstanceGetFlavorAttributeType(&this.Flavor, flavor) - setInstanceGetIdAttributeType(&this.Id, id) - setInstanceGetNameAttributeType(&this.Name, name) - setInstanceGetStateAttributeType(&this.State, state) - setInstanceGetUrlAttributeType(&this.Url, url) - setInstanceGetVersionAttributeType(&this.Version, version) - 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 -// 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 -} - -// GetAcl returns the Acl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetAcl() (ret InstanceGetAclRetType) { - ret, _ = o.GetAclOk() - return ret -} - -// GetAclOk returns a tuple with the Acl 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) GetAclOk() (ret InstanceGetAclRetType, ok bool) { - return getInstanceGetAclAttributeTypeOk(o.Acl) -} - -// SetAcl 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) SetAcl(v InstanceGetAclRetType) { - setInstanceGetAclAttributeType(&o.Acl, v) -} - -// GetConsumedDisk returns the ConsumedDisk field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetConsumedDisk() (ret InstanceGetConsumedDiskRetType) { - ret, _ = o.GetConsumedDiskOk() - return ret -} - -// GetConsumedDiskOk returns a tuple with the ConsumedDisk 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) GetConsumedDiskOk() (ret InstanceGetConsumedDiskRetType, ok bool) { - return getInstanceGetConsumedDiskAttributeTypeOk(o.ConsumedDisk) -} - -// SetConsumedDisk 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) SetConsumedDisk(v InstanceGetConsumedDiskRetType) { - setInstanceGetConsumedDiskAttributeType(&o.ConsumedDisk, v) -} - -// GetConsumedObjectStorage returns the ConsumedObjectStorage field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetConsumedObjectStorage() (ret InstanceGetConsumedObjectStorageRetType) { - ret, _ = o.GetConsumedObjectStorageOk() - return ret -} - -// GetConsumedObjectStorageOk returns a tuple with the ConsumedObjectStorage 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) GetConsumedObjectStorageOk() (ret InstanceGetConsumedObjectStorageRetType, ok bool) { - return getInstanceGetConsumedObjectStorageAttributeTypeOk(o.ConsumedObjectStorage) -} - -// SetConsumedObjectStorage 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) SetConsumedObjectStorage(v InstanceGetConsumedObjectStorageRetType) { - setInstanceGetConsumedObjectStorageAttributeType(&o.ConsumedObjectStorage, v) -} - -// 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 -} - -// 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) -} - -// GetFeatureToggle returns the FeatureToggle field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetFeatureToggle() (ret InstanceGetFeatureToggleRetType) { - ret, _ = o.GetFeatureToggleOk() - return ret -} - -// GetFeatureToggleOk returns a tuple with the FeatureToggle 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) GetFeatureToggleOk() (ret InstanceGetFeatureToggleRetType, ok bool) { - return getInstanceGetFeatureToggleAttributeTypeOk(o.FeatureToggle) -} - -// SetFeatureToggle 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) SetFeatureToggle(v InstanceGetFeatureToggleRetType) { - setInstanceGetFeatureToggleAttributeType(&o.FeatureToggle, v) -} - -// GetFlavor returns the Flavor field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetFlavor() (ret InstanceGetFlavorRetType) { - ret, _ = o.GetFlavorOk() - return ret -} - -// GetFlavorOk returns a tuple with the Flavor 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) GetFlavorOk() (ret InstanceGetFlavorRetType, ok bool) { - return getInstanceGetFlavorAttributeTypeOk(o.Flavor) -} - -// SetFlavor 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) SetFlavor(v InstanceGetFlavorRetType) { - setInstanceGetFlavorAttributeType(&o.Flavor, 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 -} - -// 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) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetName() (ret InstanceGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetNameOk() (ret InstanceGetNameRetType, ok bool) { - return getInstanceGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetName(v InstanceGetNameRetType) { - setInstanceGetNameAttributeType(&o.Name, v) -} - -// GetState returns the State field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetState() (ret InstanceGetStateRetType) { - ret, _ = o.GetStateOk() - return ret -} - -// GetStateOk returns a tuple with the State 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) GetStateOk() (ret InstanceGetStateRetType, ok bool) { - return getInstanceGetStateAttributeTypeOk(o.State) -} - -// SetState 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) SetState(v InstanceGetStateRetType) { - setInstanceGetStateAttributeType(&o.State, v) -} - -// GetUrl returns the Url field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetUrl() (ret InstanceGetUrlRetType) { - ret, _ = o.GetUrlOk() - return ret -} - -// GetUrlOk returns a tuple with the Url 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) GetUrlOk() (ret InstanceGetUrlRetType, ok bool) { - return getInstanceGetUrlAttributeTypeOk(o.Url) -} - -// SetUrl 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) SetUrl(v InstanceGetUrlRetType) { - setInstanceGetUrlAttributeType(&o.Url, v) -} - -// GetVersion returns the Version field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetVersion() (ret InstanceGetVersionRetType) { - ret, _ = o.GetVersionOk() - return ret -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetVersionOk() (ret InstanceGetVersionRetType, ok bool) { - return getInstanceGetVersionAttributeTypeOk(o.Version) -} - -// SetVersion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetVersion(v InstanceGetVersionRetType) { - setInstanceGetVersionAttributeType(&o.Version, 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 := getInstanceGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } - if val, ok := getInstanceGetConsumedDiskAttributeTypeOk(o.ConsumedDisk); ok { - toSerialize["ConsumedDisk"] = val - } - if val, ok := getInstanceGetConsumedObjectStorageAttributeTypeOk(o.ConsumedObjectStorage); ok { - toSerialize["ConsumedObjectStorage"] = val - } - if val, ok := getInstanceGetCreatedAttributeTypeOk(o.Created); ok { - toSerialize["Created"] = val - } - if val, ok := getInstanceGetFeatureToggleAttributeTypeOk(o.FeatureToggle); ok { - toSerialize["FeatureToggle"] = val - } - if val, ok := getInstanceGetFlavorAttributeTypeOk(o.Flavor); ok { - toSerialize["Flavor"] = val - } - if val, ok := getInstanceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getInstanceGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getInstanceGetStateAttributeTypeOk(o.State); ok { - toSerialize["State"] = val - } - if val, ok := getInstanceGetUrlAttributeTypeOk(o.Url); ok { - toSerialize["Url"] = val - } - if val, ok := getInstanceGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - 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/git/model_instance_test.go b/services/git/model_instance_test.go deleted file mode 100644 index 1dfc7e2c6a..0000000000 --- a/services/git/model_instance_test.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git - -import ( - "testing" -) - -// isEnum - -func TestInstanceState_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"Creating"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"WaitingForResources"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"Updating"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"Deleting"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"Ready"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 6`, - args: args{ - src: []byte(`"Error"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := InstanceState("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/git/model_internal_server_error_response.go b/services/git/model_internal_server_error_response.go deleted file mode 100644 index 6fb77d4851..0000000000 --- a/services/git/model_internal_server_error_response.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the InternalServerErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InternalServerErrorResponse{} - -/* - types and functions for details -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponseGetDetailsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInternalServerErrorResponseGetDetailsAttributeTypeOk(arg InternalServerErrorResponseGetDetailsAttributeType) (ret InternalServerErrorResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInternalServerErrorResponseGetDetailsAttributeType(arg *InternalServerErrorResponseGetDetailsAttributeType, val InternalServerErrorResponseGetDetailsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponseGetDetailsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponseGetDetailsRetType = string - -/* - types and functions for error -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponseGetErrorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInternalServerErrorResponseGetErrorAttributeTypeOk(arg InternalServerErrorResponseGetErrorAttributeType) (ret InternalServerErrorResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInternalServerErrorResponseGetErrorAttributeType(arg *InternalServerErrorResponseGetErrorAttributeType, val InternalServerErrorResponseGetErrorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponseGetErrorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponseGetErrorRetType = string - -// InternalServerErrorResponse Internal server error. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InternalServerErrorResponse struct { - Details InternalServerErrorResponseGetDetailsAttributeType `json:"details,omitempty"` - Error InternalServerErrorResponseGetErrorAttributeType `json:"error,omitempty"` -} - -// NewInternalServerErrorResponse instantiates a new InternalServerErrorResponse 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 NewInternalServerErrorResponse() *InternalServerErrorResponse { - this := InternalServerErrorResponse{} - return &this -} - -// NewInternalServerErrorResponseWithDefaults instantiates a new InternalServerErrorResponse 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 NewInternalServerErrorResponseWithDefaults() *InternalServerErrorResponse { - this := InternalServerErrorResponse{} - return &this -} - -// GetDetails returns the Details field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) GetDetails() (res InternalServerErrorResponseGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) GetDetailsOk() (ret InternalServerErrorResponseGetDetailsRetType, ok bool) { - return getInternalServerErrorResponseGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) SetDetails(v InternalServerErrorResponseGetDetailsRetType) { - setInternalServerErrorResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetError returns the Error field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) GetError() (res InternalServerErrorResponseGetErrorRetType) { - res, _ = o.GetErrorOk() - return -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) GetErrorOk() (ret InternalServerErrorResponseGetErrorRetType, ok bool) { - return getInternalServerErrorResponseGetErrorAttributeTypeOk(o.Error) -} - -// HasError returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) HasError() bool { - _, ok := o.GetErrorOk() - return ok -} - -// SetError gets a reference to the given string and assigns it to the Error field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InternalServerErrorResponse) SetError(v InternalServerErrorResponseGetErrorRetType) { - setInternalServerErrorResponseGetErrorAttributeType(&o.Error, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InternalServerErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInternalServerErrorResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getInternalServerErrorResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInternalServerErrorResponse struct { - value *InternalServerErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInternalServerErrorResponse) Get() *InternalServerErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInternalServerErrorResponse) Set(val *InternalServerErrorResponse) { - 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 NullableInternalServerErrorResponse) 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 *NullableInternalServerErrorResponse) 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 NewNullableInternalServerErrorResponse(val *InternalServerErrorResponse) *NullableInternalServerErrorResponse { - return &NullableInternalServerErrorResponse{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 NullableInternalServerErrorResponse) 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 *NullableInternalServerErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_internal_server_error_response_test.go b/services/git/model_internal_server_error_response_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_internal_server_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_list_flavors.go b/services/git/model_list_flavors.go deleted file mode 100644 index 449521d5dc..0000000000 --- a/services/git/model_list_flavors.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the ListFlavors type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListFlavors{} - -/* - types and functions for flavors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsGetFlavorsAttributeType = *[]Flavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsGetFlavorsArgType = []Flavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsGetFlavorsRetType = []Flavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListFlavorsGetFlavorsAttributeTypeOk(arg ListFlavorsGetFlavorsAttributeType) (ret ListFlavorsGetFlavorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListFlavorsGetFlavorsAttributeType(arg *ListFlavorsGetFlavorsAttributeType, val ListFlavorsGetFlavorsRetType) { - *arg = &val -} - -// ListFlavors A list of STACKIT Git Flavors. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavors struct { - // REQUIRED - Flavors ListFlavorsGetFlavorsAttributeType `json:"flavors" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ListFlavors ListFlavors - -// NewListFlavors instantiates a new ListFlavors 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 NewListFlavors(flavors ListFlavorsGetFlavorsArgType) *ListFlavors { - this := ListFlavors{} - setListFlavorsGetFlavorsAttributeType(&this.Flavors, flavors) - return &this -} - -// NewListFlavorsWithDefaults instantiates a new ListFlavors 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 NewListFlavorsWithDefaults() *ListFlavors { - this := ListFlavors{} - return &this -} - -// GetFlavors returns the Flavors field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListFlavors) GetFlavors() (ret ListFlavorsGetFlavorsRetType) { - ret, _ = o.GetFlavorsOk() - return ret -} - -// GetFlavorsOk returns a tuple with the Flavors 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 *ListFlavors) GetFlavorsOk() (ret ListFlavorsGetFlavorsRetType, ok bool) { - return getListFlavorsGetFlavorsAttributeTypeOk(o.Flavors) -} - -// SetFlavors sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListFlavors) SetFlavors(v ListFlavorsGetFlavorsRetType) { - setListFlavorsGetFlavorsAttributeType(&o.Flavors, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListFlavors) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListFlavorsGetFlavorsAttributeTypeOk(o.Flavors); ok { - toSerialize["Flavors"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListFlavors struct { - value *ListFlavors - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListFlavors) Get() *ListFlavors { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListFlavors) Set(val *ListFlavors) { - 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 NullableListFlavors) 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 *NullableListFlavors) 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 NewNullableListFlavors(val *ListFlavors) *NullableListFlavors { - return &NullableListFlavors{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 NullableListFlavors) 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 *NullableListFlavors) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_list_flavors_test.go b/services/git/model_list_flavors_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_list_flavors_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_list_instances.go b/services/git/model_list_instances.go deleted file mode 100644 index f00c25c42f..0000000000 --- a/services/git/model_list_instances.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the ListInstances type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListInstances{} - -/* - types and functions for instances -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesGetInstancesAttributeType = *[]Instance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesGetInstancesArgType = []Instance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesGetInstancesRetType = []Instance - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListInstancesGetInstancesAttributeTypeOk(arg ListInstancesGetInstancesAttributeType) (ret ListInstancesGetInstancesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListInstancesGetInstancesAttributeType(arg *ListInstancesGetInstancesAttributeType, val ListInstancesGetInstancesRetType) { - *arg = &val -} - -// ListInstances A list of STACKIT Git instances. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstances struct { - // REQUIRED - Instances ListInstancesGetInstancesAttributeType `json:"instances" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ListInstances ListInstances - -// NewListInstances instantiates a new ListInstances 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 NewListInstances(instances ListInstancesGetInstancesArgType) *ListInstances { - this := ListInstances{} - setListInstancesGetInstancesAttributeType(&this.Instances, instances) - return &this -} - -// NewListInstancesWithDefaults instantiates a new ListInstances 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 NewListInstancesWithDefaults() *ListInstances { - this := ListInstances{} - 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 *ListInstances) GetInstances() (ret ListInstancesGetInstancesRetType) { - ret, _ = o.GetInstancesOk() - return ret -} - -// 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 *ListInstances) GetInstancesOk() (ret ListInstancesGetInstancesRetType, ok bool) { - return getListInstancesGetInstancesAttributeTypeOk(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 *ListInstances) SetInstances(v ListInstancesGetInstancesRetType) { - setListInstancesGetInstancesAttributeType(&o.Instances, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListInstances) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListInstancesGetInstancesAttributeTypeOk(o.Instances); ok { - toSerialize["Instances"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListInstances struct { - value *ListInstances - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListInstances) Get() *ListInstances { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListInstances) Set(val *ListInstances) { - 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 NullableListInstances) 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 *NullableListInstances) 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 NewNullableListInstances(val *ListInstances) *NullableListInstances { - return &NullableListInstances{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 NullableListInstances) 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 *NullableListInstances) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_list_instances_test.go b/services/git/model_list_instances_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_list_instances_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_not_found_error_response.go b/services/git/model_not_found_error_response.go deleted file mode 100644 index f63584c154..0000000000 --- a/services/git/model_not_found_error_response.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the NotFoundErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NotFoundErrorResponse{} - -/* - types and functions for details -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponseGetDetailsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNotFoundErrorResponseGetDetailsAttributeTypeOk(arg NotFoundErrorResponseGetDetailsAttributeType) (ret NotFoundErrorResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setNotFoundErrorResponseGetDetailsAttributeType(arg *NotFoundErrorResponseGetDetailsAttributeType, val NotFoundErrorResponseGetDetailsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponseGetDetailsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponseGetDetailsRetType = string - -/* - types and functions for error -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponseGetErrorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getNotFoundErrorResponseGetErrorAttributeTypeOk(arg NotFoundErrorResponseGetErrorAttributeType) (ret NotFoundErrorResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setNotFoundErrorResponseGetErrorAttributeType(arg *NotFoundErrorResponseGetErrorAttributeType, val NotFoundErrorResponseGetErrorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponseGetErrorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponseGetErrorRetType = string - -// NotFoundErrorResponse 404 Error Response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NotFoundErrorResponse struct { - Details NotFoundErrorResponseGetDetailsAttributeType `json:"details,omitempty"` - Error NotFoundErrorResponseGetErrorAttributeType `json:"error,omitempty"` -} - -// NewNotFoundErrorResponse instantiates a new NotFoundErrorResponse 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 NewNotFoundErrorResponse() *NotFoundErrorResponse { - this := NotFoundErrorResponse{} - return &this -} - -// NewNotFoundErrorResponseWithDefaults instantiates a new NotFoundErrorResponse 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 NewNotFoundErrorResponseWithDefaults() *NotFoundErrorResponse { - this := NotFoundErrorResponse{} - return &this -} - -// GetDetails returns the Details field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) GetDetails() (res NotFoundErrorResponseGetDetailsRetType) { - res, _ = o.GetDetailsOk() - return -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) GetDetailsOk() (ret NotFoundErrorResponseGetDetailsRetType, ok bool) { - return getNotFoundErrorResponseGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given string and assigns it to the Details field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) SetDetails(v NotFoundErrorResponseGetDetailsRetType) { - setNotFoundErrorResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetError returns the Error field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) GetError() (res NotFoundErrorResponseGetErrorRetType) { - res, _ = o.GetErrorOk() - return -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) GetErrorOk() (ret NotFoundErrorResponseGetErrorRetType, ok bool) { - return getNotFoundErrorResponseGetErrorAttributeTypeOk(o.Error) -} - -// HasError returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) HasError() bool { - _, ok := o.GetErrorOk() - return ok -} - -// SetError gets a reference to the given string and assigns it to the Error field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *NotFoundErrorResponse) SetError(v NotFoundErrorResponseGetErrorRetType) { - setNotFoundErrorResponseGetErrorAttributeType(&o.Error, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o NotFoundErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNotFoundErrorResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getNotFoundErrorResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableNotFoundErrorResponse struct { - value *NotFoundErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableNotFoundErrorResponse) Get() *NotFoundErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableNotFoundErrorResponse) Set(val *NotFoundErrorResponse) { - 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 NullableNotFoundErrorResponse) 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 *NullableNotFoundErrorResponse) 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 NewNullableNotFoundErrorResponse(val *NotFoundErrorResponse) *NullableNotFoundErrorResponse { - return &NullableNotFoundErrorResponse{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 NullableNotFoundErrorResponse) 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 *NullableNotFoundErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_not_found_error_response_test.go b/services/git/model_not_found_error_response_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_not_found_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_patch_authentication_payload.go b/services/git/model_patch_authentication_payload.go deleted file mode 100644 index 0821c772ee..0000000000 --- a/services/git/model_patch_authentication_payload.go +++ /dev/null @@ -1,447 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the PatchAuthenticationPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchAuthenticationPayload{} - -/* - types and functions for auto_discover_url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(arg PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType) (ret PatchAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType(arg *PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType, val PatchAuthenticationPayloadGetAutoDiscoverUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetAutoDiscoverUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetAutoDiscoverUrlRetType = string - -/* - types and functions for client_id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetClientIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchAuthenticationPayloadGetClientIdAttributeTypeOk(arg PatchAuthenticationPayloadGetClientIdAttributeType) (ret PatchAuthenticationPayloadGetClientIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchAuthenticationPayloadGetClientIdAttributeType(arg *PatchAuthenticationPayloadGetClientIdAttributeType, val PatchAuthenticationPayloadGetClientIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetClientIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetClientIdRetType = string - -/* - types and functions for client_secret -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetClientSecretAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchAuthenticationPayloadGetClientSecretAttributeTypeOk(arg PatchAuthenticationPayloadGetClientSecretAttributeType) (ret PatchAuthenticationPayloadGetClientSecretRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchAuthenticationPayloadGetClientSecretAttributeType(arg *PatchAuthenticationPayloadGetClientSecretAttributeType, val PatchAuthenticationPayloadGetClientSecretRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetClientSecretArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetClientSecretRetType = string - -/* - types and functions for icon_url -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetIconUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchAuthenticationPayloadGetIconUrlAttributeTypeOk(arg PatchAuthenticationPayloadGetIconUrlAttributeType) (ret PatchAuthenticationPayloadGetIconUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchAuthenticationPayloadGetIconUrlAttributeType(arg *PatchAuthenticationPayloadGetIconUrlAttributeType, val PatchAuthenticationPayloadGetIconUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetIconUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetIconUrlRetType = string - -/* - types and functions for provider -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetProviderAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchAuthenticationPayloadGetProviderAttributeTypeOk(arg PatchAuthenticationPayloadGetProviderAttributeType) (ret PatchAuthenticationPayloadGetProviderRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchAuthenticationPayloadGetProviderAttributeType(arg *PatchAuthenticationPayloadGetProviderAttributeType, val PatchAuthenticationPayloadGetProviderRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetProviderArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetProviderRetType = string - -/* - types and functions for scopes -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetScopesAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchAuthenticationPayloadGetScopesAttributeTypeOk(arg PatchAuthenticationPayloadGetScopesAttributeType) (ret PatchAuthenticationPayloadGetScopesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchAuthenticationPayloadGetScopesAttributeType(arg *PatchAuthenticationPayloadGetScopesAttributeType, val PatchAuthenticationPayloadGetScopesRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetScopesArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayloadGetScopesRetType = string - -// PatchAuthenticationPayload Properties to patch on an authentication. All fields are optional. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchAuthenticationPayload struct { - // The well-known configuration url to use for this authentication definition. - AutoDiscoverUrl PatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType `json:"auto_discover_url,omitempty"` - // The IDP client id to use. - ClientId PatchAuthenticationPayloadGetClientIdAttributeType `json:"client_id,omitempty"` - // The IDP client secret to use. - ClientSecret PatchAuthenticationPayloadGetClientSecretAttributeType `json:"client_secret,omitempty"` - // The url of the icon to use for this authentication definition. - IconUrl PatchAuthenticationPayloadGetIconUrlAttributeType `json:"icon_url,omitempty"` - // The Oauth2 provider to use. - Provider PatchAuthenticationPayloadGetProviderAttributeType `json:"provider,omitempty"` - // Scopes defines the OIDC scopes to request. - Scopes PatchAuthenticationPayloadGetScopesAttributeType `json:"scopes,omitempty"` -} - -// NewPatchAuthenticationPayload instantiates a new PatchAuthenticationPayload 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 NewPatchAuthenticationPayload() *PatchAuthenticationPayload { - this := PatchAuthenticationPayload{} - return &this -} - -// NewPatchAuthenticationPayloadWithDefaults instantiates a new PatchAuthenticationPayload 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 NewPatchAuthenticationPayloadWithDefaults() *PatchAuthenticationPayload { - this := PatchAuthenticationPayload{} - return &this -} - -// GetAutoDiscoverUrl returns the AutoDiscoverUrl 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 *PatchAuthenticationPayload) GetAutoDiscoverUrl() (res PatchAuthenticationPayloadGetAutoDiscoverUrlRetType) { - res, _ = o.GetAutoDiscoverUrlOk() - return -} - -// GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl 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 *PatchAuthenticationPayload) GetAutoDiscoverUrlOk() (ret PatchAuthenticationPayloadGetAutoDiscoverUrlRetType, ok bool) { - return getPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl) -} - -// HasAutoDiscoverUrl 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 *PatchAuthenticationPayload) HasAutoDiscoverUrl() bool { - _, ok := o.GetAutoDiscoverUrlOk() - return ok -} - -// SetAutoDiscoverUrl gets a reference to the given string and assigns it to the AutoDiscoverUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchAuthenticationPayload) SetAutoDiscoverUrl(v PatchAuthenticationPayloadGetAutoDiscoverUrlRetType) { - setPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v) -} - -// GetClientId returns the ClientId 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 *PatchAuthenticationPayload) GetClientId() (res PatchAuthenticationPayloadGetClientIdRetType) { - res, _ = o.GetClientIdOk() - return -} - -// GetClientIdOk returns a tuple with the ClientId 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 *PatchAuthenticationPayload) GetClientIdOk() (ret PatchAuthenticationPayloadGetClientIdRetType, ok bool) { - return getPatchAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId) -} - -// HasClientId 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 *PatchAuthenticationPayload) HasClientId() bool { - _, ok := o.GetClientIdOk() - return ok -} - -// SetClientId gets a reference to the given string and assigns it to the ClientId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchAuthenticationPayload) SetClientId(v PatchAuthenticationPayloadGetClientIdRetType) { - setPatchAuthenticationPayloadGetClientIdAttributeType(&o.ClientId, v) -} - -// GetClientSecret returns the ClientSecret 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 *PatchAuthenticationPayload) GetClientSecret() (res PatchAuthenticationPayloadGetClientSecretRetType) { - res, _ = o.GetClientSecretOk() - return -} - -// GetClientSecretOk returns a tuple with the ClientSecret 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 *PatchAuthenticationPayload) GetClientSecretOk() (ret PatchAuthenticationPayloadGetClientSecretRetType, ok bool) { - return getPatchAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret) -} - -// HasClientSecret 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 *PatchAuthenticationPayload) HasClientSecret() bool { - _, ok := o.GetClientSecretOk() - return ok -} - -// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchAuthenticationPayload) SetClientSecret(v PatchAuthenticationPayloadGetClientSecretRetType) { - setPatchAuthenticationPayloadGetClientSecretAttributeType(&o.ClientSecret, v) -} - -// GetIconUrl returns the IconUrl 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 *PatchAuthenticationPayload) GetIconUrl() (res PatchAuthenticationPayloadGetIconUrlRetType) { - res, _ = o.GetIconUrlOk() - return -} - -// GetIconUrlOk returns a tuple with the IconUrl 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 *PatchAuthenticationPayload) GetIconUrlOk() (ret PatchAuthenticationPayloadGetIconUrlRetType, ok bool) { - return getPatchAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl) -} - -// HasIconUrl 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 *PatchAuthenticationPayload) HasIconUrl() bool { - _, ok := o.GetIconUrlOk() - return ok -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchAuthenticationPayload) SetIconUrl(v PatchAuthenticationPayloadGetIconUrlRetType) { - setPatchAuthenticationPayloadGetIconUrlAttributeType(&o.IconUrl, v) -} - -// GetProvider returns the Provider 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 *PatchAuthenticationPayload) GetProvider() (res PatchAuthenticationPayloadGetProviderRetType) { - res, _ = o.GetProviderOk() - return -} - -// GetProviderOk returns a tuple with the Provider 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 *PatchAuthenticationPayload) GetProviderOk() (ret PatchAuthenticationPayloadGetProviderRetType, ok bool) { - return getPatchAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider) -} - -// HasProvider 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 *PatchAuthenticationPayload) HasProvider() bool { - _, ok := o.GetProviderOk() - return ok -} - -// SetProvider gets a reference to the given string and assigns it to the Provider field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchAuthenticationPayload) SetProvider(v PatchAuthenticationPayloadGetProviderRetType) { - setPatchAuthenticationPayloadGetProviderAttributeType(&o.Provider, v) -} - -// GetScopes returns the Scopes 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 *PatchAuthenticationPayload) GetScopes() (res PatchAuthenticationPayloadGetScopesRetType) { - res, _ = o.GetScopesOk() - return -} - -// GetScopesOk returns a tuple with the Scopes 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 *PatchAuthenticationPayload) GetScopesOk() (ret PatchAuthenticationPayloadGetScopesRetType, ok bool) { - return getPatchAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes) -} - -// HasScopes 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 *PatchAuthenticationPayload) HasScopes() bool { - _, ok := o.GetScopesOk() - return ok -} - -// SetScopes gets a reference to the given string and assigns it to the Scopes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchAuthenticationPayload) SetScopes(v PatchAuthenticationPayloadGetScopesRetType) { - setPatchAuthenticationPayloadGetScopesAttributeType(&o.Scopes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PatchAuthenticationPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPatchAuthenticationPayloadGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok { - toSerialize["AutoDiscoverUrl"] = val - } - if val, ok := getPatchAuthenticationPayloadGetClientIdAttributeTypeOk(o.ClientId); ok { - toSerialize["ClientId"] = val - } - if val, ok := getPatchAuthenticationPayloadGetClientSecretAttributeTypeOk(o.ClientSecret); ok { - toSerialize["ClientSecret"] = val - } - if val, ok := getPatchAuthenticationPayloadGetIconUrlAttributeTypeOk(o.IconUrl); ok { - toSerialize["IconUrl"] = val - } - if val, ok := getPatchAuthenticationPayloadGetProviderAttributeTypeOk(o.Provider); ok { - toSerialize["Provider"] = val - } - if val, ok := getPatchAuthenticationPayloadGetScopesAttributeTypeOk(o.Scopes); ok { - toSerialize["Scopes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePatchAuthenticationPayload struct { - value *PatchAuthenticationPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchAuthenticationPayload) Get() *PatchAuthenticationPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchAuthenticationPayload) Set(val *PatchAuthenticationPayload) { - 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 NullablePatchAuthenticationPayload) 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 *NullablePatchAuthenticationPayload) 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 NewNullablePatchAuthenticationPayload(val *PatchAuthenticationPayload) *NullablePatchAuthenticationPayload { - return &NullablePatchAuthenticationPayload{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 NullablePatchAuthenticationPayload) 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 *NullablePatchAuthenticationPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_patch_authentication_payload_test.go b/services/git/model_patch_authentication_payload_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_patch_authentication_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_patch_instance_payload.go b/services/git/model_patch_instance_payload.go deleted file mode 100644 index dd514da4aa..0000000000 --- a/services/git/model_patch_instance_payload.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the PatchInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchInstancePayload{} - -/* - types and functions for acl -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayloadGetAclAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayloadGetAclArgType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayloadGetAclRetType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchInstancePayloadGetAclAttributeTypeOk(arg PatchInstancePayloadGetAclAttributeType) (ret PatchInstancePayloadGetAclRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchInstancePayloadGetAclAttributeType(arg *PatchInstancePayloadGetAclAttributeType, val PatchInstancePayloadGetAclRetType) { - *arg = val -} - -/* - types and functions for feature_toggle -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayloadGetFeatureToggleAttributeType = *FeatureToggle - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayloadGetFeatureToggleArgType = FeatureToggle - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayloadGetFeatureToggleRetType = FeatureToggle - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchInstancePayloadGetFeatureToggleAttributeTypeOk(arg PatchInstancePayloadGetFeatureToggleAttributeType) (ret PatchInstancePayloadGetFeatureToggleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchInstancePayloadGetFeatureToggleAttributeType(arg *PatchInstancePayloadGetFeatureToggleAttributeType, val PatchInstancePayloadGetFeatureToggleRetType) { - *arg = &val -} - -// PatchInstancePayload Properties to patch on an instance. All fields are optional. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchInstancePayload struct { - // A list of CIDR network addresses that are allowed to access the instance. - Acl PatchInstancePayloadGetAclAttributeType `json:"acl,omitempty"` - FeatureToggle PatchInstancePayloadGetFeatureToggleAttributeType `json:"feature_toggle,omitempty"` -} - -// NewPatchInstancePayload instantiates a new PatchInstancePayload 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 NewPatchInstancePayload() *PatchInstancePayload { - this := PatchInstancePayload{} - return &this -} - -// NewPatchInstancePayloadWithDefaults instantiates a new PatchInstancePayload 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 NewPatchInstancePayloadWithDefaults() *PatchInstancePayload { - this := PatchInstancePayload{} - return &this -} - -// GetAcl returns the Acl field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchInstancePayload) GetAcl() (res PatchInstancePayloadGetAclRetType) { - res, _ = o.GetAclOk() - return -} - -// GetAclOk returns a tuple with the Acl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchInstancePayload) GetAclOk() (ret PatchInstancePayloadGetAclRetType, ok bool) { - return getPatchInstancePayloadGetAclAttributeTypeOk(o.Acl) -} - -// HasAcl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchInstancePayload) HasAcl() bool { - _, ok := o.GetAclOk() - return ok -} - -// SetAcl gets a reference to the given []string and assigns it to the Acl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchInstancePayload) SetAcl(v PatchInstancePayloadGetAclRetType) { - setPatchInstancePayloadGetAclAttributeType(&o.Acl, v) -} - -// GetFeatureToggle returns the FeatureToggle 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 *PatchInstancePayload) GetFeatureToggle() (res PatchInstancePayloadGetFeatureToggleRetType) { - res, _ = o.GetFeatureToggleOk() - return -} - -// GetFeatureToggleOk returns a tuple with the FeatureToggle 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 *PatchInstancePayload) GetFeatureToggleOk() (ret PatchInstancePayloadGetFeatureToggleRetType, ok bool) { - return getPatchInstancePayloadGetFeatureToggleAttributeTypeOk(o.FeatureToggle) -} - -// HasFeatureToggle 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 *PatchInstancePayload) HasFeatureToggle() bool { - _, ok := o.GetFeatureToggleOk() - return ok -} - -// SetFeatureToggle gets a reference to the given FeatureToggle and assigns it to the FeatureToggle field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchInstancePayload) SetFeatureToggle(v PatchInstancePayloadGetFeatureToggleRetType) { - setPatchInstancePayloadGetFeatureToggleAttributeType(&o.FeatureToggle, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PatchInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPatchInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } - if val, ok := getPatchInstancePayloadGetFeatureToggleAttributeTypeOk(o.FeatureToggle); ok { - toSerialize["FeatureToggle"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePatchInstancePayload struct { - value *PatchInstancePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchInstancePayload) Get() *PatchInstancePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchInstancePayload) Set(val *PatchInstancePayload) { - 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 NullablePatchInstancePayload) 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 *NullablePatchInstancePayload) 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 NewNullablePatchInstancePayload(val *PatchInstancePayload) *NullablePatchInstancePayload { - return &NullablePatchInstancePayload{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 NullablePatchInstancePayload) 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 *NullablePatchInstancePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_patch_instance_payload_test.go b/services/git/model_patch_instance_payload_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_patch_instance_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_patch_operation.go b/services/git/model_patch_operation.go deleted file mode 100644 index 67b48a1048..0000000000 --- a/services/git/model_patch_operation.go +++ /dev/null @@ -1,384 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "fmt" -) - -// checks if the PatchOperation type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchOperation{} - -/* - types and functions for op -*/ - -// isEnum - -// PatchOperationOp The patch operation to perform. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationOp string - -// List of Op -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PATCHOPERATIONOP_ADD PatchOperationOp = "add" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PATCHOPERATIONOP_REMOVE PatchOperationOp = "remove" -) - -// All allowed values of PatchOperation enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedPatchOperationOpEnumValues = []PatchOperationOp{ - "add", - "remove", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *PatchOperationOp) 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 - type TmpJson PatchOperationOp - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := PatchOperationOp(value) - for _, existing := range AllowedPatchOperationOpEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid PatchOperation", value) -} - -// NewPatchOperationOpFromValue returns a pointer to a valid PatchOperationOp -// 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 NewPatchOperationOpFromValue(v PatchOperationOp) (*PatchOperationOp, error) { - ev := PatchOperationOp(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for PatchOperationOp: valid values are %v", v, AllowedPatchOperationOpEnumValues) - } -} - -// 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 PatchOperationOp) IsValid() bool { - for _, existing := range AllowedPatchOperationOpEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to OpOp value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v PatchOperationOp) Ptr() *PatchOperationOp { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePatchOperationOp struct { - value *PatchOperationOp - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchOperationOp) Get() *PatchOperationOp { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchOperationOp) Set(val *PatchOperationOp) { - 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 NullablePatchOperationOp) 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 *NullablePatchOperationOp) 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 NewNullablePatchOperationOp(val *PatchOperationOp) *NullablePatchOperationOp { - return &NullablePatchOperationOp{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 NullablePatchOperationOp) 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 *NullablePatchOperationOp) 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 PatchOperationGetOpAttributeType = *PatchOperationOp - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetOpArgType = PatchOperationOp - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetOpRetType = PatchOperationOp - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchOperationGetOpAttributeTypeOk(arg PatchOperationGetOpAttributeType) (ret PatchOperationGetOpRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchOperationGetOpAttributeType(arg *PatchOperationGetOpAttributeType, val PatchOperationGetOpRetType) { - *arg = &val -} - -/* - types and functions for path -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchOperationGetPathAttributeTypeOk(arg PatchOperationGetPathAttributeType) (ret PatchOperationGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchOperationGetPathAttributeType(arg *PatchOperationGetPathAttributeType, val PatchOperationGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetPathRetType = string - -/* - types and functions for value -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetValueAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchOperationGetValueAttributeTypeOk(arg PatchOperationGetValueAttributeType) (ret PatchOperationGetValueRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchOperationGetValueAttributeType(arg *PatchOperationGetValueAttributeType, val PatchOperationGetValueRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetValueArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperationGetValueRetType = string - -// PatchOperation Request a STACKIT Git instance to be patch with these properties. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchOperation struct { - // The patch operation to perform. - // REQUIRED - Op PatchOperationGetOpAttributeType `json:"op" required:"true"` - // An RFC6901 JSON Pointer to the target location. - // REQUIRED - Path PatchOperationGetPathAttributeType `json:"path" required:"true"` - // The value to be used for 'add' and 'remove' operations. - Value PatchOperationGetValueAttributeType `json:"value,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PatchOperation PatchOperation - -// NewPatchOperation instantiates a new PatchOperation 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 NewPatchOperation(op PatchOperationGetOpArgType, path PatchOperationGetPathArgType) *PatchOperation { - this := PatchOperation{} - setPatchOperationGetOpAttributeType(&this.Op, op) - setPatchOperationGetPathAttributeType(&this.Path, path) - return &this -} - -// NewPatchOperationWithDefaults instantiates a new PatchOperation 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 NewPatchOperationWithDefaults() *PatchOperation { - this := PatchOperation{} - return &this -} - -// GetOp returns the Op field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) GetOp() (ret PatchOperationGetOpRetType) { - ret, _ = o.GetOpOk() - return ret -} - -// GetOpOk returns a tuple with the Op 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 *PatchOperation) GetOpOk() (ret PatchOperationGetOpRetType, ok bool) { - return getPatchOperationGetOpAttributeTypeOk(o.Op) -} - -// SetOp sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) SetOp(v PatchOperationGetOpRetType) { - setPatchOperationGetOpAttributeType(&o.Op, v) -} - -// GetPath returns the Path field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) GetPath() (ret PatchOperationGetPathRetType) { - ret, _ = o.GetPathOk() - return ret -} - -// GetPathOk returns a tuple with the Path 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 *PatchOperation) GetPathOk() (ret PatchOperationGetPathRetType, ok bool) { - return getPatchOperationGetPathAttributeTypeOk(o.Path) -} - -// SetPath sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) SetPath(v PatchOperationGetPathRetType) { - setPatchOperationGetPathAttributeType(&o.Path, v) -} - -// GetValue returns the Value field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) GetValue() (res PatchOperationGetValueRetType) { - res, _ = o.GetValueOk() - return -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) GetValueOk() (ret PatchOperationGetValueRetType, ok bool) { - return getPatchOperationGetValueAttributeTypeOk(o.Value) -} - -// HasValue returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) HasValue() bool { - _, ok := o.GetValueOk() - return ok -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchOperation) SetValue(v PatchOperationGetValueRetType) { - setPatchOperationGetValueAttributeType(&o.Value, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PatchOperation) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPatchOperationGetOpAttributeTypeOk(o.Op); ok { - toSerialize["Op"] = val - } - if val, ok := getPatchOperationGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - if val, ok := getPatchOperationGetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePatchOperation struct { - value *PatchOperation - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchOperation) Get() *PatchOperation { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchOperation) Set(val *PatchOperation) { - 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 NullablePatchOperation) 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 *NullablePatchOperation) 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 NewNullablePatchOperation(val *PatchOperation) *NullablePatchOperation { - return &NullablePatchOperation{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 NullablePatchOperation) 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 *NullablePatchOperation) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_patch_operation_test.go b/services/git/model_patch_operation_test.go deleted file mode 100644 index 307efe3fd6..0000000000 --- a/services/git/model_patch_operation_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git - -import ( - "testing" -) - -// isEnum - -func TestPatchOperationOp_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"add"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"remove"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := PatchOperationOp("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/git/model_runner.go b/services/git/model_runner.go deleted file mode 100644 index f93e66c981..0000000000 --- a/services/git/model_runner.go +++ /dev/null @@ -1,310 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "time" -) - -// checks if the Runner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Runner{} - -/* - types and functions for created_at -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerGetCreatedAtAttributeTypeOk(arg RunnerGetCreatedAtAttributeType) (ret RunnerGetCreatedAtRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerGetCreatedAtAttributeType(arg *RunnerGetCreatedAtAttributeType, val RunnerGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerGetIdAttributeTypeOk(arg RunnerGetIdAttributeType) (ret RunnerGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerGetIdAttributeType(arg *RunnerGetIdAttributeType, val RunnerGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetIdRetType = string - -/* - types and functions for labels -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetLabelsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetLabelsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetLabelsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerGetLabelsAttributeTypeOk(arg RunnerGetLabelsAttributeType) (ret RunnerGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerGetLabelsAttributeType(arg *RunnerGetLabelsAttributeType, val RunnerGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerGetStatusAttributeTypeOk(arg RunnerGetStatusAttributeType) (ret RunnerGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerGetStatusAttributeType(arg *RunnerGetStatusAttributeType, val RunnerGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerGetStatusRetType = string - -// Runner Describes a runner associated to a STACKIT Git instance. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Runner struct { - // REQUIRED - CreatedAt RunnerGetCreatedAtAttributeType `json:"created_at" required:"true"` - // REQUIRED - Id RunnerGetIdAttributeType `json:"id" required:"true"` - // REQUIRED - Labels RunnerGetLabelsAttributeType `json:"labels" required:"true"` - // The current status of the runner. - // REQUIRED - Status RunnerGetStatusAttributeType `json:"status" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Runner Runner - -// NewRunner instantiates a new Runner 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 NewRunner(createdAt RunnerGetCreatedAtArgType, id RunnerGetIdArgType, labels RunnerGetLabelsArgType, status RunnerGetStatusArgType) *Runner { - this := Runner{} - setRunnerGetCreatedAtAttributeType(&this.CreatedAt, createdAt) - setRunnerGetIdAttributeType(&this.Id, id) - setRunnerGetLabelsAttributeType(&this.Labels, labels) - setRunnerGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewRunnerWithDefaults instantiates a new Runner 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 NewRunnerWithDefaults() *Runner { - this := Runner{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Runner) GetCreatedAt() (ret RunnerGetCreatedAtRetType) { - ret, _ = o.GetCreatedAtOk() - return ret -} - -// GetCreatedAtOk returns a tuple with the CreatedAt 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 *Runner) GetCreatedAtOk() (ret RunnerGetCreatedAtRetType, ok bool) { - return getRunnerGetCreatedAtAttributeTypeOk(o.CreatedAt) -} - -// SetCreatedAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Runner) SetCreatedAt(v RunnerGetCreatedAtRetType) { - setRunnerGetCreatedAtAttributeType(&o.CreatedAt, 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 *Runner) GetId() (ret RunnerGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// 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 *Runner) GetIdOk() (ret RunnerGetIdRetType, ok bool) { - return getRunnerGetIdAttributeTypeOk(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 *Runner) SetId(v RunnerGetIdRetType) { - setRunnerGetIdAttributeType(&o.Id, v) -} - -// GetLabels returns the Labels field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Runner) GetLabels() (ret RunnerGetLabelsRetType) { - ret, _ = o.GetLabelsOk() - return ret -} - -// GetLabelsOk returns a tuple with the Labels 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 *Runner) GetLabelsOk() (ret RunnerGetLabelsRetType, ok bool) { - return getRunnerGetLabelsAttributeTypeOk(o.Labels) -} - -// SetLabels sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Runner) SetLabels(v RunnerGetLabelsRetType) { - setRunnerGetLabelsAttributeType(&o.Labels, 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 *Runner) GetStatus() (ret RunnerGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// 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 *Runner) GetStatusOk() (ret RunnerGetStatusRetType, ok bool) { - return getRunnerGetStatusAttributeTypeOk(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 *Runner) SetStatus(v RunnerGetStatusRetType) { - setRunnerGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Runner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRunnerGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getRunnerGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getRunnerGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getRunnerGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRunner struct { - value *Runner - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRunner) Get() *Runner { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRunner) Set(val *Runner) { - 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 NullableRunner) 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 *NullableRunner) 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 NewNullableRunner(val *Runner) *NullableRunner { - return &NullableRunner{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 NullableRunner) 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 *NullableRunner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_runner_runtime.go b/services/git/model_runner_runtime.go deleted file mode 100644 index 36e2e7c988..0000000000 --- a/services/git/model_runner_runtime.go +++ /dev/null @@ -1,366 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the RunnerRuntime type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunnerRuntime{} - -/* - types and functions for availability -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetAvailabilityAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerRuntimeGetAvailabilityAttributeTypeOk(arg RunnerRuntimeGetAvailabilityAttributeType) (ret RunnerRuntimeGetAvailabilityRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerRuntimeGetAvailabilityAttributeType(arg *RunnerRuntimeGetAvailabilityAttributeType, val RunnerRuntimeGetAvailabilityRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetAvailabilityArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetAvailabilityRetType = string - -/* - types and functions for description -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerRuntimeGetDescriptionAttributeTypeOk(arg RunnerRuntimeGetDescriptionAttributeType) (ret RunnerRuntimeGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerRuntimeGetDescriptionAttributeType(arg *RunnerRuntimeGetDescriptionAttributeType, val RunnerRuntimeGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetDescriptionRetType = string - -/* - types and functions for display_name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerRuntimeGetDisplayNameAttributeTypeOk(arg RunnerRuntimeGetDisplayNameAttributeType) (ret RunnerRuntimeGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerRuntimeGetDisplayNameAttributeType(arg *RunnerRuntimeGetDisplayNameAttributeType, val RunnerRuntimeGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetDisplayNameRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerRuntimeGetIdAttributeTypeOk(arg RunnerRuntimeGetIdAttributeType) (ret RunnerRuntimeGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerRuntimeGetIdAttributeType(arg *RunnerRuntimeGetIdAttributeType, val RunnerRuntimeGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetIdRetType = string - -/* - types and functions for label -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetLabelAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerRuntimeGetLabelAttributeTypeOk(arg RunnerRuntimeGetLabelAttributeType) (ret RunnerRuntimeGetLabelRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerRuntimeGetLabelAttributeType(arg *RunnerRuntimeGetLabelAttributeType, val RunnerRuntimeGetLabelRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetLabelArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeGetLabelRetType = string - -// RunnerRuntime Describes a STACKIT Git Runner runtime. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntime struct { - // Indicates the availability of the runner label - // REQUIRED - Availability RunnerRuntimeGetAvailabilityAttributeType `json:"availability" required:"true"` - // Human-friendly description of the runtime and it's capabilities. - // REQUIRED - Description RunnerRuntimeGetDescriptionAttributeType `json:"description" required:"true"` - // Human-friendly name of the runtime. - // REQUIRED - DisplayName RunnerRuntimeGetDisplayNameAttributeType `json:"display_name" required:"true"` - // Runtime identifier. - // REQUIRED - Id RunnerRuntimeGetIdAttributeType `json:"id" required:"true"` - // Runtime label. - // REQUIRED - Label RunnerRuntimeGetLabelAttributeType `json:"label" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RunnerRuntime RunnerRuntime - -// NewRunnerRuntime instantiates a new RunnerRuntime 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 NewRunnerRuntime(availability RunnerRuntimeGetAvailabilityArgType, description RunnerRuntimeGetDescriptionArgType, displayName RunnerRuntimeGetDisplayNameArgType, id RunnerRuntimeGetIdArgType, label RunnerRuntimeGetLabelArgType) *RunnerRuntime { - this := RunnerRuntime{} - setRunnerRuntimeGetAvailabilityAttributeType(&this.Availability, availability) - setRunnerRuntimeGetDescriptionAttributeType(&this.Description, description) - setRunnerRuntimeGetDisplayNameAttributeType(&this.DisplayName, displayName) - setRunnerRuntimeGetIdAttributeType(&this.Id, id) - setRunnerRuntimeGetLabelAttributeType(&this.Label, label) - return &this -} - -// NewRunnerRuntimeWithDefaults instantiates a new RunnerRuntime 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 NewRunnerRuntimeWithDefaults() *RunnerRuntime { - this := RunnerRuntime{} - return &this -} - -// GetAvailability returns the Availability field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntime) GetAvailability() (ret RunnerRuntimeGetAvailabilityRetType) { - ret, _ = o.GetAvailabilityOk() - return ret -} - -// GetAvailabilityOk returns a tuple with the Availability 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 *RunnerRuntime) GetAvailabilityOk() (ret RunnerRuntimeGetAvailabilityRetType, ok bool) { - return getRunnerRuntimeGetAvailabilityAttributeTypeOk(o.Availability) -} - -// SetAvailability sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntime) SetAvailability(v RunnerRuntimeGetAvailabilityRetType) { - setRunnerRuntimeGetAvailabilityAttributeType(&o.Availability, v) -} - -// GetDescription returns the Description field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntime) GetDescription() (ret RunnerRuntimeGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description 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 *RunnerRuntime) GetDescriptionOk() (ret RunnerRuntimeGetDescriptionRetType, ok bool) { - return getRunnerRuntimeGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntime) SetDescription(v RunnerRuntimeGetDescriptionRetType) { - setRunnerRuntimeGetDescriptionAttributeType(&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 *RunnerRuntime) GetDisplayName() (ret RunnerRuntimeGetDisplayNameRetType) { - ret, _ = o.GetDisplayNameOk() - return ret -} - -// 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 *RunnerRuntime) GetDisplayNameOk() (ret RunnerRuntimeGetDisplayNameRetType, ok bool) { - return getRunnerRuntimeGetDisplayNameAttributeTypeOk(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 *RunnerRuntime) SetDisplayName(v RunnerRuntimeGetDisplayNameRetType) { - setRunnerRuntimeGetDisplayNameAttributeType(&o.DisplayName, 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 *RunnerRuntime) GetId() (ret RunnerRuntimeGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// 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 *RunnerRuntime) GetIdOk() (ret RunnerRuntimeGetIdRetType, ok bool) { - return getRunnerRuntimeGetIdAttributeTypeOk(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 *RunnerRuntime) SetId(v RunnerRuntimeGetIdRetType) { - setRunnerRuntimeGetIdAttributeType(&o.Id, v) -} - -// GetLabel returns the Label field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntime) GetLabel() (ret RunnerRuntimeGetLabelRetType) { - ret, _ = o.GetLabelOk() - return ret -} - -// GetLabelOk returns a tuple with the Label 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 *RunnerRuntime) GetLabelOk() (ret RunnerRuntimeGetLabelRetType, ok bool) { - return getRunnerRuntimeGetLabelAttributeTypeOk(o.Label) -} - -// SetLabel sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntime) SetLabel(v RunnerRuntimeGetLabelRetType) { - setRunnerRuntimeGetLabelAttributeType(&o.Label, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RunnerRuntime) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRunnerRuntimeGetAvailabilityAttributeTypeOk(o.Availability); ok { - toSerialize["Availability"] = val - } - if val, ok := getRunnerRuntimeGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getRunnerRuntimeGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getRunnerRuntimeGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getRunnerRuntimeGetLabelAttributeTypeOk(o.Label); ok { - toSerialize["Label"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRunnerRuntime struct { - value *RunnerRuntime - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRunnerRuntime) Get() *RunnerRuntime { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRunnerRuntime) Set(val *RunnerRuntime) { - 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 NullableRunnerRuntime) 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 *NullableRunnerRuntime) 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 NewNullableRunnerRuntime(val *RunnerRuntime) *NullableRunnerRuntime { - return &NullableRunnerRuntime{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 NullableRunnerRuntime) 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 *NullableRunnerRuntime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_runner_runtime_list.go b/services/git/model_runner_runtime_list.go deleted file mode 100644 index 63ba576886..0000000000 --- a/services/git/model_runner_runtime_list.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" -) - -// checks if the RunnerRuntimeList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunnerRuntimeList{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeListGetItemsAttributeType = *[]RunnerRuntime - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeListGetItemsArgType = []RunnerRuntime - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeListGetItemsRetType = []RunnerRuntime - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRunnerRuntimeListGetItemsAttributeTypeOk(arg RunnerRuntimeListGetItemsAttributeType) (ret RunnerRuntimeListGetItemsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRunnerRuntimeListGetItemsAttributeType(arg *RunnerRuntimeListGetItemsAttributeType, val RunnerRuntimeListGetItemsRetType) { - *arg = &val -} - -// RunnerRuntimeList A list of STACKIT Git RunnerLabels. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RunnerRuntimeList struct { - // REQUIRED - Items RunnerRuntimeListGetItemsAttributeType `json:"items" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RunnerRuntimeList RunnerRuntimeList - -// NewRunnerRuntimeList instantiates a new RunnerRuntimeList 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 NewRunnerRuntimeList(items RunnerRuntimeListGetItemsArgType) *RunnerRuntimeList { - this := RunnerRuntimeList{} - setRunnerRuntimeListGetItemsAttributeType(&this.Items, items) - return &this -} - -// NewRunnerRuntimeListWithDefaults instantiates a new RunnerRuntimeList 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 NewRunnerRuntimeListWithDefaults() *RunnerRuntimeList { - this := RunnerRuntimeList{} - return &this -} - -// GetItems returns the Items field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntimeList) GetItems() (ret RunnerRuntimeListGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items 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 *RunnerRuntimeList) GetItemsOk() (ret RunnerRuntimeListGetItemsRetType, ok bool) { - return getRunnerRuntimeListGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RunnerRuntimeList) SetItems(v RunnerRuntimeListGetItemsRetType) { - setRunnerRuntimeListGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RunnerRuntimeList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRunnerRuntimeListGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRunnerRuntimeList struct { - value *RunnerRuntimeList - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRunnerRuntimeList) Get() *RunnerRuntimeList { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRunnerRuntimeList) Set(val *RunnerRuntimeList) { - 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 NullableRunnerRuntimeList) 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 *NullableRunnerRuntimeList) 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 NewNullableRunnerRuntimeList(val *RunnerRuntimeList) *NullableRunnerRuntimeList { - return &NullableRunnerRuntimeList{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 NullableRunnerRuntimeList) 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 *NullableRunnerRuntimeList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_runner_runtime_list_test.go b/services/git/model_runner_runtime_list_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_runner_runtime_list_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_runner_runtime_test.go b/services/git/model_runner_runtime_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_runner_runtime_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_runner_test.go b/services/git/model_runner_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_runner_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/model_unauthorized_error_response.go b/services/git/model_unauthorized_error_response.go deleted file mode 100644 index 1ebe28ac28..0000000000 --- a/services/git/model_unauthorized_error_response.go +++ /dev/null @@ -1,382 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// 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 git - -import ( - "encoding/json" - "time" -) - -// checks if the UnauthorizedErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UnauthorizedErrorResponse{} - -/* - types and functions for error -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetErrorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUnauthorizedErrorResponseGetErrorAttributeTypeOk(arg UnauthorizedErrorResponseGetErrorAttributeType) (ret UnauthorizedErrorResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUnauthorizedErrorResponseGetErrorAttributeType(arg *UnauthorizedErrorResponseGetErrorAttributeType, val UnauthorizedErrorResponseGetErrorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetErrorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetErrorRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUnauthorizedErrorResponseGetMessageAttributeTypeOk(arg UnauthorizedErrorResponseGetMessageAttributeType) (ret UnauthorizedErrorResponseGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUnauthorizedErrorResponseGetMessageAttributeType(arg *UnauthorizedErrorResponseGetMessageAttributeType, val UnauthorizedErrorResponseGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetMessageRetType = string - -/* - types and functions for path -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUnauthorizedErrorResponseGetPathAttributeTypeOk(arg UnauthorizedErrorResponseGetPathAttributeType) (ret UnauthorizedErrorResponseGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUnauthorizedErrorResponseGetPathAttributeType(arg *UnauthorizedErrorResponseGetPathAttributeType, val UnauthorizedErrorResponseGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetPathRetType = string - -/* - types and functions for status -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetStatusAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetStatusArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetStatusRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUnauthorizedErrorResponseGetStatusAttributeTypeOk(arg UnauthorizedErrorResponseGetStatusAttributeType) (ret UnauthorizedErrorResponseGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUnauthorizedErrorResponseGetStatusAttributeType(arg *UnauthorizedErrorResponseGetStatusAttributeType, val UnauthorizedErrorResponseGetStatusRetType) { - *arg = &val -} - -/* - types and functions for timestamp -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetTimestampAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetTimestampArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponseGetTimestampRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUnauthorizedErrorResponseGetTimestampAttributeTypeOk(arg UnauthorizedErrorResponseGetTimestampAttributeType) (ret UnauthorizedErrorResponseGetTimestampRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUnauthorizedErrorResponseGetTimestampAttributeType(arg *UnauthorizedErrorResponseGetTimestampAttributeType, val UnauthorizedErrorResponseGetTimestampRetType) { - *arg = &val -} - -// UnauthorizedErrorResponse Unauthorized Error Response. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UnauthorizedErrorResponse struct { - Error UnauthorizedErrorResponseGetErrorAttributeType `json:"error,omitempty"` - // REQUIRED - Message UnauthorizedErrorResponseGetMessageAttributeType `json:"message" required:"true"` - Path UnauthorizedErrorResponseGetPathAttributeType `json:"path,omitempty"` - Status UnauthorizedErrorResponseGetStatusAttributeType `json:"status,omitempty"` - Timestamp UnauthorizedErrorResponseGetTimestampAttributeType `json:"timestamp,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _UnauthorizedErrorResponse UnauthorizedErrorResponse - -// NewUnauthorizedErrorResponse instantiates a new UnauthorizedErrorResponse 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 NewUnauthorizedErrorResponse(message UnauthorizedErrorResponseGetMessageArgType) *UnauthorizedErrorResponse { - this := UnauthorizedErrorResponse{} - setUnauthorizedErrorResponseGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewUnauthorizedErrorResponseWithDefaults instantiates a new UnauthorizedErrorResponse 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 NewUnauthorizedErrorResponseWithDefaults() *UnauthorizedErrorResponse { - this := UnauthorizedErrorResponse{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) GetError() (res UnauthorizedErrorResponseGetErrorRetType) { - res, _ = o.GetErrorOk() - return -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) GetErrorOk() (ret UnauthorizedErrorResponseGetErrorRetType, ok bool) { - return getUnauthorizedErrorResponseGetErrorAttributeTypeOk(o.Error) -} - -// HasError returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) HasError() bool { - _, ok := o.GetErrorOk() - return ok -} - -// SetError gets a reference to the given string and assigns it to the Error field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) SetError(v UnauthorizedErrorResponseGetErrorRetType) { - setUnauthorizedErrorResponseGetErrorAttributeType(&o.Error, v) -} - -// GetMessage returns the Message field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) GetMessage() (ret UnauthorizedErrorResponseGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message 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 *UnauthorizedErrorResponse) GetMessageOk() (ret UnauthorizedErrorResponseGetMessageRetType, ok bool) { - return getUnauthorizedErrorResponseGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) SetMessage(v UnauthorizedErrorResponseGetMessageRetType) { - setUnauthorizedErrorResponseGetMessageAttributeType(&o.Message, v) -} - -// GetPath returns the Path 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 *UnauthorizedErrorResponse) GetPath() (res UnauthorizedErrorResponseGetPathRetType) { - res, _ = o.GetPathOk() - return -} - -// GetPathOk returns a tuple with the Path 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 *UnauthorizedErrorResponse) GetPathOk() (ret UnauthorizedErrorResponseGetPathRetType, ok bool) { - return getUnauthorizedErrorResponseGetPathAttributeTypeOk(o.Path) -} - -// HasPath 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 *UnauthorizedErrorResponse) HasPath() bool { - _, ok := o.GetPathOk() - return ok -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) SetPath(v UnauthorizedErrorResponseGetPathRetType) { - setUnauthorizedErrorResponseGetPathAttributeType(&o.Path, v) -} - -// GetStatus returns the Status field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) GetStatus() (res UnauthorizedErrorResponseGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) GetStatusOk() (ret UnauthorizedErrorResponseGetStatusRetType, ok bool) { - return getUnauthorizedErrorResponseGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given int64 and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) SetStatus(v UnauthorizedErrorResponseGetStatusRetType) { - setUnauthorizedErrorResponseGetStatusAttributeType(&o.Status, v) -} - -// GetTimestamp returns the Timestamp 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 *UnauthorizedErrorResponse) GetTimestamp() (res UnauthorizedErrorResponseGetTimestampRetType) { - res, _ = o.GetTimestampOk() - return -} - -// GetTimestampOk returns a tuple with the Timestamp 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 *UnauthorizedErrorResponse) GetTimestampOk() (ret UnauthorizedErrorResponseGetTimestampRetType, ok bool) { - return getUnauthorizedErrorResponseGetTimestampAttributeTypeOk(o.Timestamp) -} - -// HasTimestamp 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 *UnauthorizedErrorResponse) HasTimestamp() bool { - _, ok := o.GetTimestampOk() - return ok -} - -// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UnauthorizedErrorResponse) SetTimestamp(v UnauthorizedErrorResponseGetTimestampRetType) { - setUnauthorizedErrorResponseGetTimestampAttributeType(&o.Timestamp, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UnauthorizedErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUnauthorizedErrorResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val - } - if val, ok := getUnauthorizedErrorResponseGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getUnauthorizedErrorResponseGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - if val, ok := getUnauthorizedErrorResponseGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getUnauthorizedErrorResponseGetTimestampAttributeTypeOk(o.Timestamp); ok { - toSerialize["Timestamp"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUnauthorizedErrorResponse struct { - value *UnauthorizedErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUnauthorizedErrorResponse) Get() *UnauthorizedErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUnauthorizedErrorResponse) Set(val *UnauthorizedErrorResponse) { - 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 NullableUnauthorizedErrorResponse) 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 *NullableUnauthorizedErrorResponse) 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 NewNullableUnauthorizedErrorResponse(val *UnauthorizedErrorResponse) *NullableUnauthorizedErrorResponse { - return &NullableUnauthorizedErrorResponse{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 NullableUnauthorizedErrorResponse) 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 *NullableUnauthorizedErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/git/model_unauthorized_error_response_test.go b/services/git/model_unauthorized_error_response_test.go deleted file mode 100644 index e39c866edc..0000000000 --- a/services/git/model_unauthorized_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git diff --git a/services/git/oas_commit b/services/git/oas_commit index c08a6770da..71a76821d4 100644 --- a/services/git/oas_commit +++ b/services/git/oas_commit @@ -1 +1 @@ -4407196dbbef4e53e6798809e856725cbc84ae05 +0afa5e4924e6bf230fdade5cb294ecfd97dd63e5 diff --git a/services/git/package.go b/services/git/package.go new file mode 100644 index 0000000000..cd99cdbeec --- /dev/null +++ b/services/git/package.go @@ -0,0 +1 @@ +package git diff --git a/services/git/utils.go b/services/git/utils.go deleted file mode 100644 index a9f4a804bf..0000000000 --- a/services/git/utils.go +++ /dev/null @@ -1,466 +0,0 @@ -/* -STACKIT Git API - -STACKIT Git management API. - -API version: 1beta.0.4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package git - -import ( - "encoding/json" - "math/rand" - "reflect" - "time" -) - -// 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 - } - if t, ok := i.(interface{ IsSet() bool }); ok { - return !t.IsSet() - } - 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 -} - -// 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 { - b[i] = letterRunes[rand.Intn(len(letterRunes))] - } - return string(b) -} diff --git a/services/git/v1betaapi/api_default.go b/services/git/v1betaapi/api_default.go index cbb5762dd5..4186841cca 100644 --- a/services/git/v1betaapi/api_default.go +++ b/services/git/v1betaapi/api_default.go @@ -74,6 +74,23 @@ type DefaultAPI interface { // @return Runner CreateRunnerExecute(r ApiCreateRunnerRequest) (*Runner, error) + /* + CreateUser Create an Instance Local/Technical User. + + Creates a new STACKIT Git instance Local/Technical User. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @return ApiCreateUserRequest + */ + CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest + + // CreateUserExecute executes the request + // @return User + CreateUserExecute(r ApiCreateUserRequest) (*User, error) + /* DeleteAuthentication Delete Authentication Source @@ -123,6 +140,23 @@ type DefaultAPI interface { // DeleteRunnerExecute executes the request DeleteRunnerExecute(r ApiDeleteRunnerRequest) error + /* + DeleteUser Delete Instance User. + + Deletes a STACKIT Git instance User and destroys all associated data. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @param username Instance User identifier. + @return ApiDeleteUserRequest + */ + DeleteUser(ctx context.Context, projectId string, instanceId string, username string) ApiDeleteUserRequest + + // DeleteUserExecute executes the request + DeleteUserExecute(r ApiDeleteUserRequest) error + /* GetAuthentication Get authentication provider @@ -173,6 +207,40 @@ type DefaultAPI interface { // @return Runner GetRunnerExecute(r ApiGetRunnerRequest) (*Runner, error) + /* + GetUser Get Instance User information. + + Retrieves information about a STACKIT Git instance User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @param username Instance User identifier. + @return ApiGetUserRequest + */ + GetUser(ctx context.Context, projectId string, instanceId string, username string) ApiGetUserRequest + + // GetUserExecute executes the request + GetUserExecute(r ApiGetUserRequest) error + + /* + GetUsers Get instance Users. + + Lists STACKIT Git Users within an instance. Supports pagination via the + optional `page` query parameter. Each page returns up to 50 users. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @return ApiGetUsersRequest + */ + GetUsers(ctx context.Context, projectId string, instanceId string) ApiGetUsersRequest + + // GetUsersExecute executes the request + // @return ListUsers + GetUsersExecute(r ApiGetUsersRequest) (*ListUsers, error) + /* ListAuthentication List authentication sources @@ -271,6 +339,24 @@ type DefaultAPI interface { // PatchInstanceExecute executes the request // @return Instance PatchInstanceExecute(r ApiPatchInstanceRequest) (*Instance, error) + + /* + UpdateUser Update Instance User. + + Updates the Instance User. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @param username Instance User identifier. + @return ApiUpdateUserRequest + */ + UpdateUser(ctx context.Context, projectId string, instanceId string, username string) ApiUpdateUserRequest + + // UpdateUserExecute executes the request + // @return User + UpdateUserExecute(r ApiUpdateUserRequest) (*User, error) } // DefaultAPIService DefaultAPI service @@ -813,6 +899,181 @@ func (a *DefaultAPIService) CreateRunnerExecute(r ApiCreateRunnerRequest) (*Runn return localVarReturnValue, nil } +type ApiCreateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + createUserPayload *CreateUserPayload +} + +// Instance User details options. +func (r ApiCreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { + r.createUserPayload = &createUserPayload + return r +} + +func (r ApiCreateUserRequest) Execute() (*User, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Create an Instance Local/Technical User. + +Creates a new STACKIT Git instance Local/Technical User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @return ApiCreateUserRequest +*/ +func (a *DefaultAPIService) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return User +func (a *DefaultAPIService) CreateUserExecute(r ApiCreateUserRequest) (*User, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { + return localVarReturnValue, reportError("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, reportError("projectId must have less than 36 elements") + } + if strlen(r.instanceId) < 36 { + return localVarReturnValue, reportError("instanceId must have at least 36 elements") + } + if strlen(r.instanceId) > 36 { + return localVarReturnValue, reportError("instanceId must have less than 36 elements") + } + if r.createUserPayload == nil { + return localVarReturnValue, reportError("createUserPayload 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.createUserPayload + 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 GenericErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + var v GenericErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorResponse + 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 + } + + 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 ApiDeleteAuthenticationRequest struct { ctx context.Context ApiService DefaultAPI @@ -1295,80 +1556,71 @@ func (a *DefaultAPIService) DeleteRunnerExecute(r ApiDeleteRunnerRequest) error return nil } -type ApiGetAuthenticationRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - instanceId string - authenticationId string +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + username string } -func (r ApiGetAuthenticationRequest) Execute() (*Authentication, error) { - return r.ApiService.GetAuthenticationExecute(r) +func (r ApiDeleteUserRequest) Execute() error { + return r.ApiService.DeleteUserExecute(r) } /* -GetAuthentication Get authentication provider +DeleteUser Delete Instance User. -# Get authentication provider +Deletes a STACKIT Git instance User and destroys all associated data. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project identifier. @param instanceId Instance identifier. - @param authenticationId Authentication Source identifier. - @return ApiGetAuthenticationRequest + @param username Instance User identifier. + @return ApiDeleteUserRequest */ -func (a *DefaultAPIService) GetAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiGetAuthenticationRequest { - return ApiGetAuthenticationRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - authenticationId: authenticationId, +func (a *DefaultAPIService) DeleteUser(ctx context.Context, projectId string, instanceId string, username string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + username: username, } } // Execute executes the request -// -// @return Authentication -func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationRequest) (*Authentication, error) { +func (a *DefaultAPIService) DeleteUserExecute(r ApiDeleteUserRequest) error { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Authentication + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetAuthentication") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteUser") if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications/{authenticationId}" + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/users/{username}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"authenticationId"+"}", url.PathEscape(parameterValueToString(r.authenticationId, "authenticationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") + return reportError("projectId must have at least 36 elements") } if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") + return reportError("projectId must have less than 36 elements") } if strlen(r.instanceId) < 36 { - return localVarReturnValue, reportError("instanceId must have at least 36 elements") + return reportError("instanceId must have at least 36 elements") } if strlen(r.instanceId) > 36 { - return localVarReturnValue, reportError("instanceId must have less than 36 elements") - } - if strlen(r.authenticationId) < 36 { - return localVarReturnValue, reportError("authenticationId must have at least 36 elements") - } - if strlen(r.authenticationId) > 36 { - return localVarReturnValue, reportError("authenticationId must have less than 36 elements") + return reportError("instanceId must have less than 36 elements") } // to determine the Content-Type header @@ -1390,7 +1642,7 @@ func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationReque } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, err + return err } contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) @@ -1404,7 +1656,485 @@ func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationReque *contextHTTPResponse = localVarHTTPResponse } if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err + 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 GenericErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorResponse + 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 nil +} + +type ApiGetAuthenticationRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + authenticationId string +} + +func (r ApiGetAuthenticationRequest) Execute() (*Authentication, error) { + return r.ApiService.GetAuthenticationExecute(r) +} + +/* +GetAuthentication Get authentication provider + +# Get authentication provider + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @param authenticationId Authentication Source identifier. + @return ApiGetAuthenticationRequest +*/ +func (a *DefaultAPIService) GetAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiGetAuthenticationRequest { + return ApiGetAuthenticationRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + authenticationId: authenticationId, + } +} + +// Execute executes the request +// +// @return Authentication +func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationRequest) (*Authentication, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Authentication + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetAuthentication") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/authentications/{authenticationId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"authenticationId"+"}", url.PathEscape(parameterValueToString(r.authenticationId, "authenticationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, reportError("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, reportError("projectId must have less than 36 elements") + } + if strlen(r.instanceId) < 36 { + return localVarReturnValue, reportError("instanceId must have at least 36 elements") + } + if strlen(r.instanceId) > 36 { + return localVarReturnValue, reportError("instanceId must have less than 36 elements") + } + if strlen(r.authenticationId) < 36 { + return localVarReturnValue, reportError("authenticationId must have at least 36 elements") + } + if strlen(r.authenticationId) > 36 { + return localVarReturnValue, reportError("authenticationId must have less than 36 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 BadErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 401 { + var v UnauthorizedErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 500 { + var v InternalServerErrorResponse + 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 + } + + 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 ApiGetInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiGetInstanceRequest) Execute() (*Instance, error) { + return r.ApiService.GetInstanceExecute(r) +} + +/* +GetInstance Get Instance information. + +Retrieves information about a STACKIT Git instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @return ApiGetInstanceRequest +*/ +func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + 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 + "/v1beta/projects/{projectId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { + return localVarReturnValue, reportError("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, reportError("projectId must have less than 36 elements") + } + if strlen(r.instanceId) < 36 { + return localVarReturnValue, reportError("instanceId must have at least 36 elements") + } + if strlen(r.instanceId) > 36 { + return localVarReturnValue, reportError("instanceId must have less than 36 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 GenericErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorResponse + 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 + } + + 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 ApiGetRunnerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiGetRunnerRequest) Execute() (*Runner, error) { + return r.ApiService.GetRunnerExecute(r) +} + +/* +GetRunner Get Runner information. + +Retrieves information about a runner in a STACKIT Git instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @return ApiGetRunnerRequest +*/ +func (a *DefaultAPIService) GetRunner(ctx context.Context, projectId string, instanceId string) ApiGetRunnerRequest { + return ApiGetRunnerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return Runner +func (a *DefaultAPIService) GetRunnerExecute(r ApiGetRunnerRequest) (*Runner, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Runner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetRunner") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/runner" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -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.projectId) < 36 { + return localVarReturnValue, reportError("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, reportError("projectId must have less than 36 elements") + } + if strlen(r.instanceId) < 36 { + return localVarReturnValue, reportError("instanceId must have at least 36 elements") + } + if strlen(r.instanceId) > 36 { + return localVarReturnValue, reportError("instanceId must have less than 36 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) @@ -1421,18 +2151,7 @@ func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationReque StatusCode: localVarHTTPResponse.StatusCode, } if localVarHTTPResponse.StatusCode == 400 { - var v BadErrorResponse - 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 - } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedErrorResponse + var v GenericErrorResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1443,7 +2162,7 @@ func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationReque return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse + var v GenericErrorResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1468,70 +2187,71 @@ func (a *DefaultAPIService) GetAuthenticationExecute(r ApiGetAuthenticationReque return localVarReturnValue, nil } -type ApiGetInstanceRequest struct { +type ApiGetUserRequest struct { ctx context.Context ApiService DefaultAPI projectId string instanceId string + username string } -func (r ApiGetInstanceRequest) Execute() (*Instance, error) { - return r.ApiService.GetInstanceExecute(r) +func (r ApiGetUserRequest) Execute() error { + return r.ApiService.GetUserExecute(r) } /* -GetInstance Get Instance information. +GetUser Get Instance User information. -Retrieves information about a STACKIT Git instance. +Retrieves information about a STACKIT Git instance User. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project identifier. @param instanceId Instance identifier. - @return ApiGetInstanceRequest + @param username Instance User identifier. + @return ApiGetUserRequest */ -func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { - return ApiGetInstanceRequest{ +func (a *DefaultAPIService) GetUser(ctx context.Context, projectId string, instanceId string, username string) ApiGetUserRequest { + return ApiGetUserRequest{ ApiService: a, ctx: ctx, projectId: projectId, instanceId: instanceId, + username: username, } } // Execute executes the request -// -// @return Instance -func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) { +func (a *DefaultAPIService) GetUserExecute(r ApiGetUserRequest) error { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Instance + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstance") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUser") if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}" + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/users/{username}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if strlen(r.projectId) < 36 { - return localVarReturnValue, reportError("projectId must have at least 36 elements") + return reportError("projectId must have at least 36 elements") } if strlen(r.projectId) > 36 { - return localVarReturnValue, reportError("projectId must have less than 36 elements") + return reportError("projectId must have less than 36 elements") } if strlen(r.instanceId) < 36 { - return localVarReturnValue, reportError("instanceId must have at least 36 elements") + return reportError("instanceId must have at least 36 elements") } if strlen(r.instanceId) > 36 { - return localVarReturnValue, reportError("instanceId must have less than 36 elements") + return reportError("instanceId must have less than 36 elements") } // to determine the Content-Type header @@ -1553,7 +2273,7 @@ func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Instan } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, err + return err } contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) @@ -1567,14 +2287,14 @@ func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Instan *contextHTTPResponse = localVarHTTPResponse } if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err + return err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return err } if localVarHTTPResponse.StatusCode >= 300 { @@ -1583,77 +2303,75 @@ func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Instan ErrorMessage: localVarHTTPResponse.Status, StatusCode: localVarHTTPResponse.StatusCode, } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericErrorResponse + if localVarHTTPResponse.StatusCode == 302 { + var v User err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr } - if localVarHTTPResponse.StatusCode == 404 { + if localVarHTTPResponse.StatusCode == 400 { var v GenericErrorResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr } if localVarHTTPResponse.StatusCode == 500 { var v GenericErrorResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v } - 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 newErr } - return localVarReturnValue, nil + return nil } -type ApiGetRunnerRequest struct { +type ApiGetUsersRequest struct { ctx context.Context ApiService DefaultAPI projectId string instanceId string + page *int32 } -func (r ApiGetRunnerRequest) Execute() (*Runner, error) { - return r.ApiService.GetRunnerExecute(r) +// Page number for pagination (1-indexed). Each page contains up to 50 users. +func (r ApiGetUsersRequest) Page(page int32) ApiGetUsersRequest { + r.page = &page + return r +} + +func (r ApiGetUsersRequest) Execute() (*ListUsers, error) { + return r.ApiService.GetUsersExecute(r) } /* -GetRunner Get Runner information. +GetUsers Get instance Users. -Retrieves information about a runner in a STACKIT Git instance. +Lists STACKIT Git Users within an instance. Supports pagination via the +optional `page` query parameter. Each page returns up to 50 users. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project identifier. @param instanceId Instance identifier. - @return ApiGetRunnerRequest + @return ApiGetUsersRequest */ -func (a *DefaultAPIService) GetRunner(ctx context.Context, projectId string, instanceId string) ApiGetRunnerRequest { - return ApiGetRunnerRequest{ +func (a *DefaultAPIService) GetUsers(ctx context.Context, projectId string, instanceId string) ApiGetUsersRequest { + return ApiGetUsersRequest{ ApiService: a, ctx: ctx, projectId: projectId, @@ -1663,21 +2381,21 @@ func (a *DefaultAPIService) GetRunner(ctx context.Context, projectId string, ins // Execute executes the request // -// @return Runner -func (a *DefaultAPIService) GetRunnerExecute(r ApiGetRunnerRequest) (*Runner, error) { +// @return ListUsers +func (a *DefaultAPIService) GetUsersExecute(r ApiGetUsersRequest) (*ListUsers, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Runner + localVarReturnValue *ListUsers ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetRunner") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUsers") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/runner" + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/users" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) @@ -1697,6 +2415,13 @@ func (a *DefaultAPIService) GetRunnerExecute(r ApiGetRunnerRequest) (*Runner, er return localVarReturnValue, reportError("instanceId must have less than 36 elements") } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + parameterAddToHeaderOrQuery(localVarQueryParams, "page", defaultValue, "form", "") + r.page = &defaultValue + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2741,3 +3466,170 @@ func (a *DefaultAPIService) PatchInstanceExecute(r ApiPatchInstanceRequest) (*In return localVarReturnValue, nil } + +type ApiUpdateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + username string + updateUserPayload *UpdateUserPayload +} + +func (r ApiUpdateUserRequest) UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest { + r.updateUserPayload = &updateUserPayload + return r +} + +func (r ApiUpdateUserRequest) Execute() (*User, error) { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Update Instance User. + +Updates the Instance User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. + @param instanceId Instance identifier. + @param username Instance User identifier. + @return ApiUpdateUserRequest +*/ +func (a *DefaultAPIService) UpdateUser(ctx context.Context, projectId string, instanceId string, username string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + username: username, + } +} + +// Execute executes the request +// +// @return User +func (a *DefaultAPIService) UpdateUserExecute(r ApiUpdateUserRequest) (*User, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/instances/{instanceId}/users/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, reportError("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, reportError("projectId must have less than 36 elements") + } + if strlen(r.instanceId) < 36 { + return localVarReturnValue, reportError("instanceId must have at least 36 elements") + } + if strlen(r.instanceId) > 36 { + return localVarReturnValue, reportError("instanceId must have less than 36 elements") + } + if r.updateUserPayload == nil { + return localVarReturnValue, reportError("updateUserPayload 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.updateUserPayload + 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 GenericErrorResponse + 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 + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorResponse + 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 + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/git/v1betaapi/api_default_mock.go b/services/git/v1betaapi/api_default_mock.go index 8bfd62212c..642f16fe88 100644 --- a/services/git/v1betaapi/api_default_mock.go +++ b/services/git/v1betaapi/api_default_mock.go @@ -27,18 +27,26 @@ type DefaultAPIServiceMock struct { CreateInstanceExecuteMock *func(r ApiCreateInstanceRequest) (*Instance, error) // CreateRunnerExecuteMock can be populated to implement the behavior of the CreateRunnerExecute function of this mock CreateRunnerExecuteMock *func(r ApiCreateRunnerRequest) (*Runner, error) + // CreateUserExecuteMock can be populated to implement the behavior of the CreateUserExecute function of this mock + CreateUserExecuteMock *func(r ApiCreateUserRequest) (*User, error) // DeleteAuthenticationExecuteMock can be populated to implement the behavior of the DeleteAuthenticationExecute function of this mock DeleteAuthenticationExecuteMock *func(r ApiDeleteAuthenticationRequest) error // DeleteInstanceExecuteMock can be populated to implement the behavior of the DeleteInstanceExecute function of this mock DeleteInstanceExecuteMock *func(r ApiDeleteInstanceRequest) error // DeleteRunnerExecuteMock can be populated to implement the behavior of the DeleteRunnerExecute function of this mock DeleteRunnerExecuteMock *func(r ApiDeleteRunnerRequest) error + // DeleteUserExecuteMock can be populated to implement the behavior of the DeleteUserExecute function of this mock + DeleteUserExecuteMock *func(r ApiDeleteUserRequest) error // GetAuthenticationExecuteMock can be populated to implement the behavior of the GetAuthenticationExecute function of this mock GetAuthenticationExecuteMock *func(r ApiGetAuthenticationRequest) (*Authentication, error) // GetInstanceExecuteMock can be populated to implement the behavior of the GetInstanceExecute function of this mock GetInstanceExecuteMock *func(r ApiGetInstanceRequest) (*Instance, error) // GetRunnerExecuteMock can be populated to implement the behavior of the GetRunnerExecute function of this mock GetRunnerExecuteMock *func(r ApiGetRunnerRequest) (*Runner, error) + // GetUserExecuteMock can be populated to implement the behavior of the GetUserExecute function of this mock + GetUserExecuteMock *func(r ApiGetUserRequest) error + // GetUsersExecuteMock can be populated to implement the behavior of the GetUsersExecute function of this mock + GetUsersExecuteMock *func(r ApiGetUsersRequest) (*ListUsers, error) // ListAuthenticationExecuteMock can be populated to implement the behavior of the ListAuthenticationExecute function of this mock ListAuthenticationExecuteMock *func(r ApiListAuthenticationRequest) (*AuthenticationList, error) // ListFlavorsExecuteMock can be populated to implement the behavior of the ListFlavorsExecute function of this mock @@ -51,6 +59,8 @@ type DefaultAPIServiceMock struct { PatchAuthenticationExecuteMock *func(r ApiPatchAuthenticationRequest) (*Authentication, error) // PatchInstanceExecuteMock can be populated to implement the behavior of the PatchInstanceExecute function of this mock PatchInstanceExecuteMock *func(r ApiPatchInstanceRequest) (*Instance, error) + // UpdateUserExecuteMock can be populated to implement the behavior of the UpdateUserExecute function of this mock + UpdateUserExecuteMock *func(r ApiUpdateUserRequest) (*User, error) } func (a DefaultAPIServiceMock) CreateAuthentication(ctx context.Context, projectId string, instanceId string) ApiCreateAuthenticationRequest { @@ -109,6 +119,25 @@ func (a DefaultAPIServiceMock) CreateRunnerExecute(r ApiCreateRunnerRequest) (*R return (*a.CreateRunnerExecuteMock)(r) } +func (a DefaultAPIServiceMock) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// CreateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateUserExecute(r ApiCreateUserRequest) (*User, error) { + if a.CreateUserExecuteMock == nil { + var localVarReturnValue *User + return localVarReturnValue, nil + } + + return (*a.CreateUserExecuteMock)(r) +} + func (a DefaultAPIServiceMock) DeleteAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiDeleteAuthenticationRequest { return ApiDeleteAuthenticationRequest{ ApiService: a, @@ -164,6 +193,25 @@ func (a DefaultAPIServiceMock) DeleteRunnerExecute(r ApiDeleteRunnerRequest) err return (*a.DeleteRunnerExecuteMock)(r) } +func (a DefaultAPIServiceMock) DeleteUser(ctx context.Context, projectId string, instanceId string, username string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + username: username, + } +} + +// DeleteUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteUserExecute(r ApiDeleteUserRequest) error { + if a.DeleteUserExecuteMock == nil { + return nil + } + + return (*a.DeleteUserExecuteMock)(r) +} + func (a DefaultAPIServiceMock) GetAuthentication(ctx context.Context, projectId string, instanceId string, authenticationId string) ApiGetAuthenticationRequest { return ApiGetAuthenticationRequest{ ApiService: a, @@ -222,6 +270,44 @@ func (a DefaultAPIServiceMock) GetRunnerExecute(r ApiGetRunnerRequest) (*Runner, return (*a.GetRunnerExecuteMock)(r) } +func (a DefaultAPIServiceMock) GetUser(ctx context.Context, projectId string, instanceId string, username string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + username: username, + } +} + +// GetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetUserExecute(r ApiGetUserRequest) error { + if a.GetUserExecuteMock == nil { + return nil + } + + return (*a.GetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetUsers(ctx context.Context, projectId string, instanceId string) ApiGetUsersRequest { + return ApiGetUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// GetUsersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetUsersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetUsersExecute(r ApiGetUsersRequest) (*ListUsers, error) { + if a.GetUsersExecuteMock == nil { + var localVarReturnValue *ListUsers + return localVarReturnValue, nil + } + + return (*a.GetUsersExecuteMock)(r) +} + func (a DefaultAPIServiceMock) ListAuthentication(ctx context.Context, projectId string, instanceId string) ApiListAuthenticationRequest { return ApiListAuthenticationRequest{ ApiService: a, @@ -333,3 +419,23 @@ func (a DefaultAPIServiceMock) PatchInstanceExecute(r ApiPatchInstanceRequest) ( return (*a.PatchInstanceExecuteMock)(r) } + +func (a DefaultAPIServiceMock) UpdateUser(ctx context.Context, projectId string, instanceId string, username string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + username: username, + } +} + +// UpdateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateUserExecute(r ApiUpdateUserRequest) (*User, error) { + if a.UpdateUserExecuteMock == nil { + var localVarReturnValue *User + return localVarReturnValue, nil + } + + return (*a.UpdateUserExecuteMock)(r) +} diff --git a/services/git/v1betaapi/client.go b/services/git/v1betaapi/client.go index 842e742a6a..751e1eaca5 100644 --- a/services/git/v1betaapi/client.go +++ b/services/git/v1betaapi/client.go @@ -462,6 +462,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if r, ok := v.(*io.Reader); ok { + *r = bytes.NewReader(b) + return nil + } + // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. + if p, ok := v.(*[]byte); ok { + *p = b + return nil + } if f, ok := v.(*os.File); ok { f, err = os.CreateTemp("", "HttpClientFile") if err != nil { diff --git a/services/git/v1betaapi/model_authentication.go b/services/git/v1betaapi/model_authentication.go index c741fae716..c5cc5b2c02 100644 --- a/services/git/v1betaapi/model_authentication.go +++ b/services/git/v1betaapi/model_authentication.go @@ -23,13 +23,13 @@ var _ MappedNullable = &Authentication{} // Authentication Describes an authentication definition associated to a STACKIT Git instance. The provider type will be an openidConnect type. type Authentication struct { // The well-known configuration url to use for this authentication definition. - AutoDiscoverUrl string `json:"auto_discover_url" validate:"regexp=^https:\\/\\/[a-zA-Z0-9\\\\-\\\\.]+(\\\\.[a-zA-Z]{2,})+(\\/.*)?$"` + AutoDiscoverUrl string `json:"auto_discover_url" validate:"regexp=^https://[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2\\,})+(/.*)?$"` // The IDP client id to use. ClientId string `json:"client_id"` // The date and time the creation of the authentication definition was triggered. CreatedAt time.Time `json:"created_at"` // The url of the icon to use for this authentication definition. - IconUrl string `json:"icon_url" validate:"regexp=^https:\\/\\/[a-zA-Z0-9\\\\-\\\\.]+(\\\\.[a-zA-Z]{2,})+(\\/.*)?$"` + IconUrl string `json:"icon_url" validate:"regexp=^https://[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2\\,})+(/.*)?$"` // An auto generated unique uuid which identifies the authentication definition in STACKIT Git instances. Id string `json:"id"` // The name to identify an authentication definition associated with a STACKIT Git instance. @@ -37,9 +37,10 @@ type Authentication struct { // The Oauth2 provider to use. Provider string `json:"provider"` // Scopes defines the OIDC scopes to request. - Scopes string `json:"scopes"` - // The current status of the authentication definition. - Status string `json:"status"` + Scopes string `json:"scopes"` + Status AuthenticationStatus `json:"status"` + // Provides additional information or error details when the status is 'Error'. + StatusMessage *string `json:"status_message,omitempty"` AdditionalProperties map[string]interface{} } @@ -49,7 +50,7 @@ type _Authentication Authentication // 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 NewAuthentication(autoDiscoverUrl string, clientId string, createdAt time.Time, iconUrl string, id string, name string, provider string, scopes string, status string) *Authentication { +func NewAuthentication(autoDiscoverUrl string, clientId string, createdAt time.Time, iconUrl string, id string, name string, provider string, scopes string, status AuthenticationStatus) *Authentication { this := Authentication{} this.AutoDiscoverUrl = autoDiscoverUrl this.ClientId = clientId @@ -264,9 +265,9 @@ func (o *Authentication) SetScopes(v string) { } // GetStatus returns the Status field value -func (o *Authentication) GetStatus() string { +func (o *Authentication) GetStatus() AuthenticationStatus { if o == nil { - var ret string + var ret AuthenticationStatus return ret } @@ -275,7 +276,7 @@ func (o *Authentication) GetStatus() string { // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. -func (o *Authentication) GetStatusOk() (*string, bool) { +func (o *Authentication) GetStatusOk() (*AuthenticationStatus, bool) { if o == nil { return nil, false } @@ -283,10 +284,42 @@ func (o *Authentication) GetStatusOk() (*string, bool) { } // SetStatus sets field value -func (o *Authentication) SetStatus(v string) { +func (o *Authentication) SetStatus(v AuthenticationStatus) { o.Status = v } +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *Authentication) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Authentication) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *Authentication) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *Authentication) SetStatusMessage(v string) { + o.StatusMessage = &v +} + func (o Authentication) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -306,6 +339,9 @@ func (o Authentication) ToMap() (map[string]interface{}, error) { toSerialize["provider"] = o.Provider toSerialize["scopes"] = o.Scopes toSerialize["status"] = o.Status + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -366,6 +402,7 @@ func (o *Authentication) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "provider") delete(additionalProperties, "scopes") delete(additionalProperties, "status") + delete(additionalProperties, "status_message") o.AdditionalProperties = additionalProperties } diff --git a/services/git/v1betaapi/model_authentication_status.go b/services/git/v1betaapi/model_authentication_status.go new file mode 100644 index 0000000000..14fccf4b15 --- /dev/null +++ b/services/git/v1betaapi/model_authentication_status.go @@ -0,0 +1,120 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +Contact: git@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1betaapi + +import ( + "encoding/json" + "fmt" +) + +// AuthenticationStatus The current status of the authentication definition. +type AuthenticationStatus string + +// List of Authentication_status +const ( + AUTHENTICATIONSTATUS_CREATING AuthenticationStatus = "Creating" + AUTHENTICATIONSTATUS_UPDATING AuthenticationStatus = "Updating" + AUTHENTICATIONSTATUS_DELETING AuthenticationStatus = "Deleting" + AUTHENTICATIONSTATUS_READY AuthenticationStatus = "Ready" + AUTHENTICATIONSTATUS_ERROR AuthenticationStatus = "Error" + AUTHENTICATIONSTATUS_UNKNOWN_DEFAULT_OPEN_API AuthenticationStatus = "unknown_default_open_api" +) + +// All allowed values of AuthenticationStatus enum +var AllowedAuthenticationStatusEnumValues = []AuthenticationStatus{ + "Creating", + "Updating", + "Deleting", + "Ready", + "Error", + "unknown_default_open_api", +} + +func (v *AuthenticationStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AuthenticationStatus(value) + for _, existing := range AllowedAuthenticationStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = AUTHENTICATIONSTATUS_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewAuthenticationStatusFromValue returns a pointer to a valid AuthenticationStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAuthenticationStatusFromValue(v string) (*AuthenticationStatus, error) { + ev := AuthenticationStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AuthenticationStatus: valid values are %v", v, AllowedAuthenticationStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AuthenticationStatus) IsValid() bool { + for _, existing := range AllowedAuthenticationStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to Authentication_status value +func (v AuthenticationStatus) Ptr() *AuthenticationStatus { + return &v +} + +type NullableAuthenticationStatus struct { + value *AuthenticationStatus + isSet bool +} + +func (v NullableAuthenticationStatus) Get() *AuthenticationStatus { + return v.value +} + +func (v *NullableAuthenticationStatus) Set(val *AuthenticationStatus) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationStatus(val *AuthenticationStatus) *NullableAuthenticationStatus { + return &NullableAuthenticationStatus{value: val, isSet: true} +} + +func (v NullableAuthenticationStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/v1betaapi/model_create_authentication_payload.go b/services/git/v1betaapi/model_create_authentication_payload.go index 3050b3a6db..80a4ef0232 100644 --- a/services/git/v1betaapi/model_create_authentication_payload.go +++ b/services/git/v1betaapi/model_create_authentication_payload.go @@ -22,13 +22,13 @@ var _ MappedNullable = &CreateAuthenticationPayload{} // CreateAuthenticationPayload Properties to patch on an authentication. All fields are optional. type CreateAuthenticationPayload struct { // The well-known configuration url to use for this authentication definition. - AutoDiscoverUrl string `json:"auto_discover_url" validate:"regexp=^https:\\/\\/[a-zA-Z0-9\\\\-\\\\.]+(\\\\.[a-zA-Z]{2,})+(\\/.*)?$"` + AutoDiscoverUrl string `json:"auto_discover_url" validate:"regexp=^https://[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2\\,})+(/.*)?$"` // The IDP client id to use. ClientId string `json:"client_id"` // The IDP client secret to use. ClientSecret string `json:"client_secret"` // The url of the icon to use for this authentication definition. - IconUrl *string `json:"icon_url,omitempty" validate:"regexp=^https:\\/\\/[a-zA-Z0-9\\\\-\\\\.]+(\\\\.[a-zA-Z]{2,})+(\\/.*)?$"` + IconUrl *string `json:"icon_url,omitempty" validate:"regexp=^https://[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2\\,})+(/.*)?$"` // The name to identify an authentication definition associated with a STACKIT Git instance. Name string `json:"name"` // The Oauth2 provider to use. diff --git a/services/git/v1betaapi/model_create_instance_payload.go b/services/git/v1betaapi/model_create_instance_payload.go index 5270b6bd44..4dda08a325 100644 --- a/services/git/v1betaapi/model_create_instance_payload.go +++ b/services/git/v1betaapi/model_create_instance_payload.go @@ -25,7 +25,7 @@ type CreateInstancePayload struct { Acl []string `json:"acl,omitempty"` Flavor *CreateInstancePayloadFlavor `json:"flavor,omitempty"` // A user chosen name to distinguish multiple STACKIT Git instances. - Name string `json:"name" validate:"regexp=^[a-z]([a-z0-9\\\\-]){0,30}[a-z0-9]+$"` + Name string `json:"name" validate:"regexp=^[a-z]([a-z0-9\\-]){0\\,30}[a-z0-9]+$"` AdditionalProperties map[string]interface{} } diff --git a/services/git/v1betaapi/model_create_user_payload.go b/services/git/v1betaapi/model_create_user_payload.go new file mode 100644 index 0000000000..5244259c2d --- /dev/null +++ b/services/git/v1betaapi/model_create_user_payload.go @@ -0,0 +1,300 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +Contact: git@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1betaapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserPayload{} + +// CreateUserPayload Request a STACKIT Git instance User to be created with these properties. +type CreateUserPayload struct { + // A user chosen email to distinguish multiple STACKIT Git instance Users. + Email string `json:"email"` + // Whether to force sending a reset password email. + ForceSendResetPassword *bool `json:"force_send_reset_password,omitempty"` + // Name of the user. + Name string `json:"name"` + // A user password to allow user/pass instance login. + Password string `json:"password"` + // A user chosen username to distinguish multiple STACKIT Git instance Users. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _CreateUserPayload CreateUserPayload + +// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(email string, name string, password string, username string) *CreateUserPayload { + this := CreateUserPayload{} + this.Email = email + var forceSendResetPassword bool = false + this.ForceSendResetPassword = &forceSendResetPassword + this.Name = name + this.Password = password + this.Username = username + return &this +} + +// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { + this := CreateUserPayload{} + var forceSendResetPassword bool = false + this.ForceSendResetPassword = &forceSendResetPassword + return &this +} + +// GetEmail returns the Email field value +func (o *CreateUserPayload) 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 *CreateUserPayload) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *CreateUserPayload) SetEmail(v string) { + o.Email = v +} + +// GetForceSendResetPassword returns the ForceSendResetPassword field value if set, zero value otherwise. +func (o *CreateUserPayload) GetForceSendResetPassword() bool { + if o == nil || IsNil(o.ForceSendResetPassword) { + var ret bool + return ret + } + return *o.ForceSendResetPassword +} + +// GetForceSendResetPasswordOk returns a tuple with the ForceSendResetPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetForceSendResetPasswordOk() (*bool, bool) { + if o == nil || IsNil(o.ForceSendResetPassword) { + return nil, false + } + return o.ForceSendResetPassword, true +} + +// HasForceSendResetPassword returns a boolean if a field has been set. +func (o *CreateUserPayload) HasForceSendResetPassword() bool { + if o != nil && !IsNil(o.ForceSendResetPassword) { + return true + } + + return false +} + +// SetForceSendResetPassword gets a reference to the given bool and assigns it to the ForceSendResetPassword field. +func (o *CreateUserPayload) SetForceSendResetPassword(v bool) { + o.ForceSendResetPassword = &v +} + +// GetName returns the Name field value +func (o *CreateUserPayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateUserPayload) SetName(v string) { + o.Name = v +} + +// GetPassword returns the Password field value +func (o *CreateUserPayload) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *CreateUserPayload) SetPassword(v string) { + o.Password = v +} + +// GetUsername returns the Username field value +func (o *CreateUserPayload) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *CreateUserPayload) SetUsername(v string) { + o.Username = v +} + +func (o CreateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["email"] = o.Email + if !IsNil(o.ForceSendResetPassword) { + toSerialize["force_send_reset_password"] = o.ForceSendResetPassword + } + toSerialize["name"] = o.Name + toSerialize["password"] = o.Password + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateUserPayload) 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", + "name", + "password", + "username", + } + + 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) + } + } + + varCreateUserPayload := _CreateUserPayload{} + + err = json.Unmarshal(data, &varCreateUserPayload) + + if err != nil { + return err + } + + *o = CreateUserPayload(varCreateUserPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "email") + delete(additionalProperties, "force_send_reset_password") + delete(additionalProperties, "name") + delete(additionalProperties, "password") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateUserPayload struct { + value *CreateUserPayload + isSet bool +} + +func (v NullableCreateUserPayload) Get() *CreateUserPayload { + return v.value +} + +func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { + return &NullableCreateUserPayload{value: val, isSet: true} +} + +func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/v1betaapi/model_feature_toggle.go b/services/git/v1betaapi/model_feature_toggle.go index f1a63dbaa6..ce1097e6e8 100644 --- a/services/git/v1betaapi/model_feature_toggle.go +++ b/services/git/v1betaapi/model_feature_toggle.go @@ -21,10 +21,9 @@ var _ MappedNullable = &FeatureToggle{} // FeatureToggle Feature toggles for the instance. type FeatureToggle struct { DefaultEmailNotifications NullableFeatureToggleDefaultEmailNotifications `json:"default_email_notifications,omitempty"` - // Enable commit signatures. - EnableCommitSignatures NullableBool `json:"enable_commit_signatures,omitempty"` // Enable local login. EnableLocalLogin NullableBool `json:"enable_local_login,omitempty"` + Pipelines *Pipelines `json:"pipelines,omitempty"` AdditionalProperties map[string]interface{} } @@ -90,49 +89,6 @@ func (o *FeatureToggle) UnsetDefaultEmailNotifications() { o.DefaultEmailNotifications.Unset() } -// GetEnableCommitSignatures returns the EnableCommitSignatures field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FeatureToggle) GetEnableCommitSignatures() bool { - if o == nil || IsNil(o.EnableCommitSignatures.Get()) { - var ret bool - return ret - } - return *o.EnableCommitSignatures.Get() -} - -// GetEnableCommitSignaturesOk returns a tuple with the EnableCommitSignatures field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FeatureToggle) GetEnableCommitSignaturesOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.EnableCommitSignatures.Get(), o.EnableCommitSignatures.IsSet() -} - -// HasEnableCommitSignatures returns a boolean if a field has been set. -func (o *FeatureToggle) HasEnableCommitSignatures() bool { - if o != nil && o.EnableCommitSignatures.IsSet() { - return true - } - - return false -} - -// SetEnableCommitSignatures gets a reference to the given NullableBool and assigns it to the EnableCommitSignatures field. -func (o *FeatureToggle) SetEnableCommitSignatures(v bool) { - o.EnableCommitSignatures.Set(&v) -} - -// SetEnableCommitSignaturesNil sets the value for EnableCommitSignatures to be an explicit nil -func (o *FeatureToggle) SetEnableCommitSignaturesNil() { - o.EnableCommitSignatures.Set(nil) -} - -// UnsetEnableCommitSignatures ensures that no value is present for EnableCommitSignatures, not even an explicit nil -func (o *FeatureToggle) UnsetEnableCommitSignatures() { - o.EnableCommitSignatures.Unset() -} - // GetEnableLocalLogin returns the EnableLocalLogin field value if set, zero value otherwise (both if not set or set to explicit null). func (o *FeatureToggle) GetEnableLocalLogin() bool { if o == nil || IsNil(o.EnableLocalLogin.Get()) { @@ -176,6 +132,38 @@ func (o *FeatureToggle) UnsetEnableLocalLogin() { o.EnableLocalLogin.Unset() } +// GetPipelines returns the Pipelines field value if set, zero value otherwise. +func (o *FeatureToggle) GetPipelines() Pipelines { + if o == nil || IsNil(o.Pipelines) { + var ret Pipelines + return ret + } + return *o.Pipelines +} + +// GetPipelinesOk returns a tuple with the Pipelines field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureToggle) GetPipelinesOk() (*Pipelines, bool) { + if o == nil || IsNil(o.Pipelines) { + return nil, false + } + return o.Pipelines, true +} + +// HasPipelines returns a boolean if a field has been set. +func (o *FeatureToggle) HasPipelines() bool { + if o != nil && !IsNil(o.Pipelines) { + return true + } + + return false +} + +// SetPipelines gets a reference to the given Pipelines and assigns it to the Pipelines field. +func (o *FeatureToggle) SetPipelines(v Pipelines) { + o.Pipelines = &v +} + func (o FeatureToggle) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -189,12 +177,12 @@ func (o FeatureToggle) ToMap() (map[string]interface{}, error) { if o.DefaultEmailNotifications.IsSet() { toSerialize["default_email_notifications"] = o.DefaultEmailNotifications.Get() } - if o.EnableCommitSignatures.IsSet() { - toSerialize["enable_commit_signatures"] = o.EnableCommitSignatures.Get() - } if o.EnableLocalLogin.IsSet() { toSerialize["enable_local_login"] = o.EnableLocalLogin.Get() } + if !IsNil(o.Pipelines) { + toSerialize["pipelines"] = o.Pipelines + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -218,8 +206,8 @@ func (o *FeatureToggle) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "default_email_notifications") - delete(additionalProperties, "enable_commit_signatures") delete(additionalProperties, "enable_local_login") + delete(additionalProperties, "pipelines") o.AdditionalProperties = additionalProperties } diff --git a/services/git/v1betaapi/model_instance.go b/services/git/v1betaapi/model_instance.go index c58adccc18..70a1b4d797 100644 --- a/services/git/v1betaapi/model_instance.go +++ b/services/git/v1betaapi/model_instance.go @@ -24,6 +24,8 @@ var _ MappedNullable = &Instance{} type Instance struct { // Restricted ACL for instance access. Acl []string `json:"acl"` + // Enable or disable Admin Idp + AdminLogin bool `json:"admin_login"` // How many bytes of disk space is consumed. Read Only. ConsumedDisk string `json:"consumed_disk"` // How many bytes of Object Storage is consumed. Read Only. @@ -35,6 +37,8 @@ type Instance struct { Flavor string `json:"flavor"` // A auto generated unique id which identifies the STACKIT Git instances. Id string `json:"id"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. The `stackit-` prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` // A user chosen name to distinguish multiple STACKIT Git instances. Name string `json:"name"` State InstanceState `json:"state"` @@ -51,9 +55,10 @@ type _Instance Instance // 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(acl []string, consumedDisk string, consumedObjectStorage string, created time.Time, featureToggle FeatureToggle, flavor string, id string, name string, state InstanceState, url string, version string) *Instance { +func NewInstance(acl []string, adminLogin bool, consumedDisk string, consumedObjectStorage string, created time.Time, featureToggle FeatureToggle, flavor string, id string, name string, state InstanceState, url string, version string) *Instance { this := Instance{} this.Acl = acl + this.AdminLogin = adminLogin this.ConsumedDisk = consumedDisk this.ConsumedObjectStorage = consumedObjectStorage this.Created = created @@ -72,6 +77,8 @@ func NewInstance(acl []string, consumedDisk string, consumedObjectStorage string // but it doesn't guarantee that properties required by API are set func NewInstanceWithDefaults() *Instance { this := Instance{} + var adminLogin bool = false + this.AdminLogin = adminLogin return &this } @@ -99,6 +106,30 @@ func (o *Instance) SetAcl(v []string) { o.Acl = v } +// GetAdminLogin returns the AdminLogin field value +func (o *Instance) GetAdminLogin() bool { + if o == nil { + var ret bool + return ret + } + + return o.AdminLogin +} + +// GetAdminLoginOk returns a tuple with the AdminLogin field value +// and a boolean to check if the value has been set. +func (o *Instance) GetAdminLoginOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AdminLogin, true +} + +// SetAdminLogin sets field value +func (o *Instance) SetAdminLogin(v bool) { + o.AdminLogin = v +} + // GetConsumedDisk returns the ConsumedDisk field value func (o *Instance) GetConsumedDisk() string { if o == nil { @@ -243,6 +274,38 @@ func (o *Instance) SetId(v string) { o.Id = v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Instance) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Instance) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Instance) SetLabels(v map[string]string) { + o.Labels = &v +} + // GetName returns the Name field value func (o *Instance) GetName() string { if o == nil { @@ -350,12 +413,16 @@ func (o Instance) MarshalJSON() ([]byte, error) { func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["acl"] = o.Acl + toSerialize["admin_login"] = o.AdminLogin toSerialize["consumed_disk"] = o.ConsumedDisk toSerialize["consumed_object_storage"] = o.ConsumedObjectStorage toSerialize["created"] = o.Created toSerialize["feature_toggle"] = o.FeatureToggle toSerialize["flavor"] = o.Flavor toSerialize["id"] = o.Id + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } toSerialize["name"] = o.Name toSerialize["state"] = o.State toSerialize["url"] = o.Url @@ -374,6 +441,7 @@ func (o *Instance) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "acl", + "admin_login", "consumed_disk", "consumed_object_storage", "created", @@ -414,12 +482,14 @@ func (o *Instance) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "acl") + delete(additionalProperties, "admin_login") delete(additionalProperties, "consumed_disk") delete(additionalProperties, "consumed_object_storage") delete(additionalProperties, "created") delete(additionalProperties, "feature_toggle") delete(additionalProperties, "flavor") delete(additionalProperties, "id") + delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "state") delete(additionalProperties, "url") diff --git a/services/git/v1betaapi/model_list_users.go b/services/git/v1betaapi/model_list_users.go new file mode 100644 index 0000000000..ba43d10327 --- /dev/null +++ b/services/git/v1betaapi/model_list_users.go @@ -0,0 +1,257 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +Contact: git@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1betaapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListUsers type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsers{} + +// ListUsers A paginated list of STACKIT Git instance Users. +type ListUsers struct { + // Number of users returned in this page. + ItemsCount int32 `json:"itemsCount"` + // Zero-based index of the first item in this page. + Offset int32 `json:"offset"` + // Total number of pages available based on the fixed page size of 50. + TotalPages int32 `json:"totalPages"` + Users []User `json:"users"` + AdditionalProperties map[string]interface{} +} + +type _ListUsers ListUsers + +// NewListUsers instantiates a new ListUsers 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 NewListUsers(itemsCount int32, offset int32, totalPages int32, users []User) *ListUsers { + this := ListUsers{} + this.ItemsCount = itemsCount + this.Offset = offset + this.TotalPages = totalPages + this.Users = users + return &this +} + +// NewListUsersWithDefaults instantiates a new ListUsers 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 NewListUsersWithDefaults() *ListUsers { + this := ListUsers{} + return &this +} + +// GetItemsCount returns the ItemsCount field value +func (o *ListUsers) GetItemsCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ItemsCount +} + +// GetItemsCountOk returns a tuple with the ItemsCount field value +// and a boolean to check if the value has been set. +func (o *ListUsers) GetItemsCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ItemsCount, true +} + +// SetItemsCount sets field value +func (o *ListUsers) SetItemsCount(v int32) { + o.ItemsCount = v +} + +// GetOffset returns the Offset field value +func (o *ListUsers) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *ListUsers) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *ListUsers) SetOffset(v int32) { + o.Offset = v +} + +// GetTotalPages returns the TotalPages field value +func (o *ListUsers) GetTotalPages() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *ListUsers) GetTotalPagesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *ListUsers) SetTotalPages(v int32) { + o.TotalPages = v +} + +// GetUsers returns the Users field value +func (o *ListUsers) GetUsers() []User { + if o == nil { + var ret []User + return ret + } + + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value +// and a boolean to check if the value has been set. +func (o *ListUsers) GetUsersOk() ([]User, bool) { + if o == nil { + return nil, false + } + return o.Users, true +} + +// SetUsers sets field value +func (o *ListUsers) SetUsers(v []User) { + o.Users = v +} + +func (o ListUsers) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUsers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["itemsCount"] = o.ItemsCount + toSerialize["offset"] = o.Offset + toSerialize["totalPages"] = o.TotalPages + toSerialize["users"] = o.Users + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListUsers) 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{ + "itemsCount", + "offset", + "totalPages", + "users", + } + + 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) + } + } + + varListUsers := _ListUsers{} + + err = json.Unmarshal(data, &varListUsers) + + if err != nil { + return err + } + + *o = ListUsers(varListUsers) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "itemsCount") + delete(additionalProperties, "offset") + delete(additionalProperties, "totalPages") + delete(additionalProperties, "users") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListUsers struct { + value *ListUsers + isSet bool +} + +func (v NullableListUsers) Get() *ListUsers { + return v.value +} + +func (v *NullableListUsers) Set(val *ListUsers) { + v.value = val + v.isSet = true +} + +func (v NullableListUsers) IsSet() bool { + return v.isSet +} + +func (v *NullableListUsers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUsers(val *ListUsers) *NullableListUsers { + return &NullableListUsers{value: val, isSet: true} +} + +func (v NullableListUsers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUsers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/v1betaapi/model_patch_authentication_payload.go b/services/git/v1betaapi/model_patch_authentication_payload.go index 5c46ec59ff..9c6b484369 100644 --- a/services/git/v1betaapi/model_patch_authentication_payload.go +++ b/services/git/v1betaapi/model_patch_authentication_payload.go @@ -21,13 +21,13 @@ var _ MappedNullable = &PatchAuthenticationPayload{} // PatchAuthenticationPayload Properties to patch on an authentication. All fields are optional. type PatchAuthenticationPayload struct { // The well-known configuration url to use for this authentication definition. - AutoDiscoverUrl *string `json:"auto_discover_url,omitempty" validate:"regexp=^https:\\/\\/[a-zA-Z0-9\\\\-\\\\.]+(\\\\.[a-zA-Z]{2,})+(\\/.*)?$"` + AutoDiscoverUrl *string `json:"auto_discover_url,omitempty" validate:"regexp=^https://[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2\\,})+(/.*)?$"` // The IDP client id to use. ClientId *string `json:"client_id,omitempty"` // The IDP client secret to use. ClientSecret *string `json:"client_secret,omitempty"` // The url of the icon to use for this authentication definition. - IconUrl *string `json:"icon_url,omitempty" validate:"regexp=^https:\\/\\/[a-zA-Z0-9\\\\-\\\\.]+(\\\\.[a-zA-Z]{2,})+(\\/.*)?$"` + IconUrl *string `json:"icon_url,omitempty" validate:"regexp=^https://[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2\\,})+(/.*)?$"` // The Oauth2 provider to use. Provider *string `json:"provider,omitempty"` // Scopes defines the OIDC scopes to request. diff --git a/services/git/v1betaapi/model_patch_instance_payload.go b/services/git/v1betaapi/model_patch_instance_payload.go index 1f819c5df1..4cd804ef10 100644 --- a/services/git/v1betaapi/model_patch_instance_payload.go +++ b/services/git/v1betaapi/model_patch_instance_payload.go @@ -21,8 +21,12 @@ var _ MappedNullable = &PatchInstancePayload{} // PatchInstancePayload Properties to patch on an instance. All fields are optional. type PatchInstancePayload struct { // A list of CIDR network addresses that are allowed to access the instance. - Acl []string `json:"acl,omitempty"` - FeatureToggle *FeatureToggle `json:"feature_toggle,omitempty"` + Acl []string `json:"acl,omitempty"` + // Enable Admin IdP + AdminLogin *bool `json:"admin_login,omitempty"` + FeatureToggle *FeatureToggle `json:"feature_toggle,omitempty"` + // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. The `stackit-` prefix is reserved and cannot be used for Keys. + Labels *map[string]string `json:"labels,omitempty"` AdditionalProperties map[string]interface{} } @@ -78,6 +82,38 @@ func (o *PatchInstancePayload) SetAcl(v []string) { o.Acl = v } +// GetAdminLogin returns the AdminLogin field value if set, zero value otherwise. +func (o *PatchInstancePayload) GetAdminLogin() bool { + if o == nil || IsNil(o.AdminLogin) { + var ret bool + return ret + } + return *o.AdminLogin +} + +// GetAdminLoginOk returns a tuple with the AdminLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchInstancePayload) GetAdminLoginOk() (*bool, bool) { + if o == nil || IsNil(o.AdminLogin) { + return nil, false + } + return o.AdminLogin, true +} + +// HasAdminLogin returns a boolean if a field has been set. +func (o *PatchInstancePayload) HasAdminLogin() bool { + if o != nil && !IsNil(o.AdminLogin) { + return true + } + + return false +} + +// SetAdminLogin gets a reference to the given bool and assigns it to the AdminLogin field. +func (o *PatchInstancePayload) SetAdminLogin(v bool) { + o.AdminLogin = &v +} + // GetFeatureToggle returns the FeatureToggle field value if set, zero value otherwise. func (o *PatchInstancePayload) GetFeatureToggle() FeatureToggle { if o == nil || IsNil(o.FeatureToggle) { @@ -110,6 +146,38 @@ func (o *PatchInstancePayload) SetFeatureToggle(v FeatureToggle) { o.FeatureToggle = &v } +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PatchInstancePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PatchInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *PatchInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + func (o PatchInstancePayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -123,9 +191,15 @@ func (o PatchInstancePayload) ToMap() (map[string]interface{}, error) { if o.Acl != nil { toSerialize["acl"] = o.Acl } + if !IsNil(o.AdminLogin) { + toSerialize["admin_login"] = o.AdminLogin + } if !IsNil(o.FeatureToggle) { toSerialize["feature_toggle"] = o.FeatureToggle } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -149,7 +223,9 @@ func (o *PatchInstancePayload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "acl") + delete(additionalProperties, "admin_login") delete(additionalProperties, "feature_toggle") + delete(additionalProperties, "labels") o.AdditionalProperties = additionalProperties } diff --git a/services/git/v1betaapi/model_pipelines.go b/services/git/v1betaapi/model_pipelines.go new file mode 100644 index 0000000000..ba2e4e0dfe --- /dev/null +++ b/services/git/v1betaapi/model_pipelines.go @@ -0,0 +1,215 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +Contact: git@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1betaapi + +import ( + "encoding/json" +) + +// checks if the Pipelines type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pipelines{} + +// Pipelines Feature toggles for instance pipelines +type Pipelines struct { + // The action URL for the pipelines + ActionUrl NullableString `json:"action_url,omitempty"` + // Enable pipelines for this instance + Enabled NullableBool `json:"enabled,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Pipelines Pipelines + +// NewPipelines instantiates a new Pipelines 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 NewPipelines() *Pipelines { + this := Pipelines{} + return &this +} + +// NewPipelinesWithDefaults instantiates a new Pipelines 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 NewPipelinesWithDefaults() *Pipelines { + this := Pipelines{} + return &this +} + +// GetActionUrl returns the ActionUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Pipelines) GetActionUrl() string { + if o == nil || IsNil(o.ActionUrl.Get()) { + var ret string + return ret + } + return *o.ActionUrl.Get() +} + +// GetActionUrlOk returns a tuple with the ActionUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Pipelines) GetActionUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ActionUrl.Get(), o.ActionUrl.IsSet() +} + +// HasActionUrl returns a boolean if a field has been set. +func (o *Pipelines) HasActionUrl() bool { + if o != nil && o.ActionUrl.IsSet() { + return true + } + + return false +} + +// SetActionUrl gets a reference to the given NullableString and assigns it to the ActionUrl field. +func (o *Pipelines) SetActionUrl(v string) { + o.ActionUrl.Set(&v) +} + +// SetActionUrlNil sets the value for ActionUrl to be an explicit nil +func (o *Pipelines) SetActionUrlNil() { + o.ActionUrl.Set(nil) +} + +// UnsetActionUrl ensures that no value is present for ActionUrl, not even an explicit nil +func (o *Pipelines) UnsetActionUrl() { + o.ActionUrl.Unset() +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Pipelines) GetEnabled() bool { + if o == nil || IsNil(o.Enabled.Get()) { + var ret bool + return ret + } + return *o.Enabled.Get() +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Pipelines) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled.Get(), o.Enabled.IsSet() +} + +// HasEnabled returns a boolean if a field has been set. +func (o *Pipelines) HasEnabled() bool { + if o != nil && o.Enabled.IsSet() { + return true + } + + return false +} + +// SetEnabled gets a reference to the given NullableBool and assigns it to the Enabled field. +func (o *Pipelines) SetEnabled(v bool) { + o.Enabled.Set(&v) +} + +// SetEnabledNil sets the value for Enabled to be an explicit nil +func (o *Pipelines) SetEnabledNil() { + o.Enabled.Set(nil) +} + +// UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +func (o *Pipelines) UnsetEnabled() { + o.Enabled.Unset() +} + +func (o Pipelines) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pipelines) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ActionUrl.IsSet() { + toSerialize["action_url"] = o.ActionUrl.Get() + } + if o.Enabled.IsSet() { + toSerialize["enabled"] = o.Enabled.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Pipelines) UnmarshalJSON(data []byte) (err error) { + varPipelines := _Pipelines{} + + err = json.Unmarshal(data, &varPipelines) + + if err != nil { + return err + } + + *o = Pipelines(varPipelines) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "action_url") + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePipelines struct { + value *Pipelines + isSet bool +} + +func (v NullablePipelines) Get() *Pipelines { + return v.value +} + +func (v *NullablePipelines) Set(val *Pipelines) { + v.value = val + v.isSet = true +} + +func (v NullablePipelines) IsSet() bool { + return v.isSet +} + +func (v *NullablePipelines) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePipelines(val *Pipelines) *NullablePipelines { + return &NullablePipelines{value: val, isSet: true} +} + +func (v NullablePipelines) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePipelines) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/v1betaapi/model_runner_runtime.go b/services/git/v1betaapi/model_runner_runtime.go index 77df79e8e3..10970aa347 100644 --- a/services/git/v1betaapi/model_runner_runtime.go +++ b/services/git/v1betaapi/model_runner_runtime.go @@ -23,7 +23,7 @@ var _ MappedNullable = &RunnerRuntime{} type RunnerRuntime struct { // Indicates the availability of the runner label Availability string `json:"availability"` - // Human-friendly description of the runtime and it's capabilities. + // Human-friendly description of the runtime and its capabilities. Description string `json:"description"` // Human-friendly name of the runtime. DisplayName string `json:"display_name"` diff --git a/services/git/v1betaapi/model_update_user_payload.go b/services/git/v1betaapi/model_update_user_payload.go new file mode 100644 index 0000000000..4c25491407 --- /dev/null +++ b/services/git/v1betaapi/model_update_user_payload.go @@ -0,0 +1,231 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +Contact: git@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUserPayload{} + +// UpdateUserPayload Properties to update a Instance User. All fields are optional. +type UpdateUserPayload struct { + // A user chosen email to distinguish multiple STACKIT Git instance Users. + Email *string `json:"email,omitempty"` + // Name of the user. + Name *string `json:"name,omitempty"` + // A user password to allow user/pass instance login. + Password *string `json:"password,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateUserPayload UpdateUserPayload + +// NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UpdateUserPayload) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UpdateUserPayload) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UpdateUserPayload) SetEmail(v string) { + o.Email = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateUserPayload) 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 *UpdateUserPayload) 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 *UpdateUserPayload) 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 *UpdateUserPayload) SetName(v string) { + o.Name = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *UpdateUserPayload) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpdateUserPayload) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *UpdateUserPayload) SetPassword(v string) { + o.Password = &v +} + +func (o UpdateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateUserPayload) UnmarshalJSON(data []byte) (err error) { + varUpdateUserPayload := _UpdateUserPayload{} + + err = json.Unmarshal(data, &varUpdateUserPayload) + + if err != nil { + return err + } + + *o = UpdateUserPayload(varUpdateUserPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "email") + delete(additionalProperties, "name") + delete(additionalProperties, "password") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateUserPayload struct { + value *UpdateUserPayload + isSet bool +} + +func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { + return v.value +} + +func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { + return &NullableUpdateUserPayload{value: val, isSet: true} +} + +func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/v1betaapi/model_user.go b/services/git/v1betaapi/model_user.go new file mode 100644 index 0000000000..b6868fe2f3 --- /dev/null +++ b/services/git/v1betaapi/model_user.go @@ -0,0 +1,266 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +Contact: git@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1betaapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User Describes a STACKIT Git instance User. +type User struct { + // A user chosen email to distinguish multiple STACKIT Git instance Users. + Email string `json:"email"` + // A auto generated unique id which identifies the STACKIT Git instances. + Id *int32 `json:"id,omitempty"` + // Name of the user. + Name string `json:"name"` + // A user chosen username to distinguish multiple STACKIT Git instance Users. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +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, name string, username string) *User { + this := User{} + this.Email = email + this.Name = name + this.Username = username + 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 +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + 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 *User) GetIdOk() (*int32, 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 *User) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *User) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *User) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *User) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *User) SetName(v string) { + o.Name = v +} + +// GetUsername returns the Username field value +func (o *User) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *User) SetUsername(v string) { + o.Username = 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 + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + 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", + "name", + "username", + } + + 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{} + + err = json.Unmarshal(data, &varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "email") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + 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/git/wait/deprecation.go b/services/git/wait/deprecation.go deleted file mode 100644 index 58f184c093..0000000000 --- a/services/git/wait/deprecation.go +++ /dev/null @@ -1,2 +0,0 @@ -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package wait diff --git a/services/git/wait/wait.go b/services/git/wait/wait.go deleted file mode 100644 index 09ade9aba9..0000000000 --- a/services/git/wait/wait.go +++ /dev/null @@ -1,71 +0,0 @@ -package wait - -import ( - "context" - "errors" - "fmt" - "net/http" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" - "github.com/stackitcloud/stackit-sdk-go/core/wait" - "github.com/stackitcloud/stackit-sdk-go/services/git" -) - -const ( - // Deprecated: InstanceStateReady is deprecated and will be removed after 14th November 2025. Use [git.INSTANCESTATE_READY] instead. - InstanceStateReady = "Ready" - // Deprecated: InstanceStateCreating is deprecated and will be removed after 14th November 2025. Use [git.INSTANCESTATE_CREATING] instead. - InstanceStateCreating = "Creating" - // Deprecated: InstanceStateError is deprecated and will be removed after 14th November 2025. Use [git.INSTANCESTATE_ERROR] instead. - InstanceStateError = "Error" -) - -// APIClientInterface Interfaces needed for tests -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type APIClientInterface interface { - GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*git.Instance, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateGitInstanceWaitHandler(ctx context.Context, a APIClientInterface, projectId, instanceId string) *wait.AsyncActionHandler[git.Instance] { - handler := wait.New(func() (waitFinished bool, response *git.Instance, err error) { - instance, err := a.GetInstanceExecute(ctx, projectId, instanceId) - if err != nil { - return false, nil, err - } - if instance.Id == nil || instance.State == nil { - return false, nil, fmt.Errorf("could not get Instance id or State from response for project %s and instanceId %s", projectId, instanceId) - } - if *instance.Id == instanceId && *instance.State == git.INSTANCESTATE_READY { - return true, instance, nil - } - if *instance.Id == instanceId && *instance.State == git.INSTANCESTATE_ERROR { - return true, instance, fmt.Errorf("create failed for Instance with id %s", instanceId) - } - return false, nil, nil - }) - handler.SetTimeout(10 * time.Minute) - return handler -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteGitInstanceWaitHandler(ctx context.Context, a APIClientInterface, projectId, instanceId string) *wait.AsyncActionHandler[git.Instance] { - handler := wait.New(func() (waitFinished bool, response *git.Instance, err error) { - _, err = a.GetInstanceExecute(ctx, projectId, instanceId) - // the instances is still gettable, e.g. not deleted, when the errors is null - if err == nil { - return false, nil, nil - } - var oapiError *oapierror.GenericOpenAPIError - if errors.As(err, &oapiError) { - if statusCode := oapiError.StatusCode; statusCode == http.StatusNotFound { - return true, nil, nil - } - } - return false, nil, err - }) - handler.SetTimeout(10 * time.Minute) - return handler -} diff --git a/services/git/wait/wait_test.go b/services/git/wait/wait_test.go deleted file mode 100644 index cfbafab7a1..0000000000 --- a/services/git/wait/wait_test.go +++ /dev/null @@ -1,232 +0,0 @@ -package wait - -import ( - "context" - "net/http" - "testing" - "testing/synctest" - "time" - - "github.com/google/go-cmp/cmp" - "github.com/google/uuid" - - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" - "github.com/stackitcloud/stackit-sdk-go/core/utils" - "github.com/stackitcloud/stackit-sdk-go/services/git" -) - -type apiClientMocked struct { - getFails bool - errorCode int - returnInstance bool - projectId string - instanceId string - getGitResponse *git.Instance -} - -func (a *apiClientMocked) GetInstanceExecute(_ context.Context, _, _ string) (*git.Instance, error) { - if a.getFails { - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: a.errorCode, - } - } - if !a.returnInstance { - return nil, nil - } - return a.getGitResponse, nil -} - -var PROJECT_ID = uuid.New().String() -var INSTANCE_ID = uuid.New().String() - -func TestCreateGitInstanceWaitHandler(t *testing.T) { - tests := []struct { - desc string - getFails bool - wantErr bool - wantResp bool - projectId string - instanceId string - returnInstance bool - getGitResponse *git.Instance - }{ - { - desc: "Creation of an instance succeeded", - getFails: false, - wantErr: false, - wantResp: true, - projectId: uuid.New().String(), - instanceId: INSTANCE_ID, - returnInstance: true, - getGitResponse: &git.Instance{ - Created: utils.Ptr(time.Now()), - Id: utils.Ptr(INSTANCE_ID), - Name: utils.Ptr("instance-test"), - State: utils.Ptr(git.INSTANCESTATE_READY), - Url: utils.Ptr("https://testing.git.onstackit.cloud"), - Version: utils.Ptr("v1.6.0"), - }, - }, - { - desc: "Creation of an instance failed with error", - getFails: true, - wantErr: true, - wantResp: false, - projectId: uuid.New().String(), - instanceId: INSTANCE_ID, - returnInstance: true, - getGitResponse: &git.Instance{ - Created: utils.Ptr(time.Now()), - Id: utils.Ptr(INSTANCE_ID), - Name: utils.Ptr("instance-test"), - State: utils.Ptr(git.INSTANCESTATE_READY), - Url: utils.Ptr("https://testing.git.onstackit.cloud"), - Version: utils.Ptr("v1.6.0"), - }, - }, - { - desc: "Creation of an instance with response failed and without error", - getFails: false, - wantErr: true, - wantResp: true, - projectId: uuid.New().String(), - instanceId: INSTANCE_ID, - returnInstance: true, - getGitResponse: &git.Instance{ - Created: utils.Ptr(time.Now()), - Id: utils.Ptr(INSTANCE_ID), - Name: utils.Ptr("instance-test"), - State: utils.Ptr(git.INSTANCESTATE_ERROR), - Url: utils.Ptr("https://testing.git.onstackit.cloud"), - Version: utils.Ptr("v1.6.0"), - }, - }, - { - desc: "Creation of an instance failed without id on the response", - getFails: false, - wantErr: true, - wantResp: false, - projectId: PROJECT_ID, - instanceId: INSTANCE_ID, - returnInstance: true, - getGitResponse: &git.Instance{ - Created: utils.Ptr(time.Now()), - Name: utils.Ptr("instance-test"), - State: utils.Ptr(git.INSTANCESTATE_ERROR), - Url: utils.Ptr("https://testing.git.onstackit.cloud"), - Version: utils.Ptr("v1.6.0"), - }, - }, - - { - desc: "Creation of an instance without state on the response", - getFails: false, - wantErr: true, - wantResp: false, - projectId: PROJECT_ID, - instanceId: INSTANCE_ID, - returnInstance: true, - getGitResponse: &git.Instance{ - Created: utils.Ptr(time.Now()), - Id: utils.Ptr(INSTANCE_ID), - Name: utils.Ptr("instance-test"), - Url: utils.Ptr("https://testing.git.onstackit.cloud"), - Version: utils.Ptr("v1.6.0"), - }, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - getFails: tt.getFails, - projectId: tt.projectId, - instanceId: tt.instanceId, - getGitResponse: tt.getGitResponse, - returnInstance: tt.returnInstance, - } - var instanceWanted *git.Instance - if tt.wantResp { - instanceWanted = tt.getGitResponse - } - - handler := CreateGitInstanceWaitHandler(context.Background(), apiClient, apiClient.projectId, apiClient.instanceId) - - response, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if !cmp.Equal(response, instanceWanted) { - t.Fatalf("handler gotRes = %v, want %v", response, instanceWanted) - } - }) - }) - } -} - -func TestDeleteGitInstanceWaitHandler(t *testing.T) { - tests := []struct { - desc string - wantErr bool - wantReturnedInstance bool - getFails bool - errorCode int - returnInstance bool - getGitResponse *git.Instance - }{ - { - desc: "Instance deletion failed with error", - wantErr: true, - getFails: true, - }, - { - desc: "Instance deletion failed returning existing instance", - wantErr: true, - getFails: false, - - wantReturnedInstance: false, - returnInstance: true, - getGitResponse: &git.Instance{ - Created: utils.Ptr(time.Now()), - Id: utils.Ptr(INSTANCE_ID), - Name: utils.Ptr("instance-test"), - State: utils.Ptr(git.INSTANCESTATE_READY), - Url: utils.Ptr("https://testing.git.onstackit.cloud"), - Version: utils.Ptr("v1.6.0"), - }, - }, - { - desc: "Instance deletion successful", - wantErr: false, - getFails: true, - errorCode: http.StatusNotFound, - wantReturnedInstance: false, - returnInstance: false, - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - apiClient := &apiClientMocked{ - - projectId: uuid.New().String(), - getFails: tt.getFails, - errorCode: tt.errorCode, - returnInstance: tt.returnInstance, - getGitResponse: tt.getGitResponse, - } - - handler := DeleteGitInstanceWaitHandler(context.Background(), apiClient, apiClient.projectId, apiClient.instanceId) - response, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - if (response != nil) != tt.wantReturnedInstance { - t.Fatalf("handler gotRes = %v, want nil", response) - } - }) - }) - } -}