From 98631c2e588eac23ddf03a5675352fdf3aa3e578 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 8 Jul 2026 06:20:54 +0000 Subject: [PATCH] Generate sqlserverflex --- services/sqlserverflex/oas_commit | 2 +- .../src/stackit/sqlserverflex/__init__.py | 216 +- .../stackit/sqlserverflex/api/default_api.py | 3491 +++++++++-------- .../src/stackit/sqlserverflex/api_client.py | 2 +- .../stackit/sqlserverflex/configuration.py | 2 +- .../src/stackit/sqlserverflex/exceptions.py | 2 +- .../stackit/sqlserverflex/models/__init__.py | 116 +- ...g_restore.py => backup_running_restore.py} | 22 +- .../sqlserverflex/models/backup_sort.py | 47 + .../models/create_database_payload.py | 30 +- .../models/create_database_response.py | 6 +- .../models/create_instance_payload.py | 78 +- ....py => create_instance_payload_network.py} | 30 +- .../models/create_instance_response.py | 6 +- .../models/create_user_payload.py | 14 +- .../models/create_user_response.py | 45 +- .../sqlserverflex/models/data_point.py | 90 - ..._collation.py => database_getcollation.py} | 10 +- ...bility.py => database_getcompatibility.py} | 10 +- .../sqlserverflex/models/database_roles.py | 84 + .../sqlserverflex/models/database_sort.py | 45 + .../models/{instance_error.py => error.py} | 26 +- ...{list_users_response.py => external_s3.py} | 48 +- .../sqlserverflex/models/flavor_sort.py | 53 + ...> flavor_storage_classes_storage_class.py} | 30 +- ...orage_range.py => flavor_storage_range.py} | 16 +- .../models/get_backup_response.py | 30 +- .../models/get_database_response.py | 30 +- .../models/get_instance_response.py | 95 +- .../sqlserverflex/models/get_user_response.py | 29 +- .../sqlserverflex/models/instance_edition.py | 38 + ...uest_options.py => instance_encryption.py} | 28 +- ...single_database.py => instance_network.py} | 37 +- .../models/instance_network_access_scope.py | 37 + .../sqlserverflex/models/instance_sort.py | 45 + .../models/{type.py => instance_version.py} | 15 +- .../models/instance_version_opt.py | 36 + .../models/{backup.py => list_backup.py} | 36 +- ...nse_grouped.py => list_backup_response.py} | 30 +- .../models/list_backups_response.py | 34 +- .../models/list_collations_response.py | 10 +- .../models/list_compatibility_response.py | 12 +- ...y => list_current_running_restore_jobs.py} | 18 +- .../models/{flavor.py => list_database.py} | 29 +- .../models/list_databases_response.py | 20 +- .../models/{instance.py => list_flavors.py} | 90 +- .../models/list_flavors_response.py | 20 +- ...user_response_user.py => list_instance.py} | 40 +- .../models/list_instances_response.py | 36 +- .../models/list_metrics_response.py | 94 - .../models/list_roles_response.py | 6 +- .../models/list_storages_response.py | 30 +- .../stackit/sqlserverflex/models/list_user.py | 85 + .../models/list_user_response.py | 104 + .../models/list_versions_response.py | 23 +- ...documentation_storage.py => pagination.py} | 26 +- .../models/partial_update_instance_payload.py | 62 +- ...artial_update_instance_payload_network.py} | 18 +- .../stackit/sqlserverflex/models/replicas.py | 37 + .../models/reset_user_response.py | 25 +- ...> restore_database_from_backup_payload.py} | 38 +- ...ore_database_from_backup_payload_source.py | 151 + .../sqlserverflex/models/s3file_info.py | 84 + .../sqlserverflex/models/single_user.py | 110 - .../sqlserverflex/models/source_backup.py | 90 + .../models/source_external_s3.py | 107 + .../src/stackit/sqlserverflex/models/state.py | 41 + .../stackit/sqlserverflex/models/storage.py | 10 +- .../sqlserverflex/models/storage_create.py | 84 + .../models/{acl.py => storage_update.py} | 18 +- ..._payload.py => trigger_restore_payload.py} | 15 +- .../models/update_instance_payload.py | 62 +- ....py => update_instance_payload_network.py} | 16 +- ... => update_instance_protection_payload.py} | 20 +- .../update_instance_protection_response.py | 83 + .../models/update_instance_response.py | 88 - .../src/stackit/sqlserverflex/models/user.py | 101 - .../stackit/sqlserverflex/models/user_sort.py | 43 + .../{host_metric.py => validation_error.py} | 46 +- ...y => validation_error_validation_inner.py} | 20 +- .../{database_options.py => version.py} | 38 +- .../src/stackit/sqlserverflex/rest.py | 2 +- 82 files changed, 4309 insertions(+), 2784 deletions(-) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{restore_running_restore.py => backup_running_restore.py} (75%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/backup_sort.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_documentation_options.py => create_instance_payload_network.py} (71%) delete mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/data_point.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{mssql_database_collation.py => database_getcollation.py} (89%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{mssql_database_compatibility.py => database_getcompatibility.py} (89%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/database_roles.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/database_sort.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_error.py => error.py} (74%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{list_users_response.py => external_s3.py} (59%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_sort.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_flavor_entry.py => flavor_storage_classes_storage_class.py} (71%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{storage_range.py => flavor_storage_range.py} (78%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/instance_edition.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{database_documentation_create_database_request_options.py => instance_encryption.py} (68%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{single_database.py => instance_network.py} (63%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network_access_scope.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/instance_sort.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{type.py => instance_version.py} (66%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version_opt.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{backup.py => list_backup.py} (67%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py => list_backup_response.py} (68%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{list_restore_jobs_response.py => list_current_running_restore_jobs.py} (81%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{flavor.py => list_database.py} (71%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance.py => list_flavors.py} (50%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{user_response_user.py => list_instance.py} (70%) delete mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/list_metrics_response.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/list_user.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/list_user_response.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_documentation_storage.py => pagination.py} (75%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{database.py => partial_update_instance_payload_network.py} (78%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/replicas.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{host.py => restore_database_from_backup_payload.py} (69%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/s3file_info.py delete mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/single_user.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/source_backup.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/source_external_s3.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/state.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/storage_create.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{acl.py => storage_update.py} (78%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{trigger_database_restore_payload.py => trigger_restore_payload.py} (82%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_documentation_acl.py => update_instance_payload_network.py} (80%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_list_instance.py => update_instance_protection_payload.py} (76%) create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_response.py delete mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_response.py delete mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/user.py create mode 100644 services/sqlserverflex/src/stackit/sqlserverflex/models/user_sort.py rename services/sqlserverflex/src/stackit/sqlserverflex/models/{host_metric.py => validation_error.py} (64%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{instance_list_user.py => validation_error_validation_inner.py} (77%) rename services/sqlserverflex/src/stackit/sqlserverflex/models/{database_options.py => version.py} (64%) diff --git a/services/sqlserverflex/oas_commit b/services/sqlserverflex/oas_commit index e3713dde3..262b78f51 100644 --- a/services/sqlserverflex/oas_commit +++ b/services/sqlserverflex/oas_commit @@ -1 +1 @@ -0e64886dd0847341800d7191ed193b75413be998 +16ba5d1ffe0b8402cbe0c2262eb46074ab6f09af diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/__init__.py b/services/sqlserverflex/src/stackit/sqlserverflex/__init__.py index bf9bb1e1f..00c49d011 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/__init__.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/__init__.py @@ -7,7 +7,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,61 +29,75 @@ "ApiKeyError", "ApiAttributeError", "ApiException", - "ACL", - "Backup", - "BackupListBackupsResponseGrouped", + "BackupRunningRestore", + "BackupSort", "CreateDatabasePayload", "CreateDatabaseResponse", "CreateInstancePayload", + "CreateInstancePayloadNetwork", "CreateInstanceResponse", "CreateUserPayload", "CreateUserResponse", - "DataPoint", - "Database", - "DatabaseDocumentationCreateDatabaseRequestOptions", - "DatabaseOptions", - "Flavor", + "DatabaseGetcollation", + "DatabaseGetcompatibility", + "DatabaseRoles", + "DatabaseSort", + "Error", + "ExternalS3", + "FlavorSort", + "FlavorStorageClassesStorageClass", + "FlavorStorageRange", "GetBackupResponse", "GetDatabaseResponse", "GetInstanceResponse", "GetUserResponse", - "Host", - "HostMetric", - "Instance", - "InstanceDocumentationACL", - "InstanceDocumentationOptions", - "InstanceDocumentationStorage", - "InstanceError", - "InstanceFlavorEntry", - "InstanceListInstance", - "InstanceListUser", + "InstanceEdition", + "InstanceEncryption", + "InstanceNetwork", + "InstanceNetworkAccessScope", + "InstanceSort", + "InstanceVersion", + "InstanceVersionOpt", + "ListBackup", + "ListBackupResponse", "ListBackupsResponse", "ListCollationsResponse", "ListCompatibilityResponse", + "ListCurrentRunningRestoreJobs", + "ListDatabase", "ListDatabasesResponse", + "ListFlavors", "ListFlavorsResponse", + "ListInstance", "ListInstancesResponse", - "ListMetricsResponse", - "ListRestoreJobsResponse", "ListRolesResponse", "ListStoragesResponse", - "ListUsersResponse", + "ListUser", + "ListUserResponse", "ListVersionsResponse", - "MssqlDatabaseCollation", - "MssqlDatabaseCompatibility", + "Pagination", "PartialUpdateInstancePayload", + "PartialUpdateInstancePayloadNetwork", + "Replicas", "ResetUserResponse", - "RestoreRunningRestore", - "SingleDatabase", - "SingleUser", + "RestoreDatabaseFromBackupPayload", + "RestoreDatabaseFromBackupPayloadSource", + "S3fileInfo", + "SourceBackup", + "SourceExternalS3", + "State", "Storage", - "StorageRange", - "TriggerDatabaseRestorePayload", - "Type", + "StorageCreate", + "StorageUpdate", + "TriggerRestorePayload", "UpdateInstancePayload", - "UpdateInstanceResponse", - "User", - "UserResponseUser", + "UpdateInstancePayloadNetwork", + "UpdateInstanceProtectionPayload", + "UpdateInstanceProtectionResponse", + "UserSort", + "ValidationError", + "ValidationErrorValidationInner", + "Version", ] # import apis into sdk package @@ -101,11 +115,10 @@ from stackit.sqlserverflex.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.sqlserverflex.models.acl import ACL as ACL -from stackit.sqlserverflex.models.backup import Backup as Backup -from stackit.sqlserverflex.models.backup_list_backups_response_grouped import ( - BackupListBackupsResponseGrouped as BackupListBackupsResponseGrouped, +from stackit.sqlserverflex.models.backup_running_restore import ( + BackupRunningRestore as BackupRunningRestore, ) +from stackit.sqlserverflex.models.backup_sort import BackupSort as BackupSort from stackit.sqlserverflex.models.create_database_payload import ( CreateDatabasePayload as CreateDatabasePayload, ) @@ -115,6 +128,9 @@ from stackit.sqlserverflex.models.create_instance_payload import ( CreateInstancePayload as CreateInstancePayload, ) +from stackit.sqlserverflex.models.create_instance_payload_network import ( + CreateInstancePayloadNetwork as CreateInstancePayloadNetwork, +) from stackit.sqlserverflex.models.create_instance_response import ( CreateInstanceResponse as CreateInstanceResponse, ) @@ -124,15 +140,23 @@ from stackit.sqlserverflex.models.create_user_response import ( CreateUserResponse as CreateUserResponse, ) -from stackit.sqlserverflex.models.data_point import DataPoint as DataPoint -from stackit.sqlserverflex.models.database import Database as Database -from stackit.sqlserverflex.models.database_documentation_create_database_request_options import ( - DatabaseDocumentationCreateDatabaseRequestOptions as DatabaseDocumentationCreateDatabaseRequestOptions, +from stackit.sqlserverflex.models.database_getcollation import ( + DatabaseGetcollation as DatabaseGetcollation, +) +from stackit.sqlserverflex.models.database_getcompatibility import ( + DatabaseGetcompatibility as DatabaseGetcompatibility, ) -from stackit.sqlserverflex.models.database_options import ( - DatabaseOptions as DatabaseOptions, +from stackit.sqlserverflex.models.database_roles import DatabaseRoles as DatabaseRoles +from stackit.sqlserverflex.models.database_sort import DatabaseSort as DatabaseSort +from stackit.sqlserverflex.models.error import Error as Error +from stackit.sqlserverflex.models.external_s3 import ExternalS3 as ExternalS3 +from stackit.sqlserverflex.models.flavor_sort import FlavorSort as FlavorSort +from stackit.sqlserverflex.models.flavor_storage_classes_storage_class import ( + FlavorStorageClassesStorageClass as FlavorStorageClassesStorageClass, +) +from stackit.sqlserverflex.models.flavor_storage_range import ( + FlavorStorageRange as FlavorStorageRange, ) -from stackit.sqlserverflex.models.flavor import Flavor as Flavor from stackit.sqlserverflex.models.get_backup_response import ( GetBackupResponse as GetBackupResponse, ) @@ -145,27 +169,28 @@ from stackit.sqlserverflex.models.get_user_response import ( GetUserResponse as GetUserResponse, ) -from stackit.sqlserverflex.models.host import Host as Host -from stackit.sqlserverflex.models.host_metric import HostMetric as HostMetric -from stackit.sqlserverflex.models.instance import Instance as Instance -from stackit.sqlserverflex.models.instance_documentation_acl import ( - InstanceDocumentationACL as InstanceDocumentationACL, +from stackit.sqlserverflex.models.instance_edition import ( + InstanceEdition as InstanceEdition, +) +from stackit.sqlserverflex.models.instance_encryption import ( + InstanceEncryption as InstanceEncryption, ) -from stackit.sqlserverflex.models.instance_documentation_options import ( - InstanceDocumentationOptions as InstanceDocumentationOptions, +from stackit.sqlserverflex.models.instance_network import ( + InstanceNetwork as InstanceNetwork, ) -from stackit.sqlserverflex.models.instance_documentation_storage import ( - InstanceDocumentationStorage as InstanceDocumentationStorage, +from stackit.sqlserverflex.models.instance_network_access_scope import ( + InstanceNetworkAccessScope as InstanceNetworkAccessScope, ) -from stackit.sqlserverflex.models.instance_error import InstanceError as InstanceError -from stackit.sqlserverflex.models.instance_flavor_entry import ( - InstanceFlavorEntry as InstanceFlavorEntry, +from stackit.sqlserverflex.models.instance_sort import InstanceSort as InstanceSort +from stackit.sqlserverflex.models.instance_version import ( + InstanceVersion as InstanceVersion, ) -from stackit.sqlserverflex.models.instance_list_instance import ( - InstanceListInstance as InstanceListInstance, +from stackit.sqlserverflex.models.instance_version_opt import ( + InstanceVersionOpt as InstanceVersionOpt, ) -from stackit.sqlserverflex.models.instance_list_user import ( - InstanceListUser as InstanceListUser, +from stackit.sqlserverflex.models.list_backup import ListBackup as ListBackup +from stackit.sqlserverflex.models.list_backup_response import ( + ListBackupResponse as ListBackupResponse, ) from stackit.sqlserverflex.models.list_backups_response import ( ListBackupsResponse as ListBackupsResponse, @@ -176,65 +201,80 @@ from stackit.sqlserverflex.models.list_compatibility_response import ( ListCompatibilityResponse as ListCompatibilityResponse, ) +from stackit.sqlserverflex.models.list_current_running_restore_jobs import ( + ListCurrentRunningRestoreJobs as ListCurrentRunningRestoreJobs, +) +from stackit.sqlserverflex.models.list_database import ListDatabase as ListDatabase from stackit.sqlserverflex.models.list_databases_response import ( ListDatabasesResponse as ListDatabasesResponse, ) +from stackit.sqlserverflex.models.list_flavors import ListFlavors as ListFlavors from stackit.sqlserverflex.models.list_flavors_response import ( ListFlavorsResponse as ListFlavorsResponse, ) +from stackit.sqlserverflex.models.list_instance import ListInstance as ListInstance from stackit.sqlserverflex.models.list_instances_response import ( ListInstancesResponse as ListInstancesResponse, ) -from stackit.sqlserverflex.models.list_metrics_response import ( - ListMetricsResponse as ListMetricsResponse, -) -from stackit.sqlserverflex.models.list_restore_jobs_response import ( - ListRestoreJobsResponse as ListRestoreJobsResponse, -) from stackit.sqlserverflex.models.list_roles_response import ( ListRolesResponse as ListRolesResponse, ) from stackit.sqlserverflex.models.list_storages_response import ( ListStoragesResponse as ListStoragesResponse, ) -from stackit.sqlserverflex.models.list_users_response import ( - ListUsersResponse as ListUsersResponse, +from stackit.sqlserverflex.models.list_user import ListUser as ListUser +from stackit.sqlserverflex.models.list_user_response import ( + ListUserResponse as ListUserResponse, ) from stackit.sqlserverflex.models.list_versions_response import ( ListVersionsResponse as ListVersionsResponse, ) -from stackit.sqlserverflex.models.mssql_database_collation import ( - MssqlDatabaseCollation as MssqlDatabaseCollation, -) -from stackit.sqlserverflex.models.mssql_database_compatibility import ( - MssqlDatabaseCompatibility as MssqlDatabaseCompatibility, -) +from stackit.sqlserverflex.models.pagination import Pagination as Pagination from stackit.sqlserverflex.models.partial_update_instance_payload import ( PartialUpdateInstancePayload as PartialUpdateInstancePayload, ) +from stackit.sqlserverflex.models.partial_update_instance_payload_network import ( + PartialUpdateInstancePayloadNetwork as PartialUpdateInstancePayloadNetwork, +) +from stackit.sqlserverflex.models.replicas import Replicas as Replicas from stackit.sqlserverflex.models.reset_user_response import ( ResetUserResponse as ResetUserResponse, ) -from stackit.sqlserverflex.models.restore_running_restore import ( - RestoreRunningRestore as RestoreRunningRestore, +from stackit.sqlserverflex.models.restore_database_from_backup_payload import ( + RestoreDatabaseFromBackupPayload as RestoreDatabaseFromBackupPayload, +) +from stackit.sqlserverflex.models.restore_database_from_backup_payload_source import ( + RestoreDatabaseFromBackupPayloadSource as RestoreDatabaseFromBackupPayloadSource, ) -from stackit.sqlserverflex.models.single_database import ( - SingleDatabase as SingleDatabase, +from stackit.sqlserverflex.models.s3file_info import S3fileInfo as S3fileInfo +from stackit.sqlserverflex.models.source_backup import SourceBackup as SourceBackup +from stackit.sqlserverflex.models.source_external_s3 import ( + SourceExternalS3 as SourceExternalS3, ) -from stackit.sqlserverflex.models.single_user import SingleUser as SingleUser +from stackit.sqlserverflex.models.state import State as State from stackit.sqlserverflex.models.storage import Storage as Storage -from stackit.sqlserverflex.models.storage_range import StorageRange as StorageRange -from stackit.sqlserverflex.models.trigger_database_restore_payload import ( - TriggerDatabaseRestorePayload as TriggerDatabaseRestorePayload, +from stackit.sqlserverflex.models.storage_create import StorageCreate as StorageCreate +from stackit.sqlserverflex.models.storage_update import StorageUpdate as StorageUpdate +from stackit.sqlserverflex.models.trigger_restore_payload import ( + TriggerRestorePayload as TriggerRestorePayload, ) -from stackit.sqlserverflex.models.type import Type as Type from stackit.sqlserverflex.models.update_instance_payload import ( UpdateInstancePayload as UpdateInstancePayload, ) -from stackit.sqlserverflex.models.update_instance_response import ( - UpdateInstanceResponse as UpdateInstanceResponse, +from stackit.sqlserverflex.models.update_instance_payload_network import ( + UpdateInstancePayloadNetwork as UpdateInstancePayloadNetwork, +) +from stackit.sqlserverflex.models.update_instance_protection_payload import ( + UpdateInstanceProtectionPayload as UpdateInstanceProtectionPayload, +) +from stackit.sqlserverflex.models.update_instance_protection_response import ( + UpdateInstanceProtectionResponse as UpdateInstanceProtectionResponse, +) +from stackit.sqlserverflex.models.user_sort import UserSort as UserSort +from stackit.sqlserverflex.models.validation_error import ( + ValidationError as ValidationError, ) -from stackit.sqlserverflex.models.user import User as User -from stackit.sqlserverflex.models.user_response_user import ( - UserResponseUser as UserResponseUser, +from stackit.sqlserverflex.models.validation_error_validation_inner import ( + ValidationErrorValidationInner as ValidationErrorValidationInner, ) +from stackit.sqlserverflex.models.version import Version as Version diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/api/default_api.py b/services/sqlserverflex/src/stackit/sqlserverflex/api/default_api.py index a3e57adee..b9215b2cf 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/api/default_api.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/api/default_api.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,41 +26,51 @@ from stackit.sqlserverflex.api_client import ApiClient, RequestSerialized from stackit.sqlserverflex.api_response import ApiResponse +from stackit.sqlserverflex.models.backup_sort import BackupSort from stackit.sqlserverflex.models.create_database_payload import CreateDatabasePayload from stackit.sqlserverflex.models.create_database_response import CreateDatabaseResponse from stackit.sqlserverflex.models.create_instance_payload import CreateInstancePayload from stackit.sqlserverflex.models.create_instance_response import CreateInstanceResponse from stackit.sqlserverflex.models.create_user_payload import CreateUserPayload from stackit.sqlserverflex.models.create_user_response import CreateUserResponse +from stackit.sqlserverflex.models.database_sort import DatabaseSort +from stackit.sqlserverflex.models.flavor_sort import FlavorSort from stackit.sqlserverflex.models.get_backup_response import GetBackupResponse from stackit.sqlserverflex.models.get_database_response import GetDatabaseResponse from stackit.sqlserverflex.models.get_instance_response import GetInstanceResponse from stackit.sqlserverflex.models.get_user_response import GetUserResponse -from stackit.sqlserverflex.models.list_backups_response import ListBackupsResponse +from stackit.sqlserverflex.models.instance_sort import InstanceSort +from stackit.sqlserverflex.models.list_backup_response import ListBackupResponse from stackit.sqlserverflex.models.list_collations_response import ListCollationsResponse from stackit.sqlserverflex.models.list_compatibility_response import ( ListCompatibilityResponse, ) +from stackit.sqlserverflex.models.list_current_running_restore_jobs import ( + ListCurrentRunningRestoreJobs, +) from stackit.sqlserverflex.models.list_databases_response import ListDatabasesResponse from stackit.sqlserverflex.models.list_flavors_response import ListFlavorsResponse from stackit.sqlserverflex.models.list_instances_response import ListInstancesResponse -from stackit.sqlserverflex.models.list_metrics_response import ListMetricsResponse -from stackit.sqlserverflex.models.list_restore_jobs_response import ( - ListRestoreJobsResponse, -) from stackit.sqlserverflex.models.list_roles_response import ListRolesResponse from stackit.sqlserverflex.models.list_storages_response import ListStoragesResponse -from stackit.sqlserverflex.models.list_users_response import ListUsersResponse +from stackit.sqlserverflex.models.list_user_response import ListUserResponse from stackit.sqlserverflex.models.list_versions_response import ListVersionsResponse from stackit.sqlserverflex.models.partial_update_instance_payload import ( PartialUpdateInstancePayload, ) from stackit.sqlserverflex.models.reset_user_response import ResetUserResponse -from stackit.sqlserverflex.models.trigger_database_restore_payload import ( - TriggerDatabaseRestorePayload, +from stackit.sqlserverflex.models.restore_database_from_backup_payload import ( + RestoreDatabaseFromBackupPayload, ) +from stackit.sqlserverflex.models.trigger_restore_payload import TriggerRestorePayload from stackit.sqlserverflex.models.update_instance_payload import UpdateInstancePayload -from stackit.sqlserverflex.models.update_instance_response import UpdateInstanceResponse +from stackit.sqlserverflex.models.update_instance_protection_payload import ( + UpdateInstanceProtectionPayload, +) +from stackit.sqlserverflex.models.update_instance_protection_response import ( + UpdateInstanceProtectionResponse, +) +from stackit.sqlserverflex.models.user_sort import UserSort from stackit.sqlserverflex.rest import RESTResponseType @@ -80,10 +90,13 @@ def __init__(self, configuration: Configuration = None) -> None: @validate_call def create_database( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - create_database_payload: Annotated[CreateDatabasePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + create_database_payload: Annotated[ + CreateDatabasePayload, + Field(description="The request body containing the information for the new database."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -94,17 +107,17 @@ def create_database( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateDatabaseResponse: - """Create a Database + """Create Database - Create a Database for an instance + Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param create_database_payload: Body (required) + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param create_database_payload: The request body containing the information for the new database. (required) :type create_database_payload: CreateDatabasePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -130,8 +143,8 @@ def create_database( _param = self._create_database_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, create_database_payload=create_database_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -140,11 +153,13 @@ def create_database( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateDatabaseResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "CreateDatabaseResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -156,10 +171,13 @@ def create_database( @validate_call def create_database_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - create_database_payload: Annotated[CreateDatabasePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + create_database_payload: Annotated[ + CreateDatabasePayload, + Field(description="The request body containing the information for the new database."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -170,17 +188,17 @@ def create_database_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateDatabaseResponse]: - """Create a Database + """Create Database - Create a Database for an instance + Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param create_database_payload: Body (required) + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param create_database_payload: The request body containing the information for the new database. (required) :type create_database_payload: CreateDatabasePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -206,8 +224,8 @@ def create_database_with_http_info( _param = self._create_database_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, create_database_payload=create_database_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -216,11 +234,13 @@ def create_database_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateDatabaseResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "CreateDatabaseResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -232,10 +252,13 @@ def create_database_with_http_info( @validate_call def create_database_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - create_database_payload: Annotated[CreateDatabasePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + create_database_payload: Annotated[ + CreateDatabasePayload, + Field(description="The request body containing the information for the new database."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -246,17 +269,17 @@ def create_database_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a Database + """Create Database - Create a Database for an instance + Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param create_database_payload: Body (required) + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param create_database_payload: The request body containing the information for the new database. (required) :type create_database_payload: CreateDatabasePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -282,8 +305,8 @@ def create_database_without_preload_content( _param = self._create_database_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, create_database_payload=create_database_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -292,11 +315,13 @@ def create_database_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateDatabaseResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "CreateDatabaseResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -304,8 +329,8 @@ def create_database_without_preload_content( def _create_database_serialize( self, project_id, - instance_id, region, + instance_id, create_database_payload, _request_auth, _content_type, @@ -327,10 +352,10 @@ def _create_database_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -355,7 +380,7 @@ def _create_database_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -371,9 +396,14 @@ def _create_database_serialize( @validate_call def create_instance( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - create_instance_payload: Annotated[CreateInstancePayload, Field(description="Body")], + create_instance_payload: Annotated[ + CreateInstancePayload, + Field( + description="The request body with the parameters for the instance creation. Every parameter is required." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -386,13 +416,13 @@ def create_instance( ) -> CreateInstanceResponse: """Create Instance - Create a new instance of a sqlServerCRD database + Create a new instance of a sqlserver database instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str - :param create_instance_payload: Body (required) + :param create_instance_payload: The request body with the parameters for the instance creation. Every parameter is required. (required) :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -427,11 +457,13 @@ def create_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "CreateInstanceResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -443,9 +475,14 @@ def create_instance( @validate_call def create_instance_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - create_instance_payload: Annotated[CreateInstancePayload, Field(description="Body")], + create_instance_payload: Annotated[ + CreateInstancePayload, + Field( + description="The request body with the parameters for the instance creation. Every parameter is required." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -458,13 +495,13 @@ def create_instance_with_http_info( ) -> ApiResponse[CreateInstanceResponse]: """Create Instance - Create a new instance of a sqlServerCRD database + Create a new instance of a sqlserver database instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str - :param create_instance_payload: Body (required) + :param create_instance_payload: The request body with the parameters for the instance creation. Every parameter is required. (required) :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -499,11 +536,13 @@ def create_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "CreateInstanceResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -515,9 +554,14 @@ def create_instance_with_http_info( @validate_call def create_instance_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - create_instance_payload: Annotated[CreateInstancePayload, Field(description="Body")], + create_instance_payload: Annotated[ + CreateInstancePayload, + Field( + description="The request body with the parameters for the instance creation. Every parameter is required." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -530,13 +574,13 @@ def create_instance_without_preload_content( ) -> RESTResponseType: """Create Instance - Create a new instance of a sqlServerCRD database + Create a new instance of a sqlserver database instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str - :param create_instance_payload: Body (required) + :param create_instance_payload: The request body with the parameters for the instance creation. Every parameter is required. (required) :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -571,11 +615,13 @@ def create_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "CreateInstanceResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -631,7 +677,7 @@ def _create_instance_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v2/projects/{projectId}/regions/{region}/instances", + resource_path="/v3/projects/{projectId}/regions/{region}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -647,14 +693,11 @@ def _create_instance_serialize( @validate_call def create_user( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], create_user_payload: Annotated[ - CreateUserPayload, - Field( - description="The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint." - ), + CreateUserPayload, Field(description="The request body containing the user details.") ], _request_timeout: Union[ None, @@ -668,15 +711,15 @@ def create_user( ) -> CreateUserResponse: """Create User - Create user for an instance + Create user for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param create_user_payload: The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint. (required) + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param create_user_payload: The request body containing the user details. (required) :type create_user_payload: CreateUserPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -702,8 +745,8 @@ def create_user( _param = self._create_user_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, create_user_payload=create_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -712,11 +755,13 @@ def create_user( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "CreateUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -728,14 +773,11 @@ def create_user( @validate_call def create_user_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], create_user_payload: Annotated[ - CreateUserPayload, - Field( - description="The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint." - ), + CreateUserPayload, Field(description="The request body containing the user details.") ], _request_timeout: Union[ None, @@ -749,15 +791,15 @@ def create_user_with_http_info( ) -> ApiResponse[CreateUserResponse]: """Create User - Create user for an instance + Create user for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param create_user_payload: The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint. (required) + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param create_user_payload: The request body containing the user details. (required) :type create_user_payload: CreateUserPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -783,8 +825,8 @@ def create_user_with_http_info( _param = self._create_user_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, create_user_payload=create_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -793,11 +835,13 @@ def create_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "CreateUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -809,14 +853,11 @@ def create_user_with_http_info( @validate_call def create_user_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], create_user_payload: Annotated[ - CreateUserPayload, - Field( - description="The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint." - ), + CreateUserPayload, Field(description="The request body containing the user details.") ], _request_timeout: Union[ None, @@ -830,15 +871,15 @@ def create_user_without_preload_content( ) -> RESTResponseType: """Create User - Create user for an instance + Create user for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param create_user_payload: The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint. (required) + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param create_user_payload: The request body containing the user details. (required) :type create_user_payload: CreateUserPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -864,8 +905,8 @@ def create_user_without_preload_content( _param = self._create_user_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, create_user_payload=create_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -874,11 +915,13 @@ def create_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "CreateUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -886,8 +929,8 @@ def create_user_without_preload_content( def _create_user_serialize( self, project_id, - instance_id, region, + instance_id, create_user_payload, _request_auth, _content_type, @@ -909,10 +952,10 @@ def _create_user_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -937,7 +980,7 @@ def _create_user_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -953,10 +996,10 @@ def _create_user_serialize( @validate_call def delete_database( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -969,16 +1012,16 @@ def delete_database( ) -> None: """Delete Database - Delete Database for an instance + Delete database for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1003,9 +1046,9 @@ def delete_database( _param = self._delete_database_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1013,11 +1056,12 @@ def delete_database( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1029,10 +1073,10 @@ def delete_database( @validate_call def delete_database_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1045,16 +1089,16 @@ def delete_database_with_http_info( ) -> ApiResponse[None]: """Delete Database - Delete Database for an instance + Delete database for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1079,9 +1123,9 @@ def delete_database_with_http_info( _param = self._delete_database_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1089,11 +1133,12 @@ def delete_database_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1105,10 +1150,10 @@ def delete_database_with_http_info( @validate_call def delete_database_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1121,16 +1166,16 @@ def delete_database_without_preload_content( ) -> RESTResponseType: """Delete Database - Delete Database for an instance + Delete database for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1155,9 +1200,9 @@ def delete_database_without_preload_content( _param = self._delete_database_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1165,11 +1210,12 @@ def delete_database_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -1177,9 +1223,9 @@ def delete_database_without_preload_content( def _delete_database_serialize( self, project_id, + region, instance_id, database_name, - region, _request_auth, _content_type, _headers, @@ -1200,12 +1246,12 @@ def _delete_database_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if instance_id is not None: _path_params["instanceId"] = instance_id if database_name is not None: _path_params["databaseName"] = database_name - if region is not None: - _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1220,7 +1266,7 @@ def _delete_database_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1236,9 +1282,9 @@ def _delete_database_serialize( @validate_call def delete_instance( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1251,14 +1297,14 @@ def delete_instance( ) -> None: """Delete Instance - Delete available instance + Delete an available sqlserver instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1283,8 +1329,8 @@ def delete_instance( _param = self._delete_instance_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1292,11 +1338,12 @@ def delete_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1308,9 +1355,9 @@ def delete_instance( @validate_call def delete_instance_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1323,14 +1370,14 @@ def delete_instance_with_http_info( ) -> ApiResponse[None]: """Delete Instance - Delete available instance + Delete an available sqlserver instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1355,8 +1402,8 @@ def delete_instance_with_http_info( _param = self._delete_instance_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1364,11 +1411,12 @@ def delete_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1380,9 +1428,9 @@ def delete_instance_with_http_info( @validate_call def delete_instance_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1395,14 +1443,14 @@ def delete_instance_without_preload_content( ) -> RESTResponseType: """Delete Instance - Delete available instance + Delete an available sqlserver instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1427,8 +1475,8 @@ def delete_instance_without_preload_content( _param = self._delete_instance_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1436,11 +1484,12 @@ def delete_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -1448,8 +1497,8 @@ def delete_instance_without_preload_content( def _delete_instance_serialize( self, project_id, - instance_id, region, + instance_id, _request_auth, _content_type, _headers, @@ -1470,10 +1519,10 @@ def _delete_instance_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -1488,7 +1537,7 @@ def _delete_instance_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1504,10 +1553,10 @@ def _delete_instance_serialize( @validate_call def delete_user( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="User ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1520,16 +1569,16 @@ def delete_user( ) -> None: """Delete User - Delete user for an instance + Delete an user from a specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: User ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1554,9 +1603,9 @@ def delete_user( _param = self._delete_user_serialize( project_id=project_id, + region=region, instance_id=instance_id, user_id=user_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1564,11 +1613,12 @@ def delete_user( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1580,10 +1630,10 @@ def delete_user( @validate_call def delete_user_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="User ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1596,16 +1646,16 @@ def delete_user_with_http_info( ) -> ApiResponse[None]: """Delete User - Delete user for an instance + Delete an user from a specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: User ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1630,9 +1680,9 @@ def delete_user_with_http_info( _param = self._delete_user_serialize( project_id=project_id, + region=region, instance_id=instance_id, user_id=user_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1640,11 +1690,12 @@ def delete_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1656,10 +1707,10 @@ def delete_user_with_http_info( @validate_call def delete_user_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="User ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1672,16 +1723,16 @@ def delete_user_without_preload_content( ) -> RESTResponseType: """Delete User - Delete user for an instance + Delete an user from a specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: User ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1706,9 +1757,9 @@ def delete_user_without_preload_content( _param = self._delete_user_serialize( project_id=project_id, + region=region, instance_id=instance_id, user_id=user_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1716,11 +1767,12 @@ def delete_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -1728,9 +1780,9 @@ def delete_user_without_preload_content( def _delete_user_serialize( self, project_id, + region, instance_id, user_id, - region, _request_auth, _content_type, _headers, @@ -1751,12 +1803,12 @@ def _delete_user_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if instance_id is not None: _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id - if region is not None: - _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1771,7 +1823,7 @@ def _delete_user_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1787,10 +1839,10 @@ def _delete_user_serialize( @validate_call def get_backup( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - backup_id: Annotated[StrictStr, Field(description="Backup ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + backup_id: Annotated[StrictInt, Field(description="The ID of the backup.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1803,16 +1855,16 @@ def get_backup( ) -> GetBackupResponse: """Get specific backup - Get specific available backup + Get information about a specific backup for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param backup_id: Backup ID (required) - :type backup_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param backup_id: The ID of the backup. (required) + :type backup_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1837,9 +1889,9 @@ def get_backup( _param = self._get_backup_serialize( project_id=project_id, + region=region, instance_id=instance_id, backup_id=backup_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1848,10 +1900,12 @@ def get_backup( _response_types_map: Dict[str, Optional[str]] = { "200": "GetBackupResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1863,10 +1917,10 @@ def get_backup( @validate_call def get_backup_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - backup_id: Annotated[StrictStr, Field(description="Backup ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + backup_id: Annotated[StrictInt, Field(description="The ID of the backup.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1879,16 +1933,16 @@ def get_backup_with_http_info( ) -> ApiResponse[GetBackupResponse]: """Get specific backup - Get specific available backup + Get information about a specific backup for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param backup_id: Backup ID (required) - :type backup_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param backup_id: The ID of the backup. (required) + :type backup_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1913,9 +1967,9 @@ def get_backup_with_http_info( _param = self._get_backup_serialize( project_id=project_id, + region=region, instance_id=instance_id, backup_id=backup_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1924,10 +1978,12 @@ def get_backup_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetBackupResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -1939,10 +1995,10 @@ def get_backup_with_http_info( @validate_call def get_backup_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - backup_id: Annotated[StrictStr, Field(description="Backup ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + backup_id: Annotated[StrictInt, Field(description="The ID of the backup.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1955,16 +2011,16 @@ def get_backup_without_preload_content( ) -> RESTResponseType: """Get specific backup - Get specific available backup + Get information about a specific backup for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param backup_id: Backup ID (required) - :type backup_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param backup_id: The ID of the backup. (required) + :type backup_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1989,9 +2045,9 @@ def get_backup_without_preload_content( _param = self._get_backup_serialize( project_id=project_id, + region=region, instance_id=instance_id, backup_id=backup_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2000,10 +2056,12 @@ def get_backup_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetBackupResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -2011,9 +2069,9 @@ def get_backup_without_preload_content( def _get_backup_serialize( self, project_id, + region, instance_id, backup_id, - region, _request_auth, _content_type, _headers, @@ -2034,12 +2092,12 @@ def _get_backup_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if instance_id is not None: _path_params["instanceId"] = instance_id if backup_id is not None: _path_params["backupId"] = backup_id - if region is not None: - _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2054,7 +2112,7 @@ def _get_backup_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2070,10 +2128,10 @@ def _get_backup_serialize( @validate_call def get_database( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2084,18 +2142,18 @@ def get_database( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetDatabaseResponse: - """Get specific Database + """Get Database Get specific available database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2120,9 +2178,9 @@ def get_database( _param = self._get_database_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2131,10 +2189,12 @@ def get_database( _response_types_map: Dict[str, Optional[str]] = { "200": "GetDatabaseResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2146,10 +2206,10 @@ def get_database( @validate_call def get_database_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2160,18 +2220,18 @@ def get_database_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetDatabaseResponse]: - """Get specific Database + """Get Database Get specific available database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2196,9 +2256,9 @@ def get_database_with_http_info( _param = self._get_database_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2207,10 +2267,12 @@ def get_database_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetDatabaseResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2222,10 +2284,10 @@ def get_database_with_http_info( @validate_call def get_database_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2236,18 +2298,18 @@ def get_database_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get specific Database + """Get Database Get specific available database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2272,9 +2334,9 @@ def get_database_without_preload_content( _param = self._get_database_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2283,10 +2345,12 @@ def get_database_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetDatabaseResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -2294,9 +2358,9 @@ def get_database_without_preload_content( def _get_database_serialize( self, project_id, + region, instance_id, database_name, - region, _request_auth, _content_type, _headers, @@ -2317,12 +2381,12 @@ def _get_database_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if instance_id is not None: _path_params["instanceId"] = instance_id if database_name is not None: _path_params["databaseName"] = database_name - if region is not None: - _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2337,7 +2401,7 @@ def _get_database_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2353,9 +2417,9 @@ def _get_database_serialize( @validate_call def get_instance( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2366,16 +2430,16 @@ def get_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetInstanceResponse: - """Get specific instance + """Get Specific Instance - Get specific available instances + Get information about a specific available instance - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2400,8 +2464,8 @@ def get_instance( _param = self._get_instance_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2410,10 +2474,11 @@ def get_instance( _response_types_map: Dict[str, Optional[str]] = { "200": "GetInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2425,9 +2490,9 @@ def get_instance( @validate_call def get_instance_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2438,16 +2503,16 @@ def get_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetInstanceResponse]: - """Get specific instance + """Get Specific Instance - Get specific available instances + Get information about a specific available instance - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2472,8 +2537,8 @@ def get_instance_with_http_info( _param = self._get_instance_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2482,10 +2547,11 @@ def get_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2497,9 +2563,9 @@ def get_instance_with_http_info( @validate_call def get_instance_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2510,16 +2576,16 @@ def get_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get specific instance + """Get Specific Instance - Get specific available instances + Get information about a specific available instance - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2544,8 +2610,8 @@ def get_instance_without_preload_content( _param = self._get_instance_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2554,10 +2620,11 @@ def get_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -2565,8 +2632,8 @@ def get_instance_without_preload_content( def _get_instance_serialize( self, project_id, - instance_id, region, + instance_id, _request_auth, _content_type, _headers, @@ -2587,10 +2654,10 @@ def _get_instance_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -2605,7 +2672,7 @@ def _get_instance_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2621,10 +2688,10 @@ def _get_instance_serialize( @validate_call def get_user( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="User ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2637,16 +2704,16 @@ def get_user( ) -> GetUserResponse: """Get User - Get specific available user for an instance + Get a specific available user for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: User ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2671,9 +2738,9 @@ def get_user( _param = self._get_user_serialize( project_id=project_id, + region=region, instance_id=instance_id, user_id=user_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2682,11 +2749,11 @@ def get_user( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2698,10 +2765,10 @@ def get_user( @validate_call def get_user_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="User ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2714,16 +2781,16 @@ def get_user_with_http_info( ) -> ApiResponse[GetUserResponse]: """Get User - Get specific available user for an instance + Get a specific available user for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: User ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2748,9 +2815,9 @@ def get_user_with_http_info( _param = self._get_user_serialize( project_id=project_id, + region=region, instance_id=instance_id, user_id=user_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2759,11 +2826,11 @@ def get_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2775,10 +2842,10 @@ def get_user_with_http_info( @validate_call def get_user_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="User ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2791,16 +2858,16 @@ def get_user_without_preload_content( ) -> RESTResponseType: """Get User - Get specific available user for an instance + Get a specific available user for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: User ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2825,9 +2892,9 @@ def get_user_without_preload_content( _param = self._get_user_serialize( project_id=project_id, + region=region, instance_id=instance_id, user_id=user_id, - region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2836,11 +2903,11 @@ def get_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -2848,9 +2915,9 @@ def get_user_without_preload_content( def _get_user_serialize( self, project_id, + region, instance_id, user_id, - region, _request_auth, _content_type, _headers, @@ -2871,12 +2938,12 @@ def _get_user_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if instance_id is not None: _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id - if region is not None: - _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2891,7 +2958,7 @@ def _get_user_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2907,9 +2974,16 @@ def _get_user_serialize( @validate_call def list_backups( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[BackupSort], Field(description="Sorting of the backups to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2919,17 +2993,23 @@ def list_backups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListBackupsResponse: + ) -> ListBackupResponse: """List backups - List all backups which are available for a specific instance + List all backups which are available for a specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the backups to be returned on each page. + :type sort: BackupSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2954,8 +3034,11 @@ def list_backups( _param = self._list_backups_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2963,11 +3046,13 @@ def list_backups( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListBackupsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListBackupResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2979,9 +3064,16 @@ def list_backups( @validate_call def list_backups_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[BackupSort], Field(description="Sorting of the backups to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2991,17 +3083,23 @@ def list_backups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListBackupsResponse]: + ) -> ApiResponse[ListBackupResponse]: """List backups - List all backups which are available for a specific instance + List all backups which are available for a specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the backups to be returned on each page. + :type sort: BackupSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3026,8 +3124,11 @@ def list_backups_with_http_info( _param = self._list_backups_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3035,11 +3136,13 @@ def list_backups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListBackupsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListBackupResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3051,9 +3154,16 @@ def list_backups_with_http_info( @validate_call def list_backups_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[BackupSort], Field(description="Sorting of the backups to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3066,14 +3176,20 @@ def list_backups_without_preload_content( ) -> RESTResponseType: """List backups - List all backups which are available for a specific instance + List all backups which are available for a specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the backups to be returned on each page. + :type sort: BackupSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3098,8 +3214,11 @@ def list_backups_without_preload_content( _param = self._list_backups_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3107,11 +3226,13 @@ def list_backups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListBackupsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListBackupResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -3119,8 +3240,11 @@ def list_backups_without_preload_content( def _list_backups_serialize( self, project_id, - instance_id, region, + instance_id, + page, + size, + sort, _request_auth, _content_type, _headers, @@ -3141,11 +3265,23 @@ def _list_backups_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters + if page is not None: + + _query_params.append(("page", page)) + + if size is not None: + + _query_params.append(("size", size)) + + if sort is not None: + + _query_params.append(("sort", sort.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -3159,7 +3295,7 @@ def _list_backups_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3175,9 +3311,9 @@ def _list_backups_serialize( @validate_call def list_collations( self, - project_id: Annotated[StrictStr, Field(description="The ID of the STACKIT project")], - instance_id: Annotated[StrictStr, Field(description="The ID of the instance")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3190,14 +3326,14 @@ def list_collations( ) -> ListCollationsResponse: """Get database collation list - Returns a list of collations + Returns a list of collations for an instance - :param project_id: The ID of the STACKIT project (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The ID of the instance (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3222,8 +3358,8 @@ def list_collations( _param = self._list_collations_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3232,10 +3368,12 @@ def list_collations( _response_types_map: Dict[str, Optional[str]] = { "200": "ListCollationsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3247,9 +3385,9 @@ def list_collations( @validate_call def list_collations_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="The ID of the STACKIT project")], - instance_id: Annotated[StrictStr, Field(description="The ID of the instance")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3262,14 +3400,14 @@ def list_collations_with_http_info( ) -> ApiResponse[ListCollationsResponse]: """Get database collation list - Returns a list of collations + Returns a list of collations for an instance - :param project_id: The ID of the STACKIT project (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The ID of the instance (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3294,8 +3432,8 @@ def list_collations_with_http_info( _param = self._list_collations_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3304,10 +3442,12 @@ def list_collations_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListCollationsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3319,9 +3459,9 @@ def list_collations_with_http_info( @validate_call def list_collations_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="The ID of the STACKIT project")], - instance_id: Annotated[StrictStr, Field(description="The ID of the instance")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3334,14 +3474,14 @@ def list_collations_without_preload_content( ) -> RESTResponseType: """Get database collation list - Returns a list of collations + Returns a list of collations for an instance - :param project_id: The ID of the STACKIT project (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The ID of the instance (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3366,8 +3506,8 @@ def list_collations_without_preload_content( _param = self._list_collations_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3376,10 +3516,12 @@ def list_collations_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListCollationsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -3387,8 +3529,8 @@ def list_collations_without_preload_content( def _list_collations_serialize( self, project_id, - instance_id, region, + instance_id, _request_auth, _content_type, _headers, @@ -3409,10 +3551,10 @@ def _list_collations_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -3427,7 +3569,7 @@ def _list_collations_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/collation", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/collations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3441,11 +3583,11 @@ def _list_collations_serialize( ) @validate_call - def list_compatibility( + def list_compatibilities( self, - project_id: Annotated[StrictStr, Field(description="The ID of the STACKIT project")], - instance_id: Annotated[StrictStr, Field(description="The ID of the instance")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3460,12 +3602,12 @@ def list_compatibility( Returns a list of compatibility levels for creating a new database - :param project_id: The ID of the STACKIT project (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The ID of the instance (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3488,10 +3630,10 @@ def list_compatibility( :return: Returns the result object. """ # noqa: E501 - _param = self._list_compatibility_serialize( + _param = self._list_compatibilities_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3500,10 +3642,12 @@ def list_compatibility( _response_types_map: Dict[str, Optional[str]] = { "200": "ListCompatibilityResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3513,11 +3657,11 @@ def list_compatibility( ).data @validate_call - def list_compatibility_with_http_info( + def list_compatibilities_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="The ID of the STACKIT project")], - instance_id: Annotated[StrictStr, Field(description="The ID of the instance")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3532,12 +3676,12 @@ def list_compatibility_with_http_info( Returns a list of compatibility levels for creating a new database - :param project_id: The ID of the STACKIT project (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The ID of the instance (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3560,10 +3704,10 @@ def list_compatibility_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_compatibility_serialize( + _param = self._list_compatibilities_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3572,10 +3716,12 @@ def list_compatibility_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListCompatibilityResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3585,11 +3731,11 @@ def list_compatibility_with_http_info( ) @validate_call - def list_compatibility_without_preload_content( + def list_compatibilities_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="The ID of the STACKIT project")], - instance_id: Annotated[StrictStr, Field(description="The ID of the instance")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3604,12 +3750,12 @@ def list_compatibility_without_preload_content( Returns a list of compatibility levels for creating a new database - :param project_id: The ID of the STACKIT project (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The ID of the instance (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3632,10 +3778,10 @@ def list_compatibility_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_compatibility_serialize( + _param = self._list_compatibilities_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3644,19 +3790,21 @@ def list_compatibility_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListCompatibilityResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_compatibility_serialize( + def _list_compatibilities_serialize( self, project_id, - instance_id, region, + instance_id, _request_auth, _content_type, _headers, @@ -3677,10 +3825,10 @@ def _list_compatibility_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -3695,7 +3843,7 @@ def _list_compatibility_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/compatibility", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/compatibility", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3709,11 +3857,11 @@ def _list_compatibility_serialize( ) @validate_call - def list_databases( + def list_current_running_restore_jobs( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3723,17 +3871,17 @@ def list_databases( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListDatabasesResponse: - """Get list of databases + ) -> ListCurrentRunningRestoreJobs: + """List current running restore jobs - Get list of all databases in the instance + List all currently running restore jobs which are available for a specific instance - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3756,10 +3904,10 @@ def list_databases( :return: Returns the result object. """ # noqa: E501 - _param = self._list_databases_serialize( + _param = self._list_current_running_restore_jobs_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3767,11 +3915,13 @@ def list_databases( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatabasesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListCurrentRunningRestoreJobs", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3781,11 +3931,11 @@ def list_databases( ).data @validate_call - def list_databases_with_http_info( + def list_current_running_restore_jobs_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3795,17 +3945,17 @@ def list_databases_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListDatabasesResponse]: - """Get list of databases + ) -> ApiResponse[ListCurrentRunningRestoreJobs]: + """List current running restore jobs - Get list of all databases in the instance + List all currently running restore jobs which are available for a specific instance - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3828,10 +3978,10 @@ def list_databases_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_databases_serialize( + _param = self._list_current_running_restore_jobs_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3839,11 +3989,13 @@ def list_databases_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatabasesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListCurrentRunningRestoreJobs", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3853,11 +4005,11 @@ def list_databases_with_http_info( ) @validate_call - def list_databases_without_preload_content( + def list_current_running_restore_jobs_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3868,16 +4020,16 @@ def list_databases_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get list of databases + """List current running restore jobs - Get list of all databases in the instance + List all currently running restore jobs which are available for a specific instance - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3900,10 +4052,10 @@ def list_databases_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_databases_serialize( + _param = self._list_current_running_restore_jobs_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3911,20 +4063,22 @@ def list_databases_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatabasesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListCurrentRunningRestoreJobs", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_databases_serialize( + def _list_current_running_restore_jobs_serialize( self, project_id, - instance_id, region, + instance_id, _request_auth, _content_type, _headers, @@ -3945,10 +4099,10 @@ def _list_databases_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -3963,7 +4117,7 @@ def _list_databases_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/restore-jobs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3977,10 +4131,18 @@ def _list_databases_serialize( ) @validate_call - def list_flavors( + def list_databases( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[DatabaseSort], Field(description="Sorting of the databases to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3990,15 +4152,23 @@ def list_flavors( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListFlavorsResponse: - """Get Flavors + ) -> ListDatabasesResponse: + """List Databases - Get available flavors for a specific projectID + List available databases for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the databases to be returned on each page. + :type sort: DatabaseSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4021,9 +4191,13 @@ def list_flavors( :return: Returns the result object. """ # noqa: E501 - _param = self._list_flavors_serialize( + _param = self._list_databases_serialize( project_id=project_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4031,11 +4205,12 @@ def list_flavors( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListFlavorsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListDatabasesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4045,10 +4220,18 @@ def list_flavors( ).data @validate_call - def list_flavors_with_http_info( + def list_databases_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[DatabaseSort], Field(description="Sorting of the databases to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4058,15 +4241,23 @@ def list_flavors_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListFlavorsResponse]: - """Get Flavors + ) -> ApiResponse[ListDatabasesResponse]: + """List Databases - Get available flavors for a specific projectID + List available databases for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the databases to be returned on each page. + :type sort: DatabaseSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4089,9 +4280,13 @@ def list_flavors_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_flavors_serialize( + _param = self._list_databases_serialize( project_id=project_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4099,11 +4294,12 @@ def list_flavors_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListFlavorsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListDatabasesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4113,10 +4309,18 @@ def list_flavors_with_http_info( ) @validate_call - def list_flavors_without_preload_content( + def list_databases_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[DatabaseSort], Field(description="Sorting of the databases to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4127,14 +4331,22 @@ def list_flavors_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Flavors + """List Databases - Get available flavors for a specific projectID + List available databases for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the databases to be returned on each page. + :type sort: DatabaseSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4157,9 +4369,13 @@ def list_flavors_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_flavors_serialize( + _param = self._list_databases_serialize( project_id=project_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4167,19 +4383,24 @@ def list_flavors_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListFlavorsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListDatabasesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_flavors_serialize( + def _list_databases_serialize( self, project_id, region, + instance_id, + page, + size, + sort, _request_auth, _content_type, _headers, @@ -4202,7 +4423,21 @@ def _list_flavors_serialize( _path_params["projectId"] = project_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters + if page is not None: + + _query_params.append(("page", page)) + + if size is not None: + + _query_params.append(("size", size)) + + if sort is not None: + + _query_params.append(("sort", sort.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -4216,7 +4451,7 @@ def _list_flavors_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/flavors", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4230,10 +4465,17 @@ def _list_flavors_serialize( ) @validate_call - def list_instances( + def list_flavors( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[FlavorSort], Field(description="Sorting of the flavors to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4243,15 +4485,21 @@ def list_instances( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListInstancesResponse: - """List Instances + ) -> ListFlavorsResponse: + """Get Flavors - List available instances + Get all available flavors for a project. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the flavors to be returned on each page. + :type sort: FlavorSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4274,9 +4522,12 @@ def list_instances( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._list_flavors_serialize( project_id=project_id, region=region, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4284,11 +4535,13 @@ def list_instances( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListFlavorsResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4298,10 +4551,17 @@ def list_instances( ).data @validate_call - def list_instances_with_http_info( + def list_flavors_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[FlavorSort], Field(description="Sorting of the flavors to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4311,15 +4571,21 @@ def list_instances_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListInstancesResponse]: - """List Instances + ) -> ApiResponse[ListFlavorsResponse]: + """Get Flavors - List available instances + Get all available flavors for a project. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the flavors to be returned on each page. + :type sort: FlavorSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4342,9 +4608,12 @@ def list_instances_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._list_flavors_serialize( project_id=project_id, region=region, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4352,11 +4621,13 @@ def list_instances_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListFlavorsResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4366,10 +4637,17 @@ def list_instances_with_http_info( ) @validate_call - def list_instances_without_preload_content( + def list_flavors_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[FlavorSort], Field(description="Sorting of the flavors to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4380,14 +4658,20 @@ def list_instances_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Instances + """Get Flavors - List available instances + Get all available flavors for a project. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the flavors to be returned on each page. + :type sort: FlavorSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4410,9 +4694,12 @@ def list_instances_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._list_flavors_serialize( project_id=project_id, region=region, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4420,19 +4707,24 @@ def list_instances_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListFlavorsResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_instances_serialize( + def _list_flavors_serialize( self, project_id, region, + page, + size, + sort, _request_auth, _content_type, _headers, @@ -4456,6 +4748,18 @@ def _list_instances_serialize( if region is not None: _path_params["region"] = region # process the query parameters + if page is not None: + + _query_params.append(("page", page)) + + if size is not None: + + _query_params.append(("size", size)) + + if sort is not None: + + _query_params.append(("sort", sort.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -4469,7 +4773,7 @@ def _list_instances_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances", + resource_path="/v3/projects/{projectId}/regions/{region}/flavors", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4483,35 +4787,16 @@ def _list_instances_serialize( ) @validate_call - def list_metrics( + def list_instances( self, - project_id: Annotated[StrictStr, Field(description="The UUID of the project.")], - instance_id: Annotated[StrictStr, Field(description="The UUID of the instance.")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - metric: Annotated[ - StrictStr, - Field( - description="The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'." - ), - ], - granularity: Annotated[StrictStr, Field(description="The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.")], - period: Annotated[ - Optional[StrictStr], - Field( - description="The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used." - ), - ] = None, - start: Annotated[ - Optional[StrictStr], - Field( - description="The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used." - ), + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") ] = None, - end: Annotated[ - Optional[StrictStr], - Field( - description="The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'." - ), + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[InstanceSort], Field(description="Sorting of the items to be returned on each page.") ] = None, _request_timeout: Union[ None, @@ -4522,27 +4807,21 @@ def list_metrics( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListMetricsResponse: - """Get Metric + ) -> ListInstancesResponse: + """List Instances - Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in max-connections and disk-use. If you provide start time, you have to provide end time as well and vice versa. + List all available instances for your project. - :param project_id: The UUID of the project. (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The UUID of the instance. (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. (required) - :type metric: str - :param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required) - :type granularity: str - :param period: The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used. - :type period: str - :param start: The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used. - :type start: str - :param end: The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. - :type end: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the items to be returned on each page. + :type sort: InstanceSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4565,15 +4844,12 @@ def list_metrics( :return: Returns the result object. """ # noqa: E501 - _param = self._list_metrics_serialize( + _param = self._list_instances_serialize( project_id=project_id, - instance_id=instance_id, region=region, - metric=metric, - granularity=granularity, - period=period, - start=start, - end=end, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4581,10 +4857,12 @@ def list_metrics( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListMetricsResponse", - "400": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "200": "ListInstancesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4594,35 +4872,16 @@ def list_metrics( ).data @validate_call - def list_metrics_with_http_info( + def list_instances_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="The UUID of the project.")], - instance_id: Annotated[StrictStr, Field(description="The UUID of the instance.")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - metric: Annotated[ - StrictStr, - Field( - description="The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'." - ), - ], - granularity: Annotated[StrictStr, Field(description="The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.")], - period: Annotated[ - Optional[StrictStr], - Field( - description="The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used." - ), + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") ] = None, - start: Annotated[ - Optional[StrictStr], - Field( - description="The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used." - ), - ] = None, - end: Annotated[ - Optional[StrictStr], - Field( - description="The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'." - ), + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[InstanceSort], Field(description="Sorting of the items to be returned on each page.") ] = None, _request_timeout: Union[ None, @@ -4633,27 +4892,21 @@ def list_metrics_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListMetricsResponse]: - """Get Metric + ) -> ApiResponse[ListInstancesResponse]: + """List Instances - Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in max-connections and disk-use. If you provide start time, you have to provide end time as well and vice versa. + List all available instances for your project. - :param project_id: The UUID of the project. (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The UUID of the instance. (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. (required) - :type metric: str - :param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required) - :type granularity: str - :param period: The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used. - :type period: str - :param start: The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used. - :type start: str - :param end: The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. - :type end: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the items to be returned on each page. + :type sort: InstanceSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4676,15 +4929,12 @@ def list_metrics_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_metrics_serialize( + _param = self._list_instances_serialize( project_id=project_id, - instance_id=instance_id, region=region, - metric=metric, - granularity=granularity, - period=period, - start=start, - end=end, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4692,10 +4942,12 @@ def list_metrics_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListMetricsResponse", - "400": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "200": "ListInstancesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4705,35 +4957,16 @@ def list_metrics_with_http_info( ) @validate_call - def list_metrics_without_preload_content( + def list_instances_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="The UUID of the project.")], - instance_id: Annotated[StrictStr, Field(description="The UUID of the instance.")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - metric: Annotated[ - StrictStr, - Field( - description="The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'." - ), - ], - granularity: Annotated[StrictStr, Field(description="The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.")], - period: Annotated[ - Optional[StrictStr], - Field( - description="The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used." - ), - ] = None, - start: Annotated[ - Optional[StrictStr], - Field( - description="The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used." - ), + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") ] = None, - end: Annotated[ - Optional[StrictStr], - Field( - description="The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'." - ), + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[InstanceSort], Field(description="Sorting of the items to be returned on each page.") ] = None, _request_timeout: Union[ None, @@ -4745,26 +4978,20 @@ def list_metrics_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Metric + """List Instances - Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in max-connections and disk-use. If you provide start time, you have to provide end time as well and vice versa. + List all available instances for your project. - :param project_id: The UUID of the project. (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: The UUID of the instance. (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. (required) - :type metric: str - :param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required) - :type granularity: str - :param period: The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used. - :type period: str - :param start: The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used. - :type start: str - :param end: The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. - :type end: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the items to be returned on each page. + :type sort: InstanceSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4787,15 +5014,12 @@ def list_metrics_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_metrics_serialize( + _param = self._list_instances_serialize( project_id=project_id, - instance_id=instance_id, region=region, - metric=metric, - granularity=granularity, - period=period, - start=start, - end=end, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4803,24 +5027,23 @@ def list_metrics_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListMetricsResponse", - "400": "InstanceError", - "405": "InstanceError", - "500": "InstanceError", + "200": "ListInstancesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_metrics_serialize( + def _list_instances_serialize( self, project_id, - instance_id, region, - metric, - granularity, - period, - start, - end, + page, + size, + sort, _request_auth, _content_type, _headers, @@ -4841,28 +5064,20 @@ def _list_metrics_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region - if metric is not None: - _path_params["metric"] = metric # process the query parameters - if granularity is not None: - - _query_params.append(("granularity", granularity)) + if page is not None: - if period is not None: + _query_params.append(("page", page)) - _query_params.append(("period", period)) + if size is not None: - if start is not None: + _query_params.append(("size", size)) - _query_params.append(("start", start)) + if sort is not None: - if end is not None: - - _query_params.append(("end", end)) + _query_params.append(("sort", sort.value)) # process the header parameters # process the form parameters @@ -4877,7 +5092,7 @@ def _list_metrics_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4891,11 +5106,11 @@ def _list_metrics_serialize( ) @validate_call - def list_restore_jobs( + def list_roles( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4905,17 +5120,17 @@ def list_restore_jobs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListRestoreJobsResponse: - """List current running restore jobs + ) -> ListRolesResponse: + """List Roles - List all currently running restore jobs which are available for a specific instance + List available roles for an instance that can be assigned to a user - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4938,10 +5153,10 @@ def list_restore_jobs( :return: Returns the result object. """ # noqa: E501 - _param = self._list_restore_jobs_serialize( + _param = self._list_roles_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4949,11 +5164,13 @@ def list_restore_jobs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRestoreJobsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListRolesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4963,11 +5180,11 @@ def list_restore_jobs( ).data @validate_call - def list_restore_jobs_with_http_info( + def list_roles_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4977,17 +5194,17 @@ def list_restore_jobs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListRestoreJobsResponse]: - """List current running restore jobs + ) -> ApiResponse[ListRolesResponse]: + """List Roles - List all currently running restore jobs which are available for a specific instance + List available roles for an instance that can be assigned to a user - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5010,10 +5227,10 @@ def list_restore_jobs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_restore_jobs_serialize( + _param = self._list_roles_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5021,11 +5238,13 @@ def list_restore_jobs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRestoreJobsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListRolesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5035,11 +5254,11 @@ def list_restore_jobs_with_http_info( ) @validate_call - def list_restore_jobs_without_preload_content( + def list_roles_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5050,16 +5269,16 @@ def list_restore_jobs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List current running restore jobs + """List Roles - List all currently running restore jobs which are available for a specific instance + List available roles for an instance that can be assigned to a user - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5082,10 +5301,10 @@ def list_restore_jobs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_restore_jobs_serialize( + _param = self._list_roles_serialize( project_id=project_id, - instance_id=instance_id, region=region, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5093,20 +5312,22 @@ def list_restore_jobs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRestoreJobsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListRolesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_restore_jobs_serialize( + def _list_roles_serialize( self, project_id, - instance_id, region, + instance_id, _request_auth, _content_type, _headers, @@ -5127,10 +5348,10 @@ def _list_restore_jobs_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters @@ -5145,7 +5366,7 @@ def _list_restore_jobs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/roles", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5159,11 +5380,11 @@ def _list_restore_jobs_serialize( ) @validate_call - def list_roles( + def list_storages( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + flavor_id: Annotated[StrictStr, Field(description="The id of an instance flavor.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5173,17 +5394,17 @@ def list_roles( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListRolesResponse: - """List Roles + ) -> ListStoragesResponse: + """Get Storages - List available roles for an instance that can be assigned to a user + Get available storages for a specific flavor - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param flavor_id: The id of an instance flavor. (required) + :type flavor_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5206,10 +5427,10 @@ def list_roles( :return: Returns the result object. """ # noqa: E501 - _param = self._list_roles_serialize( + _param = self._list_storages_serialize( project_id=project_id, - instance_id=instance_id, region=region, + flavor_id=flavor_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5217,11 +5438,12 @@ def list_roles( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRolesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListStoragesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5231,11 +5453,11 @@ def list_roles( ).data @validate_call - def list_roles_with_http_info( + def list_storages_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + flavor_id: Annotated[StrictStr, Field(description="The id of an instance flavor.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5245,17 +5467,17 @@ def list_roles_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListRolesResponse]: - """List Roles + ) -> ApiResponse[ListStoragesResponse]: + """Get Storages - List available roles for an instance that can be assigned to a user + Get available storages for a specific flavor - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param flavor_id: The id of an instance flavor. (required) + :type flavor_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5278,10 +5500,10 @@ def list_roles_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_roles_serialize( + _param = self._list_storages_serialize( project_id=project_id, - instance_id=instance_id, region=region, + flavor_id=flavor_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5289,11 +5511,12 @@ def list_roles_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRolesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListStoragesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5303,11 +5526,11 @@ def list_roles_with_http_info( ) @validate_call - def list_roles_without_preload_content( + def list_storages_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + flavor_id: Annotated[StrictStr, Field(description="The id of an instance flavor.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5318,16 +5541,16 @@ def list_roles_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Roles + """Get Storages - List available roles for an instance that can be assigned to a user + Get available storages for a specific flavor - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str + :param flavor_id: The id of an instance flavor. (required) + :type flavor_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5350,10 +5573,10 @@ def list_roles_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_roles_serialize( + _param = self._list_storages_serialize( project_id=project_id, - instance_id=instance_id, region=region, + flavor_id=flavor_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5361,20 +5584,21 @@ def list_roles_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRolesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListStoragesResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_roles_serialize( + def _list_storages_serialize( self, project_id, - instance_id, region, + flavor_id, _request_auth, _content_type, _headers, @@ -5395,10 +5619,10 @@ def _list_roles_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if flavor_id is not None: + _path_params["flavorId"] = flavor_id # process the query parameters # process the header parameters # process the form parameters @@ -5413,7 +5637,7 @@ def _list_roles_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/roles", + resource_path="/v3/projects/{projectId}/regions/{region}/storages/{flavorId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5427,11 +5651,18 @@ def _list_roles_serialize( ) @validate_call - def list_storages( + def list_users( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - flavor_id: Annotated[StrictStr, Field(description="Flavor ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[UserSort], Field(description="Sorting of the users to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5441,17 +5672,23 @@ def list_storages( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListStoragesResponse: - """Get Storages + ) -> ListUserResponse: + """List Users - Get available storages for a specific flavor + List available users for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param flavor_id: Flavor ID (required) - :type flavor_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the users to be returned on each page. + :type sort: UserSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5474,10 +5711,13 @@ def list_storages( :return: Returns the result object. """ # noqa: E501 - _param = self._list_storages_serialize( + _param = self._list_users_serialize( project_id=project_id, - flavor_id=flavor_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5485,11 +5725,12 @@ def list_storages( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListStoragesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5499,11 +5740,18 @@ def list_storages( ).data @validate_call - def list_storages_with_http_info( + def list_users_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - flavor_id: Annotated[StrictStr, Field(description="Flavor ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[UserSort], Field(description="Sorting of the users to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5513,17 +5761,23 @@ def list_storages_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListStoragesResponse]: - """Get Storages + ) -> ApiResponse[ListUserResponse]: + """List Users - Get available storages for a specific flavor + List available users for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param flavor_id: Flavor ID (required) - :type flavor_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the users to be returned on each page. + :type sort: UserSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5546,10 +5800,13 @@ def list_storages_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_storages_serialize( + _param = self._list_users_serialize( project_id=project_id, - flavor_id=flavor_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5557,11 +5814,12 @@ def list_storages_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListStoragesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5571,11 +5829,18 @@ def list_storages_with_http_info( ) @validate_call - def list_storages_without_preload_content( + def list_users_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - flavor_id: Annotated[StrictStr, Field(description="Flavor ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + page: Annotated[ + Optional[StrictInt], Field(description="Number of the page of items list to be returned.") + ] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of items to be returned on each page.")] = None, + sort: Annotated[ + Optional[UserSort], Field(description="Sorting of the users to be returned on each page.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5586,16 +5851,22 @@ def list_storages_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Storages + """List Users - Get available storages for a specific flavor + List available users for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param flavor_id: Flavor ID (required) - :type flavor_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param page: Number of the page of items list to be returned. + :type page: int + :param size: Number of items to be returned on each page. + :type size: int + :param sort: Sorting of the users to be returned on each page. + :type sort: UserSort :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5618,10 +5889,13 @@ def list_storages_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_storages_serialize( + _param = self._list_users_serialize( project_id=project_id, - flavor_id=flavor_id, region=region, + instance_id=instance_id, + page=page, + size=size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5629,20 +5903,24 @@ def list_storages_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListStoragesResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_storages_serialize( + def _list_users_serialize( self, project_id, - flavor_id, region, + instance_id, + page, + size, + sort, _request_auth, _content_type, _headers, @@ -5663,11 +5941,23 @@ def _list_storages_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if flavor_id is not None: - _path_params["flavorId"] = flavor_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters + if page is not None: + + _query_params.append(("page", page)) + + if size is not None: + + _query_params.append(("size", size)) + + if sort is not None: + + _query_params.append(("sort", sort.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -5681,7 +5971,7 @@ def _list_storages_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/storages/{flavorId}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5695,10 +5985,9 @@ def _list_storages_serialize( ) @validate_call - def list_users( + def list_versions( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, @@ -5709,15 +5998,13 @@ def list_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListUsersResponse: - """List Users + ) -> ListVersionsResponse: + """Get Versions - List available users for an instance + Get the sqlserver available versions for the project. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str :param _request_timeout: timeout setting for this request. If one @@ -5742,9 +6029,8 @@ def list_users( :return: Returns the result object. """ # noqa: E501 - _param = self._list_users_serialize( + _param = self._list_versions_serialize( project_id=project_id, - instance_id=instance_id, region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -5753,11 +6039,13 @@ def list_users( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsersResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListVersionsResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5767,10 +6055,9 @@ def list_users( ).data @validate_call - def list_users_with_http_info( + def list_versions_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, @@ -5781,15 +6068,13 @@ def list_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListUsersResponse]: - """List Users + ) -> ApiResponse[ListVersionsResponse]: + """Get Versions - List available users for an instance + Get the sqlserver available versions for the project. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str :param _request_timeout: timeout setting for this request. If one @@ -5814,9 +6099,8 @@ def list_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_users_serialize( + _param = self._list_versions_serialize( project_id=project_id, - instance_id=instance_id, region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -5825,11 +6109,13 @@ def list_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsersResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListVersionsResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5839,10 +6125,9 @@ def list_users_with_http_info( ) @validate_call - def list_users_without_preload_content( + def list_versions_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, @@ -5854,14 +6139,12 @@ def list_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Users + """Get Versions - List available users for an instance + Get the sqlserver available versions for the project. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str :param _request_timeout: timeout setting for this request. If one @@ -5886,9 +6169,8 @@ def list_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_users_serialize( + _param = self._list_versions_serialize( project_id=project_id, - instance_id=instance_id, region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -5897,19 +6179,20 @@ def list_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsersResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "ListVersionsResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_users_serialize( + def _list_versions_serialize( self, project_id, - instance_id, region, _request_auth, _content_type, @@ -5931,8 +6214,6 @@ def _list_users_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region # process the query parameters @@ -5949,7 +6230,7 @@ def _list_users_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users", + resource_path="/v3/projects/{projectId}/regions/{region}/versions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5963,11 +6244,15 @@ def _list_users_serialize( ) @validate_call - def list_versions( + def partial_update_instance( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - instance_id: Annotated[Optional[StrictStr], Field(description="Instance ID")] = None, + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + partial_update_instance_payload: Annotated[ + PartialUpdateInstancePayload, + Field(description="The request body with the parameters for updating the instance."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5977,17 +6262,19 @@ def list_versions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListVersionsResponse: - """Get Versions + ) -> None: + """Update Instance Partially - Get available versions for mssql database + Update an available instance of a mssql database. No fields are required. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str - :param instance_id: Instance ID + :param instance_id: The ID of the instance. (required) :type instance_id: str + :param partial_update_instance_payload: The request body with the parameters for updating the instance. (required) + :type partial_update_instance_payload: PartialUpdateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6010,10 +6297,11 @@ def list_versions( :return: Returns the result object. """ # noqa: E501 - _param = self._list_versions_serialize( + _param = self._partial_update_instance_serialize( project_id=project_id, region=region, instance_id=instance_id, + partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6021,11 +6309,13 @@ def list_versions( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListVersionsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6035,11 +6325,15 @@ def list_versions( ).data @validate_call - def list_versions_with_http_info( + def partial_update_instance_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - instance_id: Annotated[Optional[StrictStr], Field(description="Instance ID")] = None, + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + partial_update_instance_payload: Annotated[ + PartialUpdateInstancePayload, + Field(description="The request body with the parameters for updating the instance."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6049,17 +6343,19 @@ def list_versions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListVersionsResponse]: - """Get Versions + ) -> ApiResponse[None]: + """Update Instance Partially - Get available versions for mssql database + Update an available instance of a mssql database. No fields are required. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str - :param instance_id: Instance ID + :param instance_id: The ID of the instance. (required) :type instance_id: str + :param partial_update_instance_payload: The request body with the parameters for updating the instance. (required) + :type partial_update_instance_payload: PartialUpdateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6082,10 +6378,11 @@ def list_versions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_versions_serialize( + _param = self._partial_update_instance_serialize( project_id=project_id, region=region, instance_id=instance_id, + partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6093,11 +6390,13 @@ def list_versions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListVersionsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6107,11 +6406,15 @@ def list_versions_with_http_info( ) @validate_call - def list_versions_without_preload_content( + def partial_update_instance_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - instance_id: Annotated[Optional[StrictStr], Field(description="Instance ID")] = None, + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + partial_update_instance_payload: Annotated[ + PartialUpdateInstancePayload, + Field(description="The request body with the parameters for updating the instance."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6122,16 +6425,18 @@ def list_versions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Versions + """Update Instance Partially - Get available versions for mssql database + Update an available instance of a mssql database. No fields are required. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str - :param instance_id: Instance ID + :param instance_id: The ID of the instance. (required) :type instance_id: str + :param partial_update_instance_payload: The request body with the parameters for updating the instance. (required) + :type partial_update_instance_payload: PartialUpdateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6154,10 +6459,11 @@ def list_versions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_versions_serialize( + _param = self._partial_update_instance_serialize( project_id=project_id, region=region, instance_id=instance_id, + partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6165,20 +6471,23 @@ def list_versions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListVersionsResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_versions_serialize( + def _partial_update_instance_serialize( self, project_id, region, instance_id, + partial_update_instance_payload, _request_auth, _content_type, _headers, @@ -6201,25 +6510,33 @@ def _list_versions_serialize( _path_params["projectId"] = project_id if region is not None: _path_params["region"] = region - # process the query parameters if instance_id is not None: - - _query_params.append(("instanceId", instance_id)) - + _path_params["instanceId"] = instance_id + # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if partial_update_instance_payload is not None: + _body_params = partial_update_instance_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v2/projects/{projectId}/regions/{region}/versions", + method="PATCH", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6233,12 +6550,12 @@ def _list_versions_serialize( ) @validate_call - def partial_update_instance( + def reset_user( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - partial_update_instance_payload: Annotated[PartialUpdateInstancePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6248,19 +6565,19 @@ def partial_update_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UpdateInstanceResponse: - """Update Instance + ) -> ResetUserResponse: + """Reset User - Update available instance of a mssql database. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + Reset an user from an specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param partial_update_instance_payload: Body (required) - :type partial_update_instance_payload: PartialUpdateInstancePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6283,11 +6600,11 @@ def partial_update_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_instance_serialize( + _param = self._reset_user_serialize( project_id=project_id, - instance_id=instance_id, region=region, - partial_update_instance_payload=partial_update_instance_payload, + instance_id=instance_id, + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6295,11 +6612,13 @@ def partial_update_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "ResetUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6309,12 +6628,12 @@ def partial_update_instance( ).data @validate_call - def partial_update_instance_with_http_info( + def reset_user_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - partial_update_instance_payload: Annotated[PartialUpdateInstancePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6324,19 +6643,19 @@ def partial_update_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UpdateInstanceResponse]: - """Update Instance + ) -> ApiResponse[ResetUserResponse]: + """Reset User - Update available instance of a mssql database. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + Reset an user from an specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param partial_update_instance_payload: Body (required) - :type partial_update_instance_payload: PartialUpdateInstancePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6359,11 +6678,11 @@ def partial_update_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_instance_serialize( + _param = self._reset_user_serialize( project_id=project_id, - instance_id=instance_id, region=region, - partial_update_instance_payload=partial_update_instance_payload, + instance_id=instance_id, + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6371,11 +6690,13 @@ def partial_update_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "ResetUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6385,12 +6706,12 @@ def partial_update_instance_with_http_info( ) @validate_call - def partial_update_instance_without_preload_content( + def reset_user_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - partial_update_instance_payload: Annotated[PartialUpdateInstancePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + user_id: Annotated[StrictInt, Field(description="The ID of the user.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6401,18 +6722,18 @@ def partial_update_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Instance + """Reset User - Update available instance of a mssql database. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + Reset an user from an specific instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param partial_update_instance_payload: Body (required) - :type partial_update_instance_payload: PartialUpdateInstancePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param user_id: The ID of the user. (required) + :type user_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6435,11 +6756,11 @@ def partial_update_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_instance_serialize( + _param = self._reset_user_serialize( project_id=project_id, - instance_id=instance_id, region=region, - partial_update_instance_payload=partial_update_instance_payload, + instance_id=instance_id, + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6447,21 +6768,23 @@ def partial_update_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "202": "ResetUserResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _partial_update_instance_serialize( + def _reset_user_serialize( self, project_id, - instance_id, region, - partial_update_instance_payload, + instance_id, + user_id, _request_auth, _content_type, _headers, @@ -6482,35 +6805,27 @@ def _partial_update_instance_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id + if user_id is not None: + _path_params["userId"] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if partial_update_instance_payload is not None: - _body_params = partial_update_instance_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", + method="POST", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6524,12 +6839,14 @@ def _partial_update_instance_serialize( ) @validate_call - def reset_user( + def restore_database_from_backup( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="user ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + restore_database_from_backup_payload: Annotated[ + RestoreDatabaseFromBackupPayload, Field(description="The restore operation payload.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6539,19 +6856,19 @@ def reset_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResetUserResponse: - """Reset User + ) -> None: + """Create a Restore Operation - Reset user password for a mssql instance + Triggers a new restore operation for the specified instance. The request body defines the source (e.g., internal backup, external S3) and the target database. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: user ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param restore_database_from_backup_payload: The restore operation payload. (required) + :type restore_database_from_backup_payload: RestoreDatabaseFromBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6574,11 +6891,11 @@ def reset_user( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_user_serialize( + _param = self._restore_database_from_backup_serialize( project_id=project_id, - instance_id=instance_id, - user_id=user_id, region=region, + instance_id=instance_id, + restore_database_from_backup_payload=restore_database_from_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6586,12 +6903,13 @@ def reset_user( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResetUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6601,12 +6919,14 @@ def reset_user( ).data @validate_call - def reset_user_with_http_info( + def restore_database_from_backup_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="user ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + restore_database_from_backup_payload: Annotated[ + RestoreDatabaseFromBackupPayload, Field(description="The restore operation payload.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6616,19 +6936,19 @@ def reset_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResetUserResponse]: - """Reset User + ) -> ApiResponse[None]: + """Create a Restore Operation - Reset user password for a mssql instance + Triggers a new restore operation for the specified instance. The request body defines the source (e.g., internal backup, external S3) and the target database. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: user ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param restore_database_from_backup_payload: The restore operation payload. (required) + :type restore_database_from_backup_payload: RestoreDatabaseFromBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6651,11 +6971,11 @@ def reset_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_user_serialize( + _param = self._restore_database_from_backup_serialize( project_id=project_id, - instance_id=instance_id, - user_id=user_id, region=region, + instance_id=instance_id, + restore_database_from_backup_payload=restore_database_from_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6663,12 +6983,13 @@ def reset_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResetUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6678,12 +6999,14 @@ def reset_user_with_http_info( ) @validate_call - def reset_user_without_preload_content( + def restore_database_from_backup_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - user_id: Annotated[StrictStr, Field(description="user ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + restore_database_from_backup_payload: Annotated[ + RestoreDatabaseFromBackupPayload, Field(description="The restore operation payload.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6694,18 +7017,18 @@ def reset_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reset User + """Create a Restore Operation - Reset user password for a mssql instance + Triggers a new restore operation for the specified instance. The request body defines the source (e.g., internal backup, external S3) and the target database. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param user_id: user ID (required) - :type user_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param restore_database_from_backup_payload: The restore operation payload. (required) + :type restore_database_from_backup_payload: RestoreDatabaseFromBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6728,11 +7051,11 @@ def reset_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_user_serialize( + _param = self._restore_database_from_backup_serialize( project_id=project_id, - instance_id=instance_id, - user_id=user_id, region=region, + instance_id=instance_id, + restore_database_from_backup_payload=restore_database_from_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6740,22 +7063,23 @@ def reset_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResetUserResponse", - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _reset_user_serialize( + def _restore_database_from_backup_serialize( self, project_id, - instance_id, - user_id, region, + instance_id, + restore_database_from_backup_payload, _request_auth, _content_type, _headers, @@ -6776,27 +7100,35 @@ def _reset_user_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id - if user_id is not None: - _path_params["userId"] = user_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if restore_database_from_backup_payload is not None: + _body_params = restore_database_from_backup_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( method="POST", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/restores", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6810,10 +7142,12 @@ def _reset_user_serialize( ) @validate_call - def terminate_project( + def trigger_backup( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6824,14 +7158,18 @@ def terminate_project( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Terminate the Project + """Trigger backup for a specific Database - Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource + Trigger backup for a specific database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6854,9 +7192,11 @@ def terminate_project( :return: Returns the result object. """ # noqa: E501 - _param = self._terminate_project_serialize( + _param = self._trigger_backup_serialize( project_id=project_id, region=region, + instance_id=instance_id, + database_name=database_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6865,10 +7205,13 @@ def terminate_project( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6878,10 +7221,12 @@ def terminate_project( ).data @validate_call - def terminate_project_with_http_info( + def trigger_backup_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6892,14 +7237,18 @@ def terminate_project_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Terminate the Project + """Trigger backup for a specific Database - Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource + Trigger backup for a specific database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6922,9 +7271,11 @@ def terminate_project_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._terminate_project_serialize( + _param = self._trigger_backup_serialize( project_id=project_id, region=region, + instance_id=instance_id, + database_name=database_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6933,10 +7284,13 @@ def terminate_project_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6946,10 +7300,12 @@ def terminate_project_with_http_info( ) @validate_call - def terminate_project_without_preload_content( + def trigger_backup_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6960,14 +7316,18 @@ def terminate_project_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Terminate the Project + """Trigger backup for a specific Database - Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource + Trigger backup for a specific database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6990,9 +7350,11 @@ def terminate_project_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._terminate_project_serialize( + _param = self._trigger_backup_serialize( project_id=project_id, region=region, + instance_id=instance_id, + database_name=database_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7001,18 +7363,23 @@ def terminate_project_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _terminate_project_serialize( + def _trigger_backup_serialize( self, project_id, region, + instance_id, + database_name, _request_auth, _content_type, _headers, @@ -7035,6 +7402,10 @@ def _terminate_project_serialize( _path_params["projectId"] = project_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id + if database_name is not None: + _path_params["databaseName"] = database_name # process the query parameters # process the header parameters # process the form parameters @@ -7048,8 +7419,8 @@ def _terminate_project_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v2/projects/{projectId}/regions/{region}", + method="POST", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7063,12 +7434,16 @@ def _terminate_project_serialize( ) @validate_call - def trigger_database_backup( + def trigger_restore( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], + trigger_restore_payload: Annotated[ + Optional[TriggerRestorePayload], + Field(description="The request body with the parameters for the database restore."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7079,18 +7454,20 @@ def trigger_database_backup( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Trigger backup for a specific Database + """Trigger restore for a specific Database - Trigger backup for a specific Database + Trigger restore for a specific Database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str + :param trigger_restore_payload: The request body with the parameters for the database restore. + :type trigger_restore_payload: TriggerRestorePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7113,11 +7490,12 @@ def trigger_database_backup( :return: Returns the result object. """ # noqa: E501 - _param = self._trigger_database_backup_serialize( + _param = self._trigger_restore_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, + trigger_restore_payload=trigger_restore_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7126,11 +7504,13 @@ def trigger_database_backup( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7140,12 +7520,16 @@ def trigger_database_backup( ).data @validate_call - def trigger_database_backup_with_http_info( + def trigger_restore_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], + trigger_restore_payload: Annotated[ + Optional[TriggerRestorePayload], + Field(description="The request body with the parameters for the database restore."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7156,18 +7540,20 @@ def trigger_database_backup_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Trigger backup for a specific Database + """Trigger restore for a specific Database - Trigger backup for a specific Database + Trigger restore for a specific Database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str + :param trigger_restore_payload: The request body with the parameters for the database restore. + :type trigger_restore_payload: TriggerRestorePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7190,11 +7576,12 @@ def trigger_database_backup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._trigger_database_backup_serialize( + _param = self._trigger_restore_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, + trigger_restore_payload=trigger_restore_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7203,11 +7590,13 @@ def trigger_database_backup_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7217,12 +7606,16 @@ def trigger_database_backup_with_http_info( ) @validate_call - def trigger_database_backup_without_preload_content( + def trigger_restore_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + database_name: Annotated[StrictStr, Field(description="The name of the database.")], + trigger_restore_payload: Annotated[ + Optional[TriggerRestorePayload], + Field(description="The request body with the parameters for the database restore."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7233,18 +7626,20 @@ def trigger_database_backup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Trigger backup for a specific Database + """Trigger restore for a specific Database - Trigger backup for a specific Database + Trigger restore for a specific Database - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param database_name: The name of the database. (required) + :type database_name: str + :param trigger_restore_payload: The request body with the parameters for the database restore. + :type trigger_restore_payload: TriggerRestorePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7267,11 +7662,12 @@ def trigger_database_backup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._trigger_database_backup_serialize( + _param = self._trigger_restore_serialize( project_id=project_id, + region=region, instance_id=instance_id, database_name=database_name, - region=region, + trigger_restore_payload=trigger_restore_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7280,21 +7676,24 @@ def trigger_database_backup_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _trigger_database_backup_serialize( + def _trigger_restore_serialize( self, project_id, + region, instance_id, database_name, - region, + trigger_restore_payload, _request_auth, _content_type, _headers, @@ -7315,27 +7714,37 @@ def _trigger_database_backup_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if instance_id is not None: _path_params["instanceId"] = instance_id if database_name is not None: _path_params["databaseName"] = database_name - if region is not None: - _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if trigger_restore_payload is not None: + _body_params = trigger_restore_payload # set the HTTP header `Accept` if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*", "application/json"]) + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( method="POST", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}/restores", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7349,13 +7758,14 @@ def _trigger_database_backup_serialize( ) @validate_call - def trigger_database_restore( + def update_instance( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - trigger_database_restore_payload: Annotated[TriggerDatabaseRestorePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + update_instance_payload: Annotated[ + UpdateInstancePayload, Field(description="The request body with the parameters for updating the instance") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7366,20 +7776,18 @@ def trigger_database_restore( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Trigger restore for a specific Database + """Update Instance - Trigger restore for a specific Database + Updates an available instance of a sqlserver database **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str - :param trigger_database_restore_payload: Body (required) - :type trigger_database_restore_payload: TriggerDatabaseRestorePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param update_instance_payload: The request body with the parameters for updating the instance (required) + :type update_instance_payload: UpdateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7402,12 +7810,11 @@ def trigger_database_restore( :return: Returns the result object. """ # noqa: E501 - _param = self._trigger_database_restore_serialize( + _param = self._update_instance_serialize( project_id=project_id, - instance_id=instance_id, - database_name=database_name, region=region, - trigger_database_restore_payload=trigger_database_restore_payload, + instance_id=instance_id, + update_instance_payload=update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7416,11 +7823,12 @@ def trigger_database_restore( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7430,13 +7838,14 @@ def trigger_database_restore( ).data @validate_call - def trigger_database_restore_with_http_info( + def update_instance_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - trigger_database_restore_payload: Annotated[TriggerDatabaseRestorePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + update_instance_payload: Annotated[ + UpdateInstancePayload, Field(description="The request body with the parameters for updating the instance") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7447,20 +7856,18 @@ def trigger_database_restore_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Trigger restore for a specific Database + """Update Instance - Trigger restore for a specific Database + Updates an available instance of a sqlserver database **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str - :param trigger_database_restore_payload: Body (required) - :type trigger_database_restore_payload: TriggerDatabaseRestorePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param update_instance_payload: The request body with the parameters for updating the instance (required) + :type update_instance_payload: UpdateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7483,12 +7890,11 @@ def trigger_database_restore_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._trigger_database_restore_serialize( + _param = self._update_instance_serialize( project_id=project_id, - instance_id=instance_id, - database_name=database_name, region=region, - trigger_database_restore_payload=trigger_database_restore_payload, + instance_id=instance_id, + update_instance_payload=update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7497,11 +7903,12 @@ def trigger_database_restore_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7511,13 +7918,14 @@ def trigger_database_restore_with_http_info( ) @validate_call - def trigger_database_restore_without_preload_content( + def update_instance_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], - database_name: Annotated[StrictStr, Field(description="Database Name")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - trigger_database_restore_payload: Annotated[TriggerDatabaseRestorePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + update_instance_payload: Annotated[ + UpdateInstancePayload, Field(description="The request body with the parameters for updating the instance") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7528,20 +7936,18 @@ def trigger_database_restore_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Trigger restore for a specific Database + """Update Instance - Trigger restore for a specific Database + Updates an available instance of a sqlserver database **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str - :param database_name: Database Name (required) - :type database_name: str :param region: The region which should be addressed (required) :type region: str - :param trigger_database_restore_payload: Body (required) - :type trigger_database_restore_payload: TriggerDatabaseRestorePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param update_instance_payload: The request body with the parameters for updating the instance (required) + :type update_instance_payload: UpdateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7564,12 +7970,11 @@ def trigger_database_restore_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._trigger_database_restore_serialize( + _param = self._update_instance_serialize( project_id=project_id, - instance_id=instance_id, - database_name=database_name, region=region, - trigger_database_restore_payload=trigger_database_restore_payload, + instance_id=instance_id, + update_instance_payload=update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7578,22 +7983,22 @@ def trigger_database_restore_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": None, - "400": "InstanceError", - "401": "InstanceError", - "404": "InstanceError", - "405": None, - "500": "InstanceError", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _trigger_database_restore_serialize( + def _update_instance_serialize( self, project_id, - instance_id, - database_name, region, - trigger_database_restore_payload, + instance_id, + update_instance_payload, _request_auth, _content_type, _headers, @@ -7614,22 +8019,20 @@ def _trigger_database_restore_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id - if database_name is not None: - _path_params["databaseName"] = database_name if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if trigger_database_restore_payload is not None: - _body_params = trigger_database_restore_payload + if update_instance_payload is not None: + _body_params = update_instance_payload # set the HTTP header `Accept` if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*", "application/json"]) + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: @@ -7643,8 +8046,8 @@ def _trigger_database_restore_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}/restores", + method="PUT", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7658,12 +8061,15 @@ def _trigger_database_restore_serialize( ) @validate_call - def update_instance( + def update_instance_protection( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - update_instance_payload: Annotated[UpdateInstancePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + update_instance_protection_payload: Annotated[ + UpdateInstanceProtectionPayload, + Field(description="The request body with flag isDeletable. Parameter is required."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7673,19 +8079,19 @@ def update_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UpdateInstanceResponse: - """Update Instance + ) -> UpdateInstanceProtectionResponse: + """Protect Instance - Update available instance of a mssql database. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + Toggle the deletion protection for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param update_instance_payload: Body (required) - :type update_instance_payload: UpdateInstancePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param update_instance_protection_payload: The request body with flag isDeletable. Parameter is required. (required) + :type update_instance_protection_payload: UpdateInstanceProtectionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7708,11 +8114,11 @@ def update_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._update_instance_serialize( + _param = self._update_instance_protection_serialize( project_id=project_id, - instance_id=instance_id, region=region, - update_instance_payload=update_instance_payload, + instance_id=instance_id, + update_instance_protection_payload=update_instance_protection_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7720,11 +8126,14 @@ def update_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "UpdateInstanceProtectionResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7734,12 +8143,15 @@ def update_instance( ).data @validate_call - def update_instance_with_http_info( + def update_instance_protection_with_http_info( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - update_instance_payload: Annotated[UpdateInstancePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + update_instance_protection_payload: Annotated[ + UpdateInstanceProtectionPayload, + Field(description="The request body with flag isDeletable. Parameter is required."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7749,19 +8161,19 @@ def update_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UpdateInstanceResponse]: - """Update Instance + ) -> ApiResponse[UpdateInstanceProtectionResponse]: + """Protect Instance - Update available instance of a mssql database. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + Toggle the deletion protection for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param update_instance_payload: Body (required) - :type update_instance_payload: UpdateInstancePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param update_instance_protection_payload: The request body with flag isDeletable. Parameter is required. (required) + :type update_instance_protection_payload: UpdateInstanceProtectionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7784,11 +8196,11 @@ def update_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_instance_serialize( + _param = self._update_instance_protection_serialize( project_id=project_id, - instance_id=instance_id, region=region, - update_instance_payload=update_instance_payload, + instance_id=instance_id, + update_instance_protection_payload=update_instance_protection_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7796,11 +8208,14 @@ def update_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "UpdateInstanceProtectionResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7810,12 +8225,15 @@ def update_instance_with_http_info( ) @validate_call - def update_instance_without_preload_content( + def update_instance_protection_without_preload_content( self, - project_id: Annotated[StrictStr, Field(description="Project ID")], - instance_id: Annotated[StrictStr, Field(description="Instance ID")], + project_id: Annotated[StrictStr, Field(description="The STACKIT project ID.")], region: Annotated[StrictStr, Field(description="The region which should be addressed")], - update_instance_payload: Annotated[UpdateInstancePayload, Field(description="Body")], + instance_id: Annotated[StrictStr, Field(description="The ID of the instance.")], + update_instance_protection_payload: Annotated[ + UpdateInstanceProtectionPayload, + Field(description="The request body with flag isDeletable. Parameter is required."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7826,18 +8244,18 @@ def update_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Instance + """Protect Instance - Update available instance of a mssql database. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + Toggle the deletion protection for an instance. - :param project_id: Project ID (required) + :param project_id: The STACKIT project ID. (required) :type project_id: str - :param instance_id: Instance ID (required) - :type instance_id: str :param region: The region which should be addressed (required) :type region: str - :param update_instance_payload: Body (required) - :type update_instance_payload: UpdateInstancePayload + :param instance_id: The ID of the instance. (required) + :type instance_id: str + :param update_instance_protection_payload: The request body with flag isDeletable. Parameter is required. (required) + :type update_instance_protection_payload: UpdateInstanceProtectionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7860,11 +8278,11 @@ def update_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_instance_serialize( + _param = self._update_instance_protection_serialize( project_id=project_id, - instance_id=instance_id, region=region, - update_instance_payload=update_instance_payload, + instance_id=instance_id, + update_instance_protection_payload=update_instance_protection_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7872,21 +8290,24 @@ def update_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateInstanceResponse", - "400": "InstanceError", - "401": "InstanceError", - "405": None, - "500": None, + "200": "UpdateInstanceProtectionResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "422": "ValidationError", + "500": "Error", + "501": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_instance_serialize( + def _update_instance_protection_serialize( self, project_id, - instance_id, region, - update_instance_payload, + instance_id, + update_instance_protection_payload, _request_auth, _content_type, _headers, @@ -7907,16 +8328,16 @@ def _update_instance_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id if region is not None: _path_params["region"] = region + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_instance_payload is not None: - _body_params = update_instance_payload + if update_instance_protection_payload is not None: + _body_params = update_instance_protection_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -7934,8 +8355,8 @@ def _update_instance_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PUT", - resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", + method="POST", + resource_path="/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/protections", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/api_client.py b/services/sqlserverflex/src/stackit/sqlserverflex/api_client.py index 8b060759d..84ac2c448 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/api_client.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/api_client.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/configuration.py b/services/sqlserverflex/src/stackit/sqlserverflex/configuration.py index 47d92ce23..8006c1658 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/configuration.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/configuration.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/exceptions.py b/services/sqlserverflex/src/stackit/sqlserverflex/exceptions.py index d06b4c1bc..e708ae8ab 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/exceptions.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/exceptions.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/__init__.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/__init__.py index 3edc7e2d6..97ed033a7 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/__init__.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/__init__.py @@ -6,7 +6,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,78 +14,100 @@ """ # noqa: E501 # import models into model package -from stackit.sqlserverflex.models.acl import ACL -from stackit.sqlserverflex.models.backup import Backup -from stackit.sqlserverflex.models.backup_list_backups_response_grouped import ( - BackupListBackupsResponseGrouped, -) +from stackit.sqlserverflex.models.backup_running_restore import BackupRunningRestore +from stackit.sqlserverflex.models.backup_sort import BackupSort from stackit.sqlserverflex.models.create_database_payload import CreateDatabasePayload from stackit.sqlserverflex.models.create_database_response import CreateDatabaseResponse from stackit.sqlserverflex.models.create_instance_payload import CreateInstancePayload +from stackit.sqlserverflex.models.create_instance_payload_network import ( + CreateInstancePayloadNetwork, +) from stackit.sqlserverflex.models.create_instance_response import CreateInstanceResponse from stackit.sqlserverflex.models.create_user_payload import CreateUserPayload from stackit.sqlserverflex.models.create_user_response import CreateUserResponse -from stackit.sqlserverflex.models.data_point import DataPoint -from stackit.sqlserverflex.models.database import Database -from stackit.sqlserverflex.models.database_documentation_create_database_request_options import ( - DatabaseDocumentationCreateDatabaseRequestOptions, +from stackit.sqlserverflex.models.database_getcollation import DatabaseGetcollation +from stackit.sqlserverflex.models.database_getcompatibility import ( + DatabaseGetcompatibility, ) -from stackit.sqlserverflex.models.database_options import DatabaseOptions -from stackit.sqlserverflex.models.flavor import Flavor +from stackit.sqlserverflex.models.database_roles import DatabaseRoles +from stackit.sqlserverflex.models.database_sort import DatabaseSort +from stackit.sqlserverflex.models.error import Error +from stackit.sqlserverflex.models.external_s3 import ExternalS3 +from stackit.sqlserverflex.models.flavor_sort import FlavorSort +from stackit.sqlserverflex.models.flavor_storage_classes_storage_class import ( + FlavorStorageClassesStorageClass, +) +from stackit.sqlserverflex.models.flavor_storage_range import FlavorStorageRange from stackit.sqlserverflex.models.get_backup_response import GetBackupResponse from stackit.sqlserverflex.models.get_database_response import GetDatabaseResponse from stackit.sqlserverflex.models.get_instance_response import GetInstanceResponse from stackit.sqlserverflex.models.get_user_response import GetUserResponse -from stackit.sqlserverflex.models.host import Host -from stackit.sqlserverflex.models.host_metric import HostMetric -from stackit.sqlserverflex.models.instance import Instance -from stackit.sqlserverflex.models.instance_documentation_acl import ( - InstanceDocumentationACL, -) -from stackit.sqlserverflex.models.instance_documentation_options import ( - InstanceDocumentationOptions, +from stackit.sqlserverflex.models.instance_edition import InstanceEdition +from stackit.sqlserverflex.models.instance_encryption import InstanceEncryption +from stackit.sqlserverflex.models.instance_network import InstanceNetwork +from stackit.sqlserverflex.models.instance_network_access_scope import ( + InstanceNetworkAccessScope, ) -from stackit.sqlserverflex.models.instance_documentation_storage import ( - InstanceDocumentationStorage, -) -from stackit.sqlserverflex.models.instance_error import InstanceError -from stackit.sqlserverflex.models.instance_flavor_entry import InstanceFlavorEntry -from stackit.sqlserverflex.models.instance_list_instance import InstanceListInstance -from stackit.sqlserverflex.models.instance_list_user import InstanceListUser +from stackit.sqlserverflex.models.instance_sort import InstanceSort +from stackit.sqlserverflex.models.instance_version import InstanceVersion +from stackit.sqlserverflex.models.instance_version_opt import InstanceVersionOpt +from stackit.sqlserverflex.models.list_backup import ListBackup +from stackit.sqlserverflex.models.list_backup_response import ListBackupResponse from stackit.sqlserverflex.models.list_backups_response import ListBackupsResponse from stackit.sqlserverflex.models.list_collations_response import ListCollationsResponse from stackit.sqlserverflex.models.list_compatibility_response import ( ListCompatibilityResponse, ) +from stackit.sqlserverflex.models.list_current_running_restore_jobs import ( + ListCurrentRunningRestoreJobs, +) +from stackit.sqlserverflex.models.list_database import ListDatabase from stackit.sqlserverflex.models.list_databases_response import ListDatabasesResponse +from stackit.sqlserverflex.models.list_flavors import ListFlavors from stackit.sqlserverflex.models.list_flavors_response import ListFlavorsResponse +from stackit.sqlserverflex.models.list_instance import ListInstance from stackit.sqlserverflex.models.list_instances_response import ListInstancesResponse -from stackit.sqlserverflex.models.list_metrics_response import ListMetricsResponse -from stackit.sqlserverflex.models.list_restore_jobs_response import ( - ListRestoreJobsResponse, -) from stackit.sqlserverflex.models.list_roles_response import ListRolesResponse from stackit.sqlserverflex.models.list_storages_response import ListStoragesResponse -from stackit.sqlserverflex.models.list_users_response import ListUsersResponse +from stackit.sqlserverflex.models.list_user import ListUser +from stackit.sqlserverflex.models.list_user_response import ListUserResponse from stackit.sqlserverflex.models.list_versions_response import ListVersionsResponse -from stackit.sqlserverflex.models.mssql_database_collation import MssqlDatabaseCollation -from stackit.sqlserverflex.models.mssql_database_compatibility import ( - MssqlDatabaseCompatibility, -) +from stackit.sqlserverflex.models.pagination import Pagination from stackit.sqlserverflex.models.partial_update_instance_payload import ( PartialUpdateInstancePayload, ) +from stackit.sqlserverflex.models.partial_update_instance_payload_network import ( + PartialUpdateInstancePayloadNetwork, +) +from stackit.sqlserverflex.models.replicas import Replicas from stackit.sqlserverflex.models.reset_user_response import ResetUserResponse -from stackit.sqlserverflex.models.restore_running_restore import RestoreRunningRestore -from stackit.sqlserverflex.models.single_database import SingleDatabase -from stackit.sqlserverflex.models.single_user import SingleUser -from stackit.sqlserverflex.models.storage import Storage -from stackit.sqlserverflex.models.storage_range import StorageRange -from stackit.sqlserverflex.models.trigger_database_restore_payload import ( - TriggerDatabaseRestorePayload, +from stackit.sqlserverflex.models.restore_database_from_backup_payload import ( + RestoreDatabaseFromBackupPayload, ) -from stackit.sqlserverflex.models.type import Type +from stackit.sqlserverflex.models.restore_database_from_backup_payload_source import ( + RestoreDatabaseFromBackupPayloadSource, +) +from stackit.sqlserverflex.models.s3file_info import S3fileInfo +from stackit.sqlserverflex.models.source_backup import SourceBackup +from stackit.sqlserverflex.models.source_external_s3 import SourceExternalS3 +from stackit.sqlserverflex.models.state import State +from stackit.sqlserverflex.models.storage import Storage +from stackit.sqlserverflex.models.storage_create import StorageCreate +from stackit.sqlserverflex.models.storage_update import StorageUpdate +from stackit.sqlserverflex.models.trigger_restore_payload import TriggerRestorePayload from stackit.sqlserverflex.models.update_instance_payload import UpdateInstancePayload -from stackit.sqlserverflex.models.update_instance_response import UpdateInstanceResponse -from stackit.sqlserverflex.models.user import User -from stackit.sqlserverflex.models.user_response_user import UserResponseUser +from stackit.sqlserverflex.models.update_instance_payload_network import ( + UpdateInstancePayloadNetwork, +) +from stackit.sqlserverflex.models.update_instance_protection_payload import ( + UpdateInstanceProtectionPayload, +) +from stackit.sqlserverflex.models.update_instance_protection_response import ( + UpdateInstanceProtectionResponse, +) +from stackit.sqlserverflex.models.user_sort import UserSort +from stackit.sqlserverflex.models.validation_error import ValidationError +from stackit.sqlserverflex.models.validation_error_validation_inner import ( + ValidationErrorValidationInner, +) +from stackit.sqlserverflex.models.version import Version diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_running_restore.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_running_restore.py similarity index 75% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/restore_running_restore.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/backup_running_restore.py index 1519e5c3e..a83849fbb 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_running_restore.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_running_restore.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,21 +18,21 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -class RestoreRunningRestore(BaseModel): +class BackupRunningRestore(BaseModel): """ - RestoreRunningRestore + BackupRunningRestore """ # noqa: E501 - command: Optional[StrictStr] = None - database_name: Optional[StrictStr] = None - estimated_completion_time: Optional[StrictStr] = None - percent_complete: Optional[StrictInt] = None - start_time: Optional[StrictStr] = None + command: StrictStr = Field(description="the command that was executed") + database_name: StrictStr = Field(description="the name of the database that is being restored") + estimated_completion_time: StrictStr = Field(description="the projected time when the restore should be completed") + percent_complete: StrictInt = Field(description="the percentage of the current running restore job") + start_time: StrictStr = Field(description="the start time of the current running restore job") __properties: ClassVar[List[str]] = [ "command", "database_name", @@ -58,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RestoreRunningRestore from a JSON string""" + """Create an instance of BackupRunningRestore from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RestoreRunningRestore from a dict""" + """Create an instance of BackupRunningRestore from a dict""" if obj is None: return None diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_sort.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_sort.py new file mode 100644 index 000000000..3685c0e19 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_sort.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class BackupSort(str, Enum): + """ + BackupSort + """ + + """ + allowed enum values + """ + END_TIME_DOT_DESC = "end_time.desc" + END_TIME_DOT_ASC = "end_time.asc" + INDEX_DOT_DESC = "index.desc" + INDEX_DOT_ASC = "index.asc" + NAME_DOT_DESC = "name.desc" + NAME_DOT_ASC = "name.asc" + RETAINED_UNTIL_DOT_DESC = "retained_until.desc" + RETAINED_UNTIL_DOT_ASC = "retained_until.asc" + SIZE_DOT_DESC = "size.desc" + SIZE_DOT_ASC = "size.asc" + TYPE_DOT_DESC = "type.desc" + TYPE_DOT_ASC = "type.asc" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BackupSort from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_payload.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_payload.py index e355d5311..91287f612 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_payload.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,24 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.database_documentation_create_database_request_options import ( - DatabaseDocumentationCreateDatabaseRequestOptions, -) - class CreateDatabasePayload(BaseModel): """ CreateDatabasePayload """ # noqa: E501 - name: StrictStr - options: DatabaseDocumentationCreateDatabaseRequestOptions - __properties: ClassVar[List[str]] = ["name", "options"] + collation: Optional[StrictStr] = Field( + default=None, + description="The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. ", + ) + compatibility: Optional[StrictInt] = Field(default=None, description="CompatibilityLevel of the Database.") + name: StrictStr = Field(description="The name of the database.") + owner: StrictStr = Field(description="The owner of the database.") + __properties: ClassVar[List[str]] = ["collation", "compatibility", "name", "owner"] model_config = ConfigDict( validate_by_name=True, @@ -73,9 +74,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of options - if self.options: - _dict["options"] = self.options.to_dict() return _dict @classmethod @@ -89,12 +87,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "collation": obj.get("collation"), + "compatibility": obj.get("compatibility"), "name": obj.get("name"), - "options": ( - DatabaseDocumentationCreateDatabaseRequestOptions.from_dict(obj["options"]) - if obj.get("options") is not None - else None - ), + "owner": obj.get("owner"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_response.py index d7ced1e77..7ebccb65b 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_database_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,7 +18,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -28,7 +28,7 @@ class CreateDatabaseResponse(BaseModel): CreateDatabaseResponse """ # noqa: E501 - id: Optional[StrictStr] = None + id: StrictInt = Field(description="The id of the database.") __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload.py index 661ba16c4..206b2e84d 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,19 +18,16 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python -from typing_extensions import Self +from typing_extensions import Annotated, Self -from stackit.sqlserverflex.models.instance_documentation_acl import ( - InstanceDocumentationACL, -) -from stackit.sqlserverflex.models.instance_documentation_options import ( - InstanceDocumentationOptions, -) -from stackit.sqlserverflex.models.instance_documentation_storage import ( - InstanceDocumentationStorage, +from stackit.sqlserverflex.models.create_instance_payload_network import ( + CreateInstancePayloadNetwork, ) +from stackit.sqlserverflex.models.instance_encryption import InstanceEncryption +from stackit.sqlserverflex.models.instance_version import InstanceVersion +from stackit.sqlserverflex.models.storage_create import StorageCreate class CreateInstancePayload(BaseModel): @@ -38,30 +35,32 @@ class CreateInstancePayload(BaseModel): CreateInstancePayload """ # noqa: E501 - acl: Optional[InstanceDocumentationACL] = Field( - default=None, - description="ACL is the Access Control List defining the IP ranges allowed to connect to the database", + backup_schedule: StrictStr = Field( + description="The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.", + alias="backupSchedule", ) - backup_schedule: Optional[StrictStr] = Field( + encryption: Optional[InstanceEncryption] = None + flavor_id: StrictStr = Field(description="The id of the instance flavor.", alias="flavorId") + labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field( default=None, - description="Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59", - alias="backupSchedule", + description="A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` ", ) - flavor_id: StrictStr = Field(description="Id of the selected flavor", alias="flavorId") - labels: Optional[Dict[str, Any]] = Field(default=None, description="Labels for the instance") - name: StrictStr = Field(description="Name of the instance") - options: Optional[InstanceDocumentationOptions] = Field( - default=None, description="Database instance specific options are requested via this field" + name: StrictStr = Field(description="The name of the instance.") + network: CreateInstancePayloadNetwork + retention_days: StrictInt = Field( + description="The days for how long the backup files should be stored before cleaned up. 30 to 90", + alias="retentionDays", ) - storage: Optional[InstanceDocumentationStorage] = Field(default=None, description="Storage for the instance") - version: Optional[StrictStr] = Field(default="2022", description="Version of the MSSQL Server") + storage: StorageCreate + version: InstanceVersion __properties: ClassVar[List[str]] = [ - "acl", "backupSchedule", + "encryption", "flavorId", "labels", "name", - "options", + "network", + "retentionDays", "storage", "version", ] @@ -103,12 +102,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of acl - if self.acl: - _dict["acl"] = self.acl.to_dict() - # override the default output from pydantic by calling `to_dict()` of options - if self.options: - _dict["options"] = self.options.to_dict() + # override the default output from pydantic by calling `to_dict()` of encryption + if self.encryption: + _dict["encryption"] = self.encryption.to_dict() + # override the default output from pydantic by calling `to_dict()` of network + if self.network: + _dict["network"] = self.network.to_dict() # override the default output from pydantic by calling `to_dict()` of storage if self.storage: _dict["storage"] = self.storage.to_dict() @@ -125,18 +124,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "acl": InstanceDocumentationACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None, "backupSchedule": obj.get("backupSchedule"), + "encryption": ( + InstanceEncryption.from_dict(obj["encryption"]) if obj.get("encryption") is not None else None + ), "flavorId": obj.get("flavorId"), "labels": obj.get("labels"), "name": obj.get("name"), - "options": ( - InstanceDocumentationOptions.from_dict(obj["options"]) if obj.get("options") is not None else None - ), - "storage": ( - InstanceDocumentationStorage.from_dict(obj["storage"]) if obj.get("storage") is not None else None + "network": ( + CreateInstancePayloadNetwork.from_dict(obj["network"]) if obj.get("network") is not None else None ), - "version": obj.get("version") if obj.get("version") is not None else "2022", + "retentionDays": obj.get("retentionDays"), + "storage": StorageCreate.from_dict(obj["storage"]) if obj.get("storage") is not None else None, + "version": obj.get("version"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_options.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload_network.py similarity index 71% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_options.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload_network.py index 94eb2bdd7..a080174af 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_options.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_payload_network.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,19 +22,21 @@ from pydantic_core import to_jsonable_python from typing_extensions import Self +from stackit.sqlserverflex.models.instance_network_access_scope import ( + InstanceNetworkAccessScope, +) -class InstanceDocumentationOptions(BaseModel): + +class CreateInstancePayloadNetwork(BaseModel): """ - InstanceDocumentationOptions + the network configuration of the instance. """ # noqa: E501 - edition: Optional[StrictStr] = Field(default="developer", description="Edition of the MSSQL server instance") - retention_days: Optional[StrictStr] = Field( - default="32", - description="The days for how long the backup files should be stored before cleaned up. 30 to 365", - alias="retentionDays", + access_scope: Optional[InstanceNetworkAccessScope] = Field( + default=InstanceNetworkAccessScope.PUBLIC, alias="accessScope" ) - __properties: ClassVar[List[str]] = ["edition", "retentionDays"] + acl: List[StrictStr] = Field(description="List of IPV4 cidr.") + __properties: ClassVar[List[str]] = ["accessScope", "acl"] model_config = ConfigDict( validate_by_name=True, @@ -53,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceDocumentationOptions from a JSON string""" + """Create an instance of CreateInstancePayloadNetwork from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceDocumentationOptions from a dict""" + """Create an instance of CreateInstancePayloadNetwork from a dict""" if obj is None: return None @@ -86,8 +88,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "edition": obj.get("edition") if obj.get("edition") is not None else "developer", - "retentionDays": obj.get("retentionDays") if obj.get("retentionDays") is not None else "32", + "accessScope": ( + obj.get("accessScope") if obj.get("accessScope") is not None else InstanceNetworkAccessScope.PUBLIC + ), + "acl": obj.get("acl"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_response.py index 73d777d46..e99f77867 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_instance_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,7 +18,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -28,7 +28,7 @@ class CreateInstanceResponse(BaseModel): CreateInstanceResponse """ # noqa: E501 - id: Optional[StrictStr] = None + id: StrictStr = Field(description="The ID of the instance.") __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_payload.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_payload.py index 1cbb53c1e..fd05ee840 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_payload.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,7 +18,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -28,9 +28,13 @@ class CreateUserPayload(BaseModel): CreateUserPayload """ # noqa: E501 - default_database: Optional[StrictStr] = None - roles: List[StrictStr] - username: StrictStr + default_database: Optional[StrictStr] = Field( + default=None, description="The default database for a user of the instance." + ) + roles: List[StrictStr] = Field( + description="A list containing the user roles for the instance. A list with the valid user roles can be retrieved using the List Roles endpoint." + ) + username: StrictStr = Field(description="The name of the user.") __properties: ClassVar[List[str]] = ["default_database", "roles", "username"] model_config = ConfigDict( diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_response.py index 0ff82fad9..44d871aa1 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/create_user_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,20 +18,36 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.single_user import SingleUser - class CreateUserResponse(BaseModel): """ CreateUserResponse """ # noqa: E501 - item: Optional[SingleUser] = None - __properties: ClassVar[List[str]] = ["item"] + default_database: StrictStr = Field(description="The default database for a user of the instance.") + host: StrictStr = Field(description="The host of the instance in which the user belongs to.") + id: StrictInt = Field(description="The ID of the user.") + password: StrictStr = Field(description="The password for the user.") + port: StrictInt = Field(description="The port of the instance in which the user belongs to.") + roles: List[StrictStr] + status: StrictStr = Field(description="The current status of the user.") + uri: StrictStr = Field(description="The connection string for the user to the instance.") + username: StrictStr = Field(description="The name of the user.") + __properties: ClassVar[List[str]] = [ + "default_database", + "host", + "id", + "password", + "port", + "roles", + "status", + "uri", + "username", + ] model_config = ConfigDict( validate_by_name=True, @@ -70,9 +86,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of item - if self.item: - _dict["item"] = self.item.to_dict() return _dict @classmethod @@ -84,5 +97,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"item": SingleUser.from_dict(obj["item"]) if obj.get("item") is not None else None}) + _obj = cls.model_validate( + { + "default_database": obj.get("default_database"), + "host": obj.get("host"), + "id": obj.get("id"), + "password": obj.get("password"), + "port": obj.get("port"), + "roles": obj.get("roles"), + "status": obj.get("status"), + "uri": obj.get("uri"), + "username": obj.get("username"), + } + ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/data_point.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/data_point.py deleted file mode 100644 index 0112d748f..000000000 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/data_point.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MSSQL Service API - - This is the documentation for the STACKIT MSSQL service - - The version of the OpenAPI document: 2.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set, Union - -from pydantic import ( - BaseModel, - ConfigDict, - StrictFloat, - StrictInt, - StrictStr, -) -from pydantic_core import to_jsonable_python -from typing_extensions import Self - - -class DataPoint(BaseModel): - """ - DataPoint - """ # noqa: E501 - - timestamp: Optional[StrictStr] = None - value: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["timestamp", "value"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataPoint from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataPoint from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({"timestamp": obj.get("timestamp"), "value": obj.get("value")}) - return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/mssql_database_collation.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_getcollation.py similarity index 89% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/mssql_database_collation.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/database_getcollation.py index 17e6a0716..011b90ef2 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/mssql_database_collation.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_getcollation.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,9 +23,9 @@ from typing_extensions import Self -class MssqlDatabaseCollation(BaseModel): +class DatabaseGetcollation(BaseModel): """ - MssqlDatabaseCollation + DatabaseGetcollation """ # noqa: E501 collation_name: Optional[StrictStr] = None @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MssqlDatabaseCollation from a JSON string""" + """Create an instance of DatabaseGetcollation from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MssqlDatabaseCollation from a dict""" + """Create an instance of DatabaseGetcollation from a dict""" if obj is None: return None diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/mssql_database_compatibility.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_getcompatibility.py similarity index 89% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/mssql_database_compatibility.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/database_getcompatibility.py index e704b4271..cab391fce 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/mssql_database_compatibility.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_getcompatibility.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,9 +23,9 @@ from typing_extensions import Self -class MssqlDatabaseCompatibility(BaseModel): +class DatabaseGetcompatibility(BaseModel): """ - MssqlDatabaseCompatibility + DatabaseGetcompatibility """ # noqa: E501 compatibility_level: Optional[StrictInt] = None @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MssqlDatabaseCompatibility from a JSON string""" + """Create an instance of DatabaseGetcompatibility from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MssqlDatabaseCompatibility from a dict""" + """Create an instance of DatabaseGetcompatibility from a dict""" if obj is None: return None diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/database_roles.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_roles.py new file mode 100644 index 000000000..4ca065c51 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_roles.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class DatabaseRoles(BaseModel): + """ + The name and the roles for a database for a user. + """ # noqa: E501 + + name: StrictStr = Field(description="The name of the database.") + roles: List[StrictStr] = Field(description="The name and the roles for a database") + __properties: ClassVar[List[str]] = ["name", "roles"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatabaseRoles from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatabaseRoles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "roles": obj.get("roles")}) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/database_sort.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_sort.py new file mode 100644 index 000000000..71f688d85 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/database_sort.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class DatabaseSort(str, Enum): + """ + DatabaseSort + """ + + """ + allowed enum values + """ + CREATED_AT_DOT_DESC = "created_at.desc" + CREATED_AT_DOT_ASC = "created_at.asc" + DATABASE_ID_DOT_DESC = "database_id.desc" + DATABASE_ID_DOT_ASC = "database_id.asc" + DATABASE_NAME_DOT_DESC = "database_name.desc" + DATABASE_NAME_DOT_ASC = "database_name.asc" + DATABASE_OWNER_DOT_DESC = "database_owner.desc" + DATABASE_OWNER_DOT_ASC = "database_owner.asc" + INDEX_DOT_ASC = "index.asc" + INDEX_DOT_DESC = "index.desc" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DatabaseSort from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_error.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/error.py similarity index 74% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_error.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/error.py index 794a66ce3..bd9cd97a7 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_error.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/error.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,21 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.type import Type - -class InstanceError(BaseModel): +class Error(BaseModel): """ - InstanceError + Error """ # noqa: E501 - code: Optional[StrictInt] = None - fields: Optional[Dict[str, List[StrictStr]]] = None - message: Optional[StrictStr] = None - type: Optional[Type] = None - __properties: ClassVar[List[str]] = ["code", "fields", "message", "type"] + code: StrictInt = Field(description="The http error code of the error.") + message: StrictStr = Field(description="More detailed information about the error.") + trace_id: StrictStr = Field(description="The trace id of the request.", alias="traceId") + type: StrictStr = Field(description="Describes in which state the api was when the error happened.") + __properties: ClassVar[List[str]] = ["code", "message", "traceId", "type"] model_config = ConfigDict( validate_by_name=True, @@ -53,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceError from a JSON string""" + """Create an instance of Error from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceError from a dict""" + """Create an instance of Error from a dict""" if obj is None: return None @@ -87,8 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "code": obj.get("code"), - "fields": obj.get("fields"), "message": obj.get("message"), + "traceId": obj.get("traceId"), "type": obj.get("type"), } ) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_users_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/external_s3.py similarity index 59% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/list_users_response.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/external_s3.py index faeea7510..206fbe6cc 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_users_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/external_s3.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,21 +18,25 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python -from typing_extensions import Self +from typing_extensions import Annotated, Self -from stackit.sqlserverflex.models.instance_list_user import InstanceListUser +from stackit.sqlserverflex.models.s3file_info import S3fileInfo -class ListUsersResponse(BaseModel): +class ExternalS3(BaseModel): """ - ListUsersResponse + The external S3 information """ # noqa: E501 - count: Optional[StrictInt] = None - items: Optional[List[InstanceListUser]] = None - __properties: ClassVar[List[str]] = ["count", "items"] + s3_access_key: StrictStr = Field(description="The s3 access key id") + s3_access_secret: StrictStr = Field(description="The s3 access secret") + s3_bucket: StrictStr = Field(description="The s3 bucket address") + s3_files: Annotated[List[S3fileInfo], Field(min_length=1)] = Field( + description="The backup files from which the database should be restored" + ) + __properties: ClassVar[List[str]] = ["s3_access_key", "s3_access_secret", "s3_bucket", "s3_files"] model_config = ConfigDict( validate_by_name=True, @@ -51,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListUsersResponse from a JSON string""" + """Create an instance of ExternalS3 from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,18 +75,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) + # override the default output from pydantic by calling `to_dict()` of each item in s3_files (list) _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict["items"] = _items + if self.s3_files: + for _item_s3_files in self.s3_files: + if _item_s3_files: + _items.append(_item_s3_files.to_dict()) + _dict["s3_files"] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListUsersResponse from a dict""" + """Create an instance of ExternalS3 from a dict""" if obj is None: return None @@ -91,10 +95,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "count": obj.get("count"), - "items": ( - [InstanceListUser.from_dict(_item) for _item in obj["items"]] - if obj.get("items") is not None + "s3_access_key": obj.get("s3_access_key"), + "s3_access_secret": obj.get("s3_access_secret"), + "s3_bucket": obj.get("s3_bucket"), + "s3_files": ( + [S3fileInfo.from_dict(_item) for _item in obj["s3_files"]] + if obj.get("s3_files") is not None else None ), } diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_sort.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_sort.py new file mode 100644 index 000000000..269f2d16f --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_sort.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class FlavorSort(str, Enum): + """ + FlavorSort + """ + + """ + allowed enum values + """ + INDEX_DOT_DESC = "index.desc" + INDEX_DOT_ASC = "index.asc" + CPU_DOT_DESC = "cpu.desc" + CPU_DOT_ASC = "cpu.asc" + FLAVOR_DESCRIPTION_DOT_ASC = "flavor_description.asc" + FLAVOR_DESCRIPTION_DOT_DESC = "flavor_description.desc" + ID_DOT_DESC = "id.desc" + ID_DOT_ASC = "id.asc" + SIZE_MAX_DOT_DESC = "size_max.desc" + SIZE_MAX_DOT_ASC = "size_max.asc" + RAM_DOT_DESC = "ram.desc" + RAM_DOT_ASC = "ram.asc" + SIZE_MIN_DOT_DESC = "size_min.desc" + SIZE_MIN_DOT_ASC = "size_min.asc" + STORAGE_CLASS_DOT_ASC = "storage_class.asc" + STORAGE_CLASS_DOT_DESC = "storage_class.desc" + NODE_TYPE_DOT_ASC = "node_type.asc" + NODE_TYPE_DOT_DESC = "node_type.desc" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FlavorSort from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_flavor_entry.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_storage_classes_storage_class.py similarity index 71% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_flavor_entry.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_storage_classes_storage_class.py index b4a1abf86..194adb889 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_flavor_entry.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_storage_classes_storage_class.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,22 +18,20 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -class InstanceFlavorEntry(BaseModel): +class FlavorStorageClassesStorageClass(BaseModel): """ - InstanceFlavorEntry + a storageClass defines how efficient the storage can work """ # noqa: E501 - categories: Optional[StrictStr] = None - cpu: Optional[StrictInt] = None - description: Optional[StrictStr] = None - id: Optional[StrictStr] = None - memory: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["categories", "cpu", "description", "id", "memory"] + var_class: StrictStr = Field(alias="class") + max_io_per_sec: StrictInt = Field(alias="maxIoPerSec") + max_through_in_mb: StrictInt = Field(alias="maxThroughInMb") + __properties: ClassVar[List[str]] = ["class", "maxIoPerSec", "maxThroughInMb"] model_config = ConfigDict( validate_by_name=True, @@ -52,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceFlavorEntry from a JSON string""" + """Create an instance of FlavorStorageClassesStorageClass from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceFlavorEntry from a dict""" + """Create an instance of FlavorStorageClassesStorageClass from a dict""" if obj is None: return None @@ -85,11 +83,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "categories": obj.get("categories"), - "cpu": obj.get("cpu"), - "description": obj.get("description"), - "id": obj.get("id"), - "memory": obj.get("memory"), + "class": obj.get("class"), + "maxIoPerSec": obj.get("maxIoPerSec"), + "maxThroughInMb": obj.get("maxThroughInMb"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_range.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_storage_range.py similarity index 78% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/storage_range.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_storage_range.py index ab1ceff7d..87ac50ab6 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_range.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor_storage_range.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,18 +18,18 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictInt from pydantic_core import to_jsonable_python from typing_extensions import Self -class StorageRange(BaseModel): +class FlavorStorageRange(BaseModel): """ - StorageRange + range of maximum and minimum storage which can be ordered for the flavor in Gigabyte. """ # noqa: E501 - max: Optional[StrictInt] = None - min: Optional[StrictInt] = None + max: StrictInt = Field(description="maximum storage which can be ordered for the flavor in Gigabyte.") + min: StrictInt = Field(description="minimum storage which is required to order in Gigabyte.") __properties: ClassVar[List[str]] = ["max", "min"] model_config = ConfigDict( @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StorageRange from a JSON string""" + """Create an instance of FlavorStorageRange from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StorageRange from a dict""" + """Create an instance of FlavorStorageRange from a dict""" if obj is None: return None diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_backup_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_backup_response.py index 85bb2b585..7b83ebb07 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_backup_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_backup_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,19 +28,15 @@ class GetBackupResponse(BaseModel): GetBackupResponse """ # noqa: E501 - end_time: Optional[StrictStr] = Field( - default=None, description="Backup end time represents local server time", alias="endTime" + completion_time: StrictStr = Field( + description="The time when the backup was completed in RFC3339 format.", alias="completionTime" ) - error: Optional[StrictStr] = Field(default=None, description="Backup error") - id: Optional[StrictStr] = Field(default=None, description="Backup id") - labels: Optional[List[StrictStr]] = Field(default=None, description="Backup labels") - name: Optional[StrictStr] = Field(default=None, description="Backup name") - options: Optional[Dict[str, StrictStr]] = Field(default=None, description="Backup specific options") - size: Optional[StrictInt] = Field(default=None, description="Backup size in byte") - start_time: Optional[StrictStr] = Field( - default=None, description="Backup start time represents local server time", alias="startTime" - ) - __properties: ClassVar[List[str]] = ["endTime", "error", "id", "labels", "name", "options", "size", "startTime"] + id: StrictInt = Field(description="The ID of the backup.") + name: StrictStr = Field(description="The name of the backup.") + retained_until: StrictStr = Field(description="The time until the backup will be retained.", alias="retainedUntil") + size: StrictInt = Field(description="The size of the backup in bytes.") + type: StrictStr = Field(description="The type of the backup, which can be automated or manual triggered.") + __properties: ClassVar[List[str]] = ["completionTime", "id", "name", "retainedUntil", "size", "type"] model_config = ConfigDict( validate_by_name=True, @@ -92,14 +88,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "endTime": obj.get("endTime"), - "error": obj.get("error"), + "completionTime": obj.get("completionTime"), "id": obj.get("id"), - "labels": obj.get("labels"), "name": obj.get("name"), - "options": obj.get("options"), + "retainedUntil": obj.get("retainedUntil"), "size": obj.get("size"), - "startTime": obj.get("startTime"), + "type": obj.get("type"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_database_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_database_response.py index c6ef3b79d..84f0d51cc 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_database_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_database_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,20 +18,27 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.single_database import SingleDatabase - class GetDatabaseResponse(BaseModel): """ GetDatabaseResponse """ # noqa: E501 - database: Optional[SingleDatabase] = None - __properties: ClassVar[List[str]] = ["database"] + collation_name: StrictStr = Field( + description="The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. ", + alias="collationName", + ) + compatibility_level: StrictInt = Field( + description="CompatibilityLevel of the Database.", alias="compatibilityLevel" + ) + id: StrictInt = Field(description="The id of the database.") + name: StrictStr = Field(description="The name of the database.") + owner: StrictStr = Field(description="The owner of the database.") + __properties: ClassVar[List[str]] = ["collationName", "compatibilityLevel", "id", "name", "owner"] model_config = ConfigDict( validate_by_name=True, @@ -70,9 +77,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of database - if self.database: - _dict["database"] = self.database.to_dict() return _dict @classmethod @@ -85,6 +89,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate( - {"database": SingleDatabase.from_dict(obj["database"]) if obj.get("database") is not None else None} + { + "collationName": obj.get("collationName"), + "compatibilityLevel": obj.get("compatibilityLevel"), + "id": obj.get("id"), + "name": obj.get("name"), + "owner": obj.get("owner"), + } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_instance_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_instance_response.py index 07a98fec3..98fa6b149 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_instance_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_instance_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,24 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, +) from pydantic_core import to_jsonable_python -from typing_extensions import Self +from typing_extensions import Annotated, Self -from stackit.sqlserverflex.models.instance import Instance +from stackit.sqlserverflex.models.instance_edition import InstanceEdition +from stackit.sqlserverflex.models.instance_encryption import InstanceEncryption +from stackit.sqlserverflex.models.instance_network import InstanceNetwork +from stackit.sqlserverflex.models.instance_version import InstanceVersion +from stackit.sqlserverflex.models.replicas import Replicas +from stackit.sqlserverflex.models.state import State +from stackit.sqlserverflex.models.storage import Storage class GetInstanceResponse(BaseModel): @@ -30,8 +43,45 @@ class GetInstanceResponse(BaseModel): GetInstanceResponse """ # noqa: E501 - item: Optional[Instance] = None - __properties: ClassVar[List[str]] = ["item"] + backup_schedule: StrictStr = Field( + description="The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.", + alias="backupSchedule", + ) + edition: InstanceEdition + encryption: Optional[InstanceEncryption] = None + flavor_id: StrictStr = Field(description="The id of the instance flavor.", alias="flavorId") + id: StrictStr = Field(description="The ID of the instance.") + is_deletable: StrictBool = Field(description="Whether the instance can be deleted or not.", alias="isDeletable") + labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field( + default=None, + description="A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` ", + ) + name: StrictStr = Field(description="The name of the instance.") + network: InstanceNetwork + replicas: Replicas + retention_days: StrictInt = Field( + description="The days for how long the backup files should be stored before cleaned up. 30 to 90", + alias="retentionDays", + ) + state: State + storage: Storage + version: InstanceVersion + __properties: ClassVar[List[str]] = [ + "backupSchedule", + "edition", + "encryption", + "flavorId", + "id", + "isDeletable", + "labels", + "name", + "network", + "replicas", + "retentionDays", + "state", + "storage", + "version", + ] model_config = ConfigDict( validate_by_name=True, @@ -70,9 +120,15 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of item - if self.item: - _dict["item"] = self.item.to_dict() + # override the default output from pydantic by calling `to_dict()` of encryption + if self.encryption: + _dict["encryption"] = self.encryption.to_dict() + # override the default output from pydantic by calling `to_dict()` of network + if self.network: + _dict["network"] = self.network.to_dict() + # override the default output from pydantic by calling `to_dict()` of storage + if self.storage: + _dict["storage"] = self.storage.to_dict() return _dict @classmethod @@ -84,5 +140,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"item": Instance.from_dict(obj["item"]) if obj.get("item") is not None else None}) + _obj = cls.model_validate( + { + "backupSchedule": obj.get("backupSchedule"), + "edition": obj.get("edition"), + "encryption": ( + InstanceEncryption.from_dict(obj["encryption"]) if obj.get("encryption") is not None else None + ), + "flavorId": obj.get("flavorId"), + "id": obj.get("id"), + "isDeletable": obj.get("isDeletable"), + "labels": obj.get("labels"), + "name": obj.get("name"), + "network": InstanceNetwork.from_dict(obj["network"]) if obj.get("network") is not None else None, + "replicas": obj.get("replicas"), + "retentionDays": obj.get("retentionDays"), + "state": obj.get("state"), + "storage": Storage.from_dict(obj["storage"]) if obj.get("storage") is not None else None, + "version": obj.get("version"), + } + ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_user_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_user_response.py index b303b3f17..89d8693ff 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/get_user_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/get_user_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,20 +18,24 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.user_response_user import UserResponseUser - class GetUserResponse(BaseModel): """ GetUserResponse """ # noqa: E501 - item: Optional[UserResponseUser] = None - __properties: ClassVar[List[str]] = ["item"] + default_database: StrictStr = Field(description="The default database for a user of the instance.") + host: StrictStr = Field(description="The host of the instance in which the user belongs to.") + id: StrictInt = Field(description="The ID of the user.") + port: StrictInt = Field(description="The port of the instance in which the user belongs to.") + roles: List[StrictStr] = Field(description="A list of user roles.") + status: StrictStr = Field(description="The current status of the user.") + username: StrictStr = Field(description="The name of the user.") + __properties: ClassVar[List[str]] = ["default_database", "host", "id", "port", "roles", "status", "username"] model_config = ConfigDict( validate_by_name=True, @@ -70,9 +74,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of item - if self.item: - _dict["item"] = self.item.to_dict() return _dict @classmethod @@ -85,6 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate( - {"item": UserResponseUser.from_dict(obj["item"]) if obj.get("item") is not None else None} + { + "default_database": obj.get("default_database"), + "host": obj.get("host"), + "id": obj.get("id"), + "port": obj.get("port"), + "roles": obj.get("roles"), + "status": obj.get("status"), + "username": obj.get("username"), + } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_edition.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_edition.py new file mode 100644 index 000000000..114fdb192 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_edition.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class InstanceEdition(str, Enum): + """ + Edition of the MSSQL server instance + """ + + """ + allowed enum values + """ + STANDARD = "Standard" + ENTERPRISECORE = "EnterpriseCore" + DEVELOPER = "developer" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceEdition from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/database_documentation_create_database_request_options.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_encryption.py similarity index 68% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/database_documentation_create_database_request_options.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/instance_encryption.py index e11b6137d..3b5fc4252 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/database_documentation_create_database_request_options.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_encryption.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,17 +23,16 @@ from typing_extensions import Self -class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel): +class InstanceEncryption(BaseModel): """ - DatabaseDocumentationCreateDatabaseRequestOptions + this defines which key to use for storage encryption """ # noqa: E501 - collation: Optional[StrictStr] = Field(default=None, description="Collation of the database") - compatibility_level: Optional[StrictStr] = Field( - default=None, description="CompatibilityLevel of the Database.", alias="compatibilityLevel" - ) - owner: StrictStr = Field(description="Name of the owner of the database.") - __properties: ClassVar[List[str]] = ["collation", "compatibilityLevel", "owner"] + kek_key_id: StrictStr = Field(description="The key identifier", alias="kekKeyId") + kek_key_ring_id: StrictStr = Field(description="The keyring identifier", alias="kekKeyRingId") + kek_key_version: StrictStr = Field(description="The key version", alias="kekKeyVersion") + service_account: StrictStr = Field(alias="serviceAccount") + __properties: ClassVar[List[str]] = ["kekKeyId", "kekKeyRingId", "kekKeyVersion", "serviceAccount"] model_config = ConfigDict( validate_by_name=True, @@ -52,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatabaseDocumentationCreateDatabaseRequestOptions from a JSON string""" + """Create an instance of InstanceEncryption from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatabaseDocumentationCreateDatabaseRequestOptions from a dict""" + """Create an instance of InstanceEncryption from a dict""" if obj is None: return None @@ -85,9 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "collation": obj.get("collation"), - "compatibilityLevel": obj.get("compatibilityLevel"), - "owner": obj.get("owner"), + "kekKeyId": obj.get("kekKeyId"), + "kekKeyRingId": obj.get("kekKeyRingId"), + "kekKeyVersion": obj.get("kekKeyVersion"), + "serviceAccount": obj.get("serviceAccount"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/single_database.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network.py similarity index 63% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/single_database.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network.py index e42d01a5e..794389370 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/single_database.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,18 +22,23 @@ from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.database_options import DatabaseOptions +from stackit.sqlserverflex.models.instance_network_access_scope import ( + InstanceNetworkAccessScope, +) -class SingleDatabase(BaseModel): +class InstanceNetwork(BaseModel): """ - SingleDatabase + The access configuration of the instance """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Database id") - name: Optional[StrictStr] = Field(default=None, description="Database name") - options: Optional[DatabaseOptions] = Field(default=None, description="Database specific options") - __properties: ClassVar[List[str]] = ["id", "name", "options"] + access_scope: Optional[InstanceNetworkAccessScope] = Field( + default=InstanceNetworkAccessScope.PUBLIC, alias="accessScope" + ) + acl: Optional[List[StrictStr]] = Field(default=None, description="List of IPV4 cidr.") + instance_address: Optional[StrictStr] = Field(default=None, alias="instanceAddress") + router_address: Optional[StrictStr] = Field(default=None, alias="routerAddress") + __properties: ClassVar[List[str]] = ["accessScope", "acl", "instanceAddress", "routerAddress"] model_config = ConfigDict( validate_by_name=True, @@ -52,7 +57,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SingleDatabase from a JSON string""" + """Create an instance of InstanceNetwork from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,14 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of options - if self.options: - _dict["options"] = self.options.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SingleDatabase from a dict""" + """Create an instance of InstanceNetwork from a dict""" if obj is None: return None @@ -88,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "id": obj.get("id"), - "name": obj.get("name"), - "options": DatabaseOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, + "accessScope": ( + obj.get("accessScope") if obj.get("accessScope") is not None else InstanceNetworkAccessScope.PUBLIC + ), + "acl": obj.get("acl"), + "instanceAddress": obj.get("instanceAddress"), + "routerAddress": obj.get("routerAddress"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network_access_scope.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network_access_scope.py new file mode 100644 index 000000000..0e30302df --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_network_access_scope.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class InstanceNetworkAccessScope(str, Enum): + """ + The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. + """ + + """ + allowed enum values + """ + PUBLIC = "PUBLIC" + SNA = "SNA" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceNetworkAccessScope from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_sort.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_sort.py new file mode 100644 index 000000000..71e0c25ae --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_sort.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class InstanceSort(str, Enum): + """ + InstanceSort + """ + + """ + allowed enum values + """ + INDEX_DOT_DESC = "index.desc" + INDEX_DOT_ASC = "index.asc" + ID_DOT_DESC = "id.desc" + ID_DOT_ASC = "id.asc" + IS_DELETABLE_DOT_DESC = "is_deletable.desc" + IS_DELETABLE_DOT_ASC = "is_deletable.asc" + NAME_DOT_ASC = "name.asc" + NAME_DOT_DESC = "name.desc" + STATE_DOT_ASC = "state.asc" + STATE_DOT_DESC = "state.desc" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceSort from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/type.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version.py similarity index 66% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/type.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version.py index 7834830c6..3d263eb5c 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/type.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,22 +20,17 @@ from typing_extensions import Self -class Type(str, Enum): +class InstanceVersion(str, Enum): """ - Type + The sqlserver version used for the instance. """ """ allowed enum values """ - NOTFOUND = "NotFound" - CREATE = "Create" - READ = "Read" - DELETE = "Delete" - UPDATE = "Update" - VALIDATION = "Validation" + ENUM_2022 = "2022" @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of Type from a JSON string""" + """Create an instance of InstanceVersion from a JSON string""" return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version_opt.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version_opt.py new file mode 100644 index 000000000..fdca896d6 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_version_opt.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class InstanceVersionOpt(str, Enum): + """ + InstanceVersionOpt + """ + + """ + allowed enum values + """ + ENUM_2022 = "2022" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceVersionOpt from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/backup.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backup.py similarity index 67% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/backup.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/list_backup.py index 6f2bc7909..1b9841c5d 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/backup.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backup.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,20 +23,20 @@ from typing_extensions import Self -class Backup(BaseModel): +class ListBackup(BaseModel): """ - Backup + ListBackup """ # noqa: E501 - end_time: Optional[StrictStr] = Field(default=None, alias="endTime") - error: Optional[StrictStr] = None - id: Optional[StrictStr] = None - labels: Optional[List[StrictStr]] = None - name: Optional[StrictStr] = None - options: Optional[Dict[str, StrictStr]] = None - size: Optional[StrictInt] = None - start_time: Optional[StrictStr] = Field(default=None, alias="startTime") - __properties: ClassVar[List[str]] = ["endTime", "error", "id", "labels", "name", "options", "size", "startTime"] + completion_time: StrictStr = Field( + description="The time when the backup was completed in RFC3339 format.", alias="completionTime" + ) + id: StrictInt = Field(description="The ID of the backup.") + name: StrictStr = Field(description="The name of the backup.") + retained_until: StrictStr = Field(description="The time until the backup will be retained.", alias="retainedUntil") + size: StrictInt = Field(description="The size of the backup in bytes.") + type: StrictStr = Field(description="The type of the backup, which can be automated or manual triggered.") + __properties: ClassVar[List[str]] = ["completionTime", "id", "name", "retainedUntil", "size", "type"] model_config = ConfigDict( validate_by_name=True, @@ -55,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Backup from a JSON string""" + """Create an instance of ListBackup from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Backup from a dict""" + """Create an instance of ListBackup from a dict""" if obj is None: return None @@ -88,14 +88,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "endTime": obj.get("endTime"), - "error": obj.get("error"), + "completionTime": obj.get("completionTime"), "id": obj.get("id"), - "labels": obj.get("labels"), "name": obj.get("name"), - "options": obj.get("options"), + "retainedUntil": obj.get("retainedUntil"), "size": obj.get("size"), - "startTime": obj.get("startTime"), + "type": obj.get("type"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_list_backups_response_grouped.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backup_response.py similarity index 68% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/backup_list_backups_response_grouped.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/list_backup_response.py index da633a685..a04e2ab93 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/backup_list_backups_response_grouped.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backup_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,21 +18,22 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.backup import Backup +from stackit.sqlserverflex.models.list_backups_response import ListBackupsResponse +from stackit.sqlserverflex.models.pagination import Pagination -class BackupListBackupsResponseGrouped(BaseModel): +class ListBackupResponse(BaseModel): """ - BackupListBackupsResponseGrouped + ListBackupResponse """ # noqa: E501 - backups: Optional[List[Backup]] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["backups", "name"] + backups: List[ListBackupsResponse] = Field(description="The list containing the information about the backups.") + pagination: Pagination + __properties: ClassVar[List[str]] = ["backups", "pagination"] model_config = ConfigDict( validate_by_name=True, @@ -51,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BackupListBackupsResponseGrouped from a JSON string""" + """Create an instance of ListBackupResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,11 +79,14 @@ def to_dict(self) -> Dict[str, Any]: if _item_backups: _items.append(_item_backups.to_dict()) _dict["backups"] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict["pagination"] = self.pagination.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BackupListBackupsResponseGrouped from a dict""" + """Create an instance of ListBackupResponse from a dict""" if obj is None: return None @@ -92,9 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "backups": ( - [Backup.from_dict(_item) for _item in obj["backups"]] if obj.get("backups") is not None else None + [ListBackupsResponse.from_dict(_item) for _item in obj["backups"]] + if obj.get("backups") is not None + else None ), - "name": obj.get("name"), + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backups_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backups_response.py index b442fda68..a60d705cf 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backups_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_backups_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,11 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.backup_list_backups_response_grouped import ( - BackupListBackupsResponseGrouped, -) +from stackit.sqlserverflex.models.list_backup import ListBackup class ListBackupsResponse(BaseModel): @@ -32,8 +30,9 @@ class ListBackupsResponse(BaseModel): ListBackupsResponse """ # noqa: E501 - databases: Optional[List[BackupListBackupsResponseGrouped]] = None - __properties: ClassVar[List[str]] = ["databases"] + backups: List[ListBackup] = Field(description="List of the backups beloning to that database") + database_name: StrictStr = Field(description="Name of the database the backups belong to", alias="databaseName") + __properties: ClassVar[List[str]] = ["backups", "databaseName"] model_config = ConfigDict( validate_by_name=True, @@ -72,13 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in databases (list) + # override the default output from pydantic by calling `to_dict()` of each item in backups (list) _items = [] - if self.databases: - for _item_databases in self.databases: - if _item_databases: - _items.append(_item_databases.to_dict()) - _dict["databases"] = _items + if self.backups: + for _item_backups in self.backups: + if _item_backups: + _items.append(_item_backups.to_dict()) + _dict["backups"] = _items return _dict @classmethod @@ -92,11 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "databases": ( - [BackupListBackupsResponseGrouped.from_dict(_item) for _item in obj["databases"]] - if obj.get("databases") is not None + "backups": ( + [ListBackup.from_dict(_item) for _item in obj["backups"]] + if obj.get("backups") is not None else None - ) + ), + "databaseName": obj.get("databaseName"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_collations_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_collations_response.py index 43b22edae..ac54f9121 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_collations_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_collations_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,11 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.mssql_database_collation import MssqlDatabaseCollation +from stackit.sqlserverflex.models.database_getcollation import DatabaseGetcollation class ListCollationsResponse(BaseModel): @@ -30,7 +30,7 @@ class ListCollationsResponse(BaseModel): ListCollationsResponse """ # noqa: E501 - collations: Optional[List[MssqlDatabaseCollation]] = None + collations: List[DatabaseGetcollation] = Field(description="List of collations available for the instance.") __properties: ClassVar[List[str]] = ["collations"] model_config = ConfigDict( @@ -91,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "collations": ( - [MssqlDatabaseCollation.from_dict(_item) for _item in obj["collations"]] + [DatabaseGetcollation.from_dict(_item) for _item in obj["collations"]] if obj.get("collations") is not None else None ) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_compatibility_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_compatibility_response.py index f4f47d6cf..a43870ece 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_compatibility_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_compatibility_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,12 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.mssql_database_compatibility import ( - MssqlDatabaseCompatibility, +from stackit.sqlserverflex.models.database_getcompatibility import ( + DatabaseGetcompatibility, ) @@ -32,7 +32,7 @@ class ListCompatibilityResponse(BaseModel): ListCompatibilityResponse """ # noqa: E501 - compatibilities: Optional[List[MssqlDatabaseCompatibility]] = None + compatibilities: List[DatabaseGetcompatibility] = Field(description="List of compatibilities available for a d") __properties: ClassVar[List[str]] = ["compatibilities"] model_config = ConfigDict( @@ -93,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "compatibilities": ( - [MssqlDatabaseCompatibility.from_dict(_item) for _item in obj["compatibilities"]] + [DatabaseGetcompatibility.from_dict(_item) for _item in obj["compatibilities"]] if obj.get("compatibilities") is not None else None ) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_restore_jobs_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_current_running_restore_jobs.py similarity index 81% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/list_restore_jobs_response.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/list_current_running_restore_jobs.py index 65e79a43f..00dfffc80 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_restore_jobs_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_current_running_restore_jobs.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,15 +22,17 @@ from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.restore_running_restore import RestoreRunningRestore +from stackit.sqlserverflex.models.backup_running_restore import BackupRunningRestore -class ListRestoreJobsResponse(BaseModel): +class ListCurrentRunningRestoreJobs(BaseModel): """ - ListRestoreJobsResponse + ListCurrentRunningRestoreJobs """ # noqa: E501 - running_restores: Optional[List[RestoreRunningRestore]] = Field(default=None, alias="runningRestores") + running_restores: List[BackupRunningRestore] = Field( + description="List of the currently running Restore jobs", alias="runningRestores" + ) __properties: ClassVar[List[str]] = ["runningRestores"] model_config = ConfigDict( @@ -50,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListRestoreJobsResponse from a JSON string""" + """Create an instance of ListCurrentRunningRestoreJobs from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -81,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListRestoreJobsResponse from a dict""" + """Create an instance of ListCurrentRunningRestoreJobs from a dict""" if obj is None: return None @@ -91,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "runningRestores": ( - [RestoreRunningRestore.from_dict(_item) for _item in obj["runningRestores"]] + [BackupRunningRestore.from_dict(_item) for _item in obj["runningRestores"]] if obj.get("runningRestores") is not None else None ) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_database.py similarity index 71% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/flavor.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/list_database.py index c02c1540b..4f952ae07 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/flavor.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_database.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,21 +18,21 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -class Flavor(BaseModel): +class ListDatabase(BaseModel): """ - Flavor + ListDatabase """ # noqa: E501 - cpu: Optional[StrictInt] = None - description: Optional[StrictStr] = None - id: Optional[StrictStr] = None - memory: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["cpu", "description", "id", "memory"] + created: StrictStr = Field(description="The date when the database was created in RFC3339 format.") + id: StrictInt = Field(description="The id of the database.") + name: StrictStr = Field(description="The name of the database.") + owner: StrictStr = Field(description="The owner of the database.") + __properties: ClassVar[List[str]] = ["created", "id", "name", "owner"] model_config = ConfigDict( validate_by_name=True, @@ -51,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Flavor from a JSON string""" + """Create an instance of ListDatabase from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Flavor from a dict""" + """Create an instance of ListDatabase from a dict""" if obj is None: return None @@ -83,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate( - { - "cpu": obj.get("cpu"), - "description": obj.get("description"), - "id": obj.get("id"), - "memory": obj.get("memory"), - } + {"created": obj.get("created"), "id": obj.get("id"), "name": obj.get("name"), "owner": obj.get("owner")} ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_databases_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_databases_response.py index 9da93a845..3df5cf400 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_databases_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_databases_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,12 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.database import Database +from stackit.sqlserverflex.models.list_database import ListDatabase +from stackit.sqlserverflex.models.pagination import Pagination class ListDatabasesResponse(BaseModel): @@ -30,8 +31,9 @@ class ListDatabasesResponse(BaseModel): ListDatabasesResponse """ # noqa: E501 - databases: Optional[List[Database]] = None - __properties: ClassVar[List[str]] = ["databases"] + databases: List[ListDatabase] = Field(description="A list containing all databases for the instance.") + pagination: Pagination + __properties: ClassVar[List[str]] = ["databases", "pagination"] model_config = ConfigDict( validate_by_name=True, @@ -77,6 +79,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_databases: _items.append(_item_databases.to_dict()) _dict["databases"] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict["pagination"] = self.pagination.to_dict() return _dict @classmethod @@ -91,10 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "databases": ( - [Database.from_dict(_item) for _item in obj["databases"]] + [ListDatabase.from_dict(_item) for _item in obj["databases"]] if obj.get("databases") is not None else None - ) + ), + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors.py similarity index 50% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors.py index cb019f594..f424d0e16 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,37 +22,37 @@ from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.acl import ACL -from stackit.sqlserverflex.models.flavor import Flavor -from stackit.sqlserverflex.models.storage import Storage +from stackit.sqlserverflex.models.flavor_storage_classes_storage_class import ( + FlavorStorageClassesStorageClass, +) -class Instance(BaseModel): +class ListFlavors(BaseModel): """ - Instance + The flavor of the instance containing the technical features. """ # noqa: E501 - acl: Optional[ACL] = None - backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule") - flavor: Optional[Flavor] = None - id: Optional[StrictStr] = None - name: Optional[StrictStr] = None - options: Optional[Dict[str, StrictStr]] = None - replicas: Optional[StrictInt] = None - status: Optional[StrictStr] = None - storage: Optional[Storage] = None - version: Optional[StrictStr] = None + cpu: StrictInt = Field(description="The cpu count of the instance.") + description: StrictStr = Field(description="The flavor description.") + id: StrictStr = Field(description="The id of the instance flavor.") + max_gb: StrictInt = Field( + description="maximum storage which can be ordered for the flavor in Gigabyte.", alias="maxGB" + ) + memory: StrictInt = Field(description="The memory of the instance in Gibibyte.") + min_gb: StrictInt = Field(description="minimum storage which is required to order in Gigabyte.", alias="minGB") + node_type: StrictStr = Field(description="defines the nodeType it can be either single or HA", alias="nodeType") + storage_classes: List[FlavorStorageClassesStorageClass] = Field( + description="maximum storage which can be ordered for the flavor in Gigabyte.", alias="storageClasses" + ) __properties: ClassVar[List[str]] = [ - "acl", - "backupSchedule", - "flavor", + "cpu", + "description", "id", - "name", - "options", - "replicas", - "status", - "storage", - "version", + "maxGB", + "memory", + "minGB", + "nodeType", + "storageClasses", ] model_config = ConfigDict( @@ -72,7 +72,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Instance from a JSON string""" + """Create an instance of ListFlavors from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -92,20 +92,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of acl - if self.acl: - _dict["acl"] = self.acl.to_dict() - # override the default output from pydantic by calling `to_dict()` of flavor - if self.flavor: - _dict["flavor"] = self.flavor.to_dict() - # override the default output from pydantic by calling `to_dict()` of storage - if self.storage: - _dict["storage"] = self.storage.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in storage_classes (list) + _items = [] + if self.storage_classes: + for _item_storage_classes in self.storage_classes: + if _item_storage_classes: + _items.append(_item_storage_classes.to_dict()) + _dict["storageClasses"] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Instance from a dict""" + """Create an instance of ListFlavors from a dict""" if obj is None: return None @@ -114,16 +112,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "acl": ACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None, - "backupSchedule": obj.get("backupSchedule"), - "flavor": Flavor.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, + "cpu": obj.get("cpu"), + "description": obj.get("description"), "id": obj.get("id"), - "name": obj.get("name"), - "options": obj.get("options"), - "replicas": obj.get("replicas"), - "status": obj.get("status"), - "storage": Storage.from_dict(obj["storage"]) if obj.get("storage") is not None else None, - "version": obj.get("version"), + "maxGB": obj.get("maxGB"), + "memory": obj.get("memory"), + "minGB": obj.get("minGB"), + "nodeType": obj.get("nodeType"), + "storageClasses": ( + [FlavorStorageClassesStorageClass.from_dict(_item) for _item in obj["storageClasses"]] + if obj.get("storageClasses") is not None + else None + ), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors_response.py index 8a77d199e..4ed42fc30 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_flavors_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,12 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.instance_flavor_entry import InstanceFlavorEntry +from stackit.sqlserverflex.models.list_flavors import ListFlavors +from stackit.sqlserverflex.models.pagination import Pagination class ListFlavorsResponse(BaseModel): @@ -30,8 +31,9 @@ class ListFlavorsResponse(BaseModel): ListFlavorsResponse """ # noqa: E501 - flavors: Optional[List[InstanceFlavorEntry]] = None - __properties: ClassVar[List[str]] = ["flavors"] + flavors: List[ListFlavors] = Field(description="List of flavors available for the project.") + pagination: Pagination + __properties: ClassVar[List[str]] = ["flavors", "pagination"] model_config = ConfigDict( validate_by_name=True, @@ -77,6 +79,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_flavors: _items.append(_item_flavors.to_dict()) _dict["flavors"] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict["pagination"] = self.pagination.to_dict() return _dict @classmethod @@ -91,10 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "flavors": ( - [InstanceFlavorEntry.from_dict(_item) for _item in obj["flavors"]] + [ListFlavors.from_dict(_item) for _item in obj["flavors"]] if obj.get("flavors") is not None else None - ) + ), + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/user_response_user.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_instance.py similarity index 70% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/user_response_user.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/list_instance.py index 97b70f574..743ae479a 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/user_response_user.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_instance.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,29 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, +) from pydantic_core import to_jsonable_python from typing_extensions import Self +from stackit.sqlserverflex.models.state import State -class UserResponseUser(BaseModel): + +class ListInstance(BaseModel): """ - UserResponseUser + ListInstance """ # noqa: E501 - default_database: Optional[StrictStr] = None - host: Optional[StrictStr] = None - id: Optional[StrictStr] = None - port: Optional[StrictInt] = None - roles: Optional[List[StrictStr]] = None - username: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["default_database", "host", "id", "port", "roles", "username"] + id: StrictStr = Field(description="The ID of the instance.") + is_deletable: StrictBool = Field(description="Whether the instance can be deleted or not.", alias="isDeletable") + name: StrictStr = Field(description="The name of the instance.") + state: State + __properties: ClassVar[List[str]] = ["id", "isDeletable", "name", "state"] model_config = ConfigDict( validate_by_name=True, @@ -53,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserResponseUser from a JSON string""" + """Create an instance of ListInstance from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserResponseUser from a dict""" + """Create an instance of ListInstance from a dict""" if obj is None: return None @@ -86,12 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "default_database": obj.get("default_database"), - "host": obj.get("host"), "id": obj.get("id"), - "port": obj.get("port"), - "roles": obj.get("roles"), - "username": obj.get("username"), + "isDeletable": obj.get("isDeletable"), + "name": obj.get("name"), + "state": obj.get("state"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_instances_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_instances_response.py index 48365a8cb..923c7927e 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_instances_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_instances_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,12 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictInt +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.instance_list_instance import InstanceListInstance +from stackit.sqlserverflex.models.list_instance import ListInstance +from stackit.sqlserverflex.models.pagination import Pagination class ListInstancesResponse(BaseModel): @@ -30,9 +31,9 @@ class ListInstancesResponse(BaseModel): ListInstancesResponse """ # noqa: E501 - count: Optional[StrictInt] = None - items: Optional[List[InstanceListInstance]] = None - __properties: ClassVar[List[str]] = ["count", "items"] + instances: List[ListInstance] = Field(description="List of owned instances and their current status.") + pagination: Pagination + __properties: ClassVar[List[str]] = ["instances", "pagination"] model_config = ConfigDict( validate_by_name=True, @@ -71,13 +72,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict["items"] = _items + if self.instances: + for _item_instances in self.instances: + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict["instances"] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict["pagination"] = self.pagination.to_dict() return _dict @classmethod @@ -91,12 +95,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "count": obj.get("count"), - "items": ( - [InstanceListInstance.from_dict(_item) for _item in obj["items"]] - if obj.get("items") is not None + "instances": ( + [ListInstance.from_dict(_item) for _item in obj["instances"]] + if obj.get("instances") is not None else None ), + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_metrics_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_metrics_response.py deleted file mode 100644 index 9760bad6c..000000000 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_metrics_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MSSQL Service API - - This is the documentation for the STACKIT MSSQL service - - The version of the OpenAPI document: 2.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict -from pydantic_core import to_jsonable_python -from typing_extensions import Self - -from stackit.sqlserverflex.models.host import Host - - -class ListMetricsResponse(BaseModel): - """ - ListMetricsResponse - """ # noqa: E501 - - hosts: Optional[List[Host]] = None - __properties: ClassVar[List[str]] = ["hosts"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListMetricsResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in hosts (list) - _items = [] - if self.hosts: - for _item_hosts in self.hosts: - if _item_hosts: - _items.append(_item_hosts.to_dict()) - _dict["hosts"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListMetricsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate( - {"hosts": [Host.from_dict(_item) for _item in obj["hosts"]] if obj.get("hosts") is not None else None} - ) - return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_roles_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_roles_response.py index 790957120..b0ea0f978 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_roles_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_roles_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,7 +18,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -28,7 +28,7 @@ class ListRolesResponse(BaseModel): ListRolesResponse """ # noqa: E501 - roles: Optional[List[StrictStr]] = None + roles: List[StrictStr] = Field(description="List of roles available for an instance.") __properties: ClassVar[List[str]] = ["roles"] model_config = ConfigDict( diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_storages_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_storages_response.py index 20d545456..22b12d3fa 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_storages_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_storages_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.storage_range import StorageRange +from stackit.sqlserverflex.models.flavor_storage_classes_storage_class import ( + FlavorStorageClassesStorageClass, +) +from stackit.sqlserverflex.models.flavor_storage_range import FlavorStorageRange class ListStoragesResponse(BaseModel): @@ -30,8 +33,10 @@ class ListStoragesResponse(BaseModel): ListStoragesResponse """ # noqa: E501 - storage_classes: Optional[List[StrictStr]] = Field(default=None, alias="storageClasses") - storage_range: Optional[StorageRange] = Field(default=None, alias="storageRange") + storage_classes: List[FlavorStorageClassesStorageClass] = Field( + description="maximum storage which can be ordered for the flavor in Gigabyte.", alias="storageClasses" + ) + storage_range: FlavorStorageRange = Field(alias="storageRange") __properties: ClassVar[List[str]] = ["storageClasses", "storageRange"] model_config = ConfigDict( @@ -71,6 +76,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in storage_classes (list) + _items = [] + if self.storage_classes: + for _item_storage_classes in self.storage_classes: + if _item_storage_classes: + _items.append(_item_storage_classes.to_dict()) + _dict["storageClasses"] = _items # override the default output from pydantic by calling `to_dict()` of storage_range if self.storage_range: _dict["storageRange"] = self.storage_range.to_dict() @@ -87,9 +99,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "storageClasses": obj.get("storageClasses"), + "storageClasses": ( + [FlavorStorageClassesStorageClass.from_dict(_item) for _item in obj["storageClasses"]] + if obj.get("storageClasses") is not None + else None + ), "storageRange": ( - StorageRange.from_dict(obj["storageRange"]) if obj.get("storageRange") is not None else None + FlavorStorageRange.from_dict(obj["storageRange"]) if obj.get("storageRange") is not None else None ), } ) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_user.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_user.py new file mode 100644 index 000000000..78b354785 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_user.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class ListUser(BaseModel): + """ + ListUser + """ # noqa: E501 + + id: StrictInt = Field(description="The ID of the user.") + status: StrictStr = Field(description="The current status of the user.") + username: StrictStr = Field(description="The name of the user.") + __properties: ClassVar[List[str]] = ["id", "status", "username"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "status": obj.get("status"), "username": obj.get("username")}) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_user_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_user_response.py new file mode 100644 index 000000000..61941203f --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_user_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from pydantic_core import to_jsonable_python +from typing_extensions import Self + +from stackit.sqlserverflex.models.list_user import ListUser +from stackit.sqlserverflex.models.pagination import Pagination + + +class ListUserResponse(BaseModel): + """ + ListUserResponse + """ # noqa: E501 + + pagination: Pagination + users: List[ListUser] = Field(description="List of all users inside an instance") + __properties: ClassVar[List[str]] = ["pagination", "users"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict["pagination"] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict["users"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "users": ( + [ListUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + ), + } + ) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_versions_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_versions_response.py index 76687d45e..b3d6a9b5b 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/list_versions_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/list_versions_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,17 +18,19 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field from pydantic_core import to_jsonable_python from typing_extensions import Self +from stackit.sqlserverflex.models.version import Version + class ListVersionsResponse(BaseModel): """ ListVersionsResponse """ # noqa: E501 - versions: Optional[List[StrictStr]] = None + versions: List[Version] = Field(description="A list containing available sqlserver versions.") __properties: ClassVar[List[str]] = ["versions"] model_config = ConfigDict( @@ -68,6 +70,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in versions (list) + _items = [] + if self.versions: + for _item_versions in self.versions: + if _item_versions: + _items.append(_item_versions.to_dict()) + _dict["versions"] = _items return _dict @classmethod @@ -79,5 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"versions": obj.get("versions")}) + _obj = cls.model_validate( + { + "versions": ( + [Version.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None + ) + } + ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_storage.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/pagination.py similarity index 75% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_storage.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/pagination.py index b8d4c32ac..34d108288 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_storage.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/pagination.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,16 +23,17 @@ from typing_extensions import Self -class InstanceDocumentationStorage(BaseModel): +class Pagination(BaseModel): """ - InstanceDocumentationStorage + Pagination """ # noqa: E501 - var_class: Optional[StrictStr] = Field( - default="premium-perf12-stackit", description="Class of the instance.", alias="class" - ) - size: Optional[StrictInt] = Field(default=None, description="Size of the instance storage in GB") - __properties: ClassVar[List[str]] = ["class", "size"] + page: StrictInt + size: StrictInt + sort: StrictStr + total_pages: StrictInt = Field(alias="totalPages") + total_rows: StrictInt = Field(alias="totalRows") + __properties: ClassVar[List[str]] = ["page", "size", "sort", "totalPages", "totalRows"] model_config = ConfigDict( validate_by_name=True, @@ -51,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceDocumentationStorage from a JSON string""" + """Create an instance of Pagination from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceDocumentationStorage from a dict""" + """Create an instance of Pagination from a dict""" if obj is None: return None @@ -84,8 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "class": obj.get("class") if obj.get("class") is not None else "premium-perf12-stackit", + "page": obj.get("page"), "size": obj.get("size"), + "sort": obj.get("sort"), + "totalPages": obj.get("totalPages"), + "totalRows": obj.get("totalRows"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload.py index a4fbfc5d2..387d91d2d 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,15 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python -from typing_extensions import Self +from typing_extensions import Annotated, Self -from stackit.sqlserverflex.models.instance_documentation_acl import ( - InstanceDocumentationACL, +from stackit.sqlserverflex.models.instance_version_opt import InstanceVersionOpt +from stackit.sqlserverflex.models.partial_update_instance_payload_network import ( + PartialUpdateInstancePayloadNetwork, ) +from stackit.sqlserverflex.models.storage_update import StorageUpdate class PartialUpdateInstancePayload(BaseModel): @@ -32,20 +34,31 @@ class PartialUpdateInstancePayload(BaseModel): PartialUpdateInstancePayload """ # noqa: E501 - acl: Optional[InstanceDocumentationACL] = Field( - default=None, - description="ACL is the Access Control List defining the IP ranges allowed to connect to the database", - ) backup_schedule: Optional[StrictStr] = Field( default=None, - description="Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59", + description="The schedule on which time the daily backup is being executed. The schedule is written as a cron schedule.", alias="backupSchedule", ) - flavor_id: Optional[StrictStr] = Field(default=None, description="Id of the selected flavor", alias="flavorId") - labels: Optional[Dict[str, Any]] = Field(default=None, description="Labels for the instance") - name: Optional[StrictStr] = Field(default=None, description="Name of the instance") - version: Optional[StrictStr] = Field(default="2022", description="Version of the MSSQL Server") - __properties: ClassVar[List[str]] = ["acl", "backupSchedule", "flavorId", "labels", "name", "version"] + flavor_id: Optional[StrictStr] = Field(default=None, description="The id of the instance flavor.", alias="flavorId") + labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field( + default=None, + description="A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` ", + ) + name: Optional[StrictStr] = Field(default=None, description="The name of the instance.") + network: Optional[PartialUpdateInstancePayloadNetwork] = None + retention_days: Optional[StrictInt] = Field(default=None, alias="retentionDays") + storage: Optional[StorageUpdate] = None + version: Optional[InstanceVersionOpt] = None + __properties: ClassVar[List[str]] = [ + "backupSchedule", + "flavorId", + "labels", + "name", + "network", + "retentionDays", + "storage", + "version", + ] model_config = ConfigDict( validate_by_name=True, @@ -84,9 +97,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of acl - if self.acl: - _dict["acl"] = self.acl.to_dict() + # override the default output from pydantic by calling `to_dict()` of network + if self.network: + _dict["network"] = self.network.to_dict() + # override the default output from pydantic by calling `to_dict()` of storage + if self.storage: + _dict["storage"] = self.storage.to_dict() return _dict @classmethod @@ -100,12 +116,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "acl": InstanceDocumentationACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None, "backupSchedule": obj.get("backupSchedule"), "flavorId": obj.get("flavorId"), "labels": obj.get("labels"), "name": obj.get("name"), - "version": obj.get("version") if obj.get("version") is not None else "2022", + "network": ( + PartialUpdateInstancePayloadNetwork.from_dict(obj["network"]) + if obj.get("network") is not None + else None + ), + "retentionDays": obj.get("retentionDays"), + "storage": StorageUpdate.from_dict(obj["storage"]) if obj.get("storage") is not None else None, + "version": obj.get("version"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/database.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload_network.py similarity index 78% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/database.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload_network.py index 0d2dfdb65..982a2f3ff 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/database.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/partial_update_instance_payload_network.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,15 +23,13 @@ from typing_extensions import Self -class Database(BaseModel): +class PartialUpdateInstancePayloadNetwork(BaseModel): """ - Database + the network configuration of the instance. """ # noqa: E501 - id: Optional[StrictStr] = None - name: Optional[StrictStr] = None - options: Optional[Dict[str, Any]] = Field(default=None, description="Database specific options") - __properties: ClassVar[List[str]] = ["id", "name", "options"] + acl: Optional[List[StrictStr]] = Field(default=None, description="List of IPV4 cidr.") + __properties: ClassVar[List[str]] = ["acl"] model_config = ConfigDict( validate_by_name=True, @@ -50,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Database from a JSON string""" + """Create an instance of PartialUpdateInstancePayloadNetwork from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,12 +72,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Database from a dict""" + """Create an instance of PartialUpdateInstancePayloadNetwork from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "options": obj.get("options")}) + _obj = cls.model_validate({"acl": obj.get("acl")}) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/replicas.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/replicas.py new file mode 100644 index 000000000..0246b9bda --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/replicas.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class Replicas(int, Enum): + """ + How many replicas the instance should have. + """ + + """ + allowed enum values + """ + NUMBER_1 = 1 + NUMBER_3 = 3 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Replicas from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/reset_user_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/reset_user_response.py index 74f706024..61ec183b6 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/reset_user_response.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/reset_user_response.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,20 +18,21 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.single_user import SingleUser - class ResetUserResponse(BaseModel): """ ResetUserResponse """ # noqa: E501 - item: Optional[SingleUser] = None - __properties: ClassVar[List[str]] = ["item"] + password: StrictStr = Field(description="The password for the user.") + status: StrictStr = Field(description="The current status of the user.") + uri: StrictStr = Field(description="The connection string for the user to the instance.") + username: StrictStr = Field(description="The name of the user.") + __properties: ClassVar[List[str]] = ["password", "status", "uri", "username"] model_config = ConfigDict( validate_by_name=True, @@ -70,9 +71,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of item - if self.item: - _dict["item"] = self.item.to_dict() return _dict @classmethod @@ -84,5 +82,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"item": SingleUser.from_dict(obj["item"]) if obj.get("item") is not None else None}) + _obj = cls.model_validate( + { + "password": obj.get("password"), + "status": obj.get("status"), + "uri": obj.get("uri"), + "username": obj.get("username"), + } + ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/host.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload.py similarity index 69% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/host.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload.py index 7baaa5630..156a599f2 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/host.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,17 +22,19 @@ from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.host_metric import HostMetric +from stackit.sqlserverflex.models.restore_database_from_backup_payload_source import ( + RestoreDatabaseFromBackupPayloadSource, +) -class Host(BaseModel): +class RestoreDatabaseFromBackupPayload(BaseModel): """ - Host + Request to restore a database. """ # noqa: E501 - host_metrics: Optional[List[HostMetric]] = Field(default=None, alias="hostMetrics") - id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["hostMetrics", "id"] + database_name: StrictStr = Field(description="The name of the database on the instance to be restore.") + source: RestoreDatabaseFromBackupPayloadSource + __properties: ClassVar[List[str]] = ["database_name", "source"] model_config = ConfigDict( validate_by_name=True, @@ -51,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Host from a JSON string""" + """Create an instance of RestoreDatabaseFromBackupPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,18 +73,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in host_metrics (list) - _items = [] - if self.host_metrics: - for _item_host_metrics in self.host_metrics: - if _item_host_metrics: - _items.append(_item_host_metrics.to_dict()) - _dict["hostMetrics"] = _items + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict["source"] = self.source.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Host from a dict""" + """Create an instance of RestoreDatabaseFromBackupPayload from a dict""" if obj is None: return None @@ -91,12 +89,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "hostMetrics": ( - [HostMetric.from_dict(_item) for _item in obj["hostMetrics"]] - if obj.get("hostMetrics") is not None + "database_name": obj.get("database_name"), + "source": ( + RestoreDatabaseFromBackupPayloadSource.from_dict(obj["source"]) + if obj.get("source") is not None else None ), - "id": obj.get("id"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py new file mode 100644 index 000000000..65a92b07c --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.sqlserverflex.models.source_backup import SourceBackup +from stackit.sqlserverflex.models.source_external_s3 import SourceExternalS3 + + +RESTOREDATABASEFROMBACKUPPAYLOADSOURCE_ONE_OF_SCHEMAS = ["SourceBackup", "SourceExternalS3"] + + +class RestoreDatabaseFromBackupPayloadSource(BaseModel): + """ + The source of the restore. + """ + + # data type: SourceBackup + oneof_schema_1_validator: Optional[SourceBackup] = None + # data type: SourceExternalS3 + oneof_schema_2_validator: Optional[SourceExternalS3] = None + actual_instance: Optional[Union[SourceBackup, SourceExternalS3]] = None + one_of_schemas: Set[str] = {"SourceBackup", "SourceExternalS3"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + discriminator_value_class_map: Dict[str, str] = {} + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = RestoreDatabaseFromBackupPayloadSource.model_construct() + error_messages = [] + match = 0 + # validate data type: SourceBackup + if not isinstance(v, SourceBackup): + error_messages.append(f"Error! Input type `{type(v)}` is not `SourceBackup`") + else: + match += 1 + # validate data type: SourceExternalS3 + if not isinstance(v, SourceExternalS3): + error_messages.append(f"Error! Input type `{type(v)}` is not `SourceExternalS3`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in RestoreDatabaseFromBackupPayloadSource with oneOf schemas: SourceBackup, SourceExternalS3. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SourceBackup + try: + instance.actual_instance = SourceBackup.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SourceExternalS3 + try: + instance.actual_instance = SourceExternalS3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into RestoreDatabaseFromBackupPayloadSource with oneOf schemas: SourceBackup, SourceExternalS3. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into RestoreDatabaseFromBackupPayloadSource with oneOf schemas: SourceBackup, SourceExternalS3. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SourceBackup, SourceExternalS3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/s3file_info.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/s3file_info.py new file mode 100644 index 000000000..12d7a1485 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/s3file_info.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class S3fileInfo(BaseModel): + """ + S3fileInfo + """ # noqa: E501 + + file_number: Optional[StrictInt] = Field(default=None, description="The sequence number of the file") + file_path: Optional[StrictStr] = Field(default=None, description="The path to the file on the S3 bucket") + __properties: ClassVar[List[str]] = ["file_number", "file_path"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of S3fileInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of S3fileInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"file_number": obj.get("file_number"), "file_path": obj.get("file_path")}) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/single_user.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/single_user.py deleted file mode 100644 index 5d83d724d..000000000 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/single_user.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MSSQL Service API - - This is the documentation for the STACKIT MSSQL service - - The version of the OpenAPI document: 2.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from pydantic_core import to_jsonable_python -from typing_extensions import Self - - -class SingleUser(BaseModel): - """ - SingleUser - """ # noqa: E501 - - default_database: Optional[StrictStr] = None - host: Optional[StrictStr] = None - id: Optional[StrictStr] = None - password: Optional[StrictStr] = None - port: Optional[StrictInt] = None - roles: Optional[List[StrictStr]] = None - uri: Optional[StrictStr] = None - username: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "default_database", - "host", - "id", - "password", - "port", - "roles", - "uri", - "username", - ] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SingleUser from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SingleUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate( - { - "default_database": obj.get("default_database"), - "host": obj.get("host"), - "id": obj.get("id"), - "password": obj.get("password"), - "port": obj.get("port"), - "roles": obj.get("roles"), - "uri": obj.get("uri"), - "username": obj.get("username"), - } - ) - return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/source_backup.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/source_backup.py new file mode 100644 index 000000000..dcb432a15 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/source_backup.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class SourceBackup(BaseModel): + """ + Restore from an existing managed backup. + """ # noqa: E501 + + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["BACKUP"]): + raise ValueError("must be one of enum values ('BACKUP')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SourceBackup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SourceBackup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type")}) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/source_external_s3.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/source_external_s3.py new file mode 100644 index 000000000..935713ed0 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/source_external_s3.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic_core import to_jsonable_python +from typing_extensions import Self + +from stackit.sqlserverflex.models.external_s3 import ExternalS3 + + +class SourceExternalS3(BaseModel): + """ + Restore from an external S3 backup file. + """ # noqa: E501 + + database_owner: StrictStr = Field(description="The owner of the database.") + logging_guid: Optional[StrictStr] = Field( + default=None, description="Logging guid to have a complete activity log over all sub stored procedures." + ) + s3_details: ExternalS3 + type: StrictStr + __properties: ClassVar[List[str]] = ["database_owner", "logging_guid", "s3_details", "type"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["EXTERNAL_S3"]): + raise ValueError("must be one of enum values ('EXTERNAL_S3')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SourceExternalS3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of s3_details + if self.s3_details: + _dict["s3_details"] = self.s3_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SourceExternalS3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "database_owner": obj.get("database_owner"), + "logging_guid": obj.get("logging_guid"), + "s3_details": ExternalS3.from_dict(obj["s3_details"]) if obj.get("s3_details") is not None else None, + "type": obj.get("type"), + } + ) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/state.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/state.py new file mode 100644 index 000000000..2b5fcb3b7 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/state.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class State(str, Enum): + """ + State + """ + + """ + allowed enum values + """ + READY = "READY" + PENDING = "PENDING" + PROGRESSING = "PROGRESSING" + FAILURE = "FAILURE" + UNKNOWN = "UNKNOWN" + TERMINATING = "TERMINATING" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of State from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/storage.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/storage.py index 8f1d2ab10..d8e0666d2 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/storage.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/storage.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -25,11 +25,13 @@ class Storage(BaseModel): """ - Storage + The object containing information about the storage size and class. """ # noqa: E501 - var_class: Optional[StrictStr] = Field(default=None, alias="class") - size: Optional[StrictInt] = None + var_class: Optional[StrictStr] = Field( + default=None, description="The storage class for the storage.", alias="class" + ) + size: Optional[StrictInt] = Field(default=None, description="The storage size in Gigabytes.") __properties: ClassVar[List[str]] = ["class", "size"] model_config = ConfigDict( diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_create.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_create.py new file mode 100644 index 000000000..ad9570d69 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_create.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class StorageCreate(BaseModel): + """ + The object containing information about the storage size and class. + """ # noqa: E501 + + var_class: StrictStr = Field(description="The storage class for the storage.", alias="class") + size: StrictInt = Field(description="The storage size in Gigabytes.") + __properties: ClassVar[List[str]] = ["class", "size"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"class": obj.get("class"), "size": obj.get("size")}) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/acl.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_update.py similarity index 78% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/acl.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/storage_update.py index 552e458a4..ebb7c5fd3 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/acl.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/storage_update.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,18 +18,18 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt from pydantic_core import to_jsonable_python from typing_extensions import Self -class ACL(BaseModel): +class StorageUpdate(BaseModel): """ - ACL + The object containing information about the storage size and class. """ # noqa: E501 - items: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["items"] + size: Optional[StrictInt] = Field(default=None, description="The storage size in Gigabytes.") + __properties: ClassVar[List[str]] = ["size"] model_config = ConfigDict( validate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ACL from a JSON string""" + """Create an instance of StorageUpdate from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,12 +72,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ACL from a dict""" + """Create an instance of StorageUpdate from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"items": obj.get("items")}) + _obj = cls.model_validate({"size": obj.get("size")}) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/trigger_database_restore_payload.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/trigger_restore_payload.py similarity index 82% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/trigger_database_restore_payload.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/trigger_restore_payload.py index 6519725f1..24029104f 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/trigger_database_restore_payload.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/trigger_restore_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,14 +23,15 @@ from typing_extensions import Self -class TriggerDatabaseRestorePayload(BaseModel): +class TriggerRestorePayload(BaseModel): """ - TriggerDatabaseRestorePayload + TriggerRestorePayload """ # noqa: E501 - name: StrictStr = Field(description="Name for the restored database no overwrite allowed at the moment") + name: StrictStr = Field(description="The name of the database.") restore_date_time: StrictStr = Field( - description="Time of the restore point formate RFC3339", alias="restoreDateTime" + description="the time for the restore it will be calculated between first backup and last backup", + alias="restoreDateTime", ) __properties: ClassVar[List[str]] = ["name", "restoreDateTime"] @@ -51,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TriggerDatabaseRestorePayload from a JSON string""" + """Create an instance of TriggerRestorePayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TriggerDatabaseRestorePayload from a dict""" + """Create an instance of TriggerRestorePayload from a dict""" if obj is None: return None diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload.py index 580ac6633..688fb51aa 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,14 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from pydantic_core import to_jsonable_python -from typing_extensions import Self +from typing_extensions import Annotated, Self -from stackit.sqlserverflex.models.instance_documentation_acl import ( - InstanceDocumentationACL, +from stackit.sqlserverflex.models.instance_version import InstanceVersion +from stackit.sqlserverflex.models.storage_update import StorageUpdate +from stackit.sqlserverflex.models.update_instance_payload_network import ( + UpdateInstancePayloadNetwork, ) @@ -32,18 +34,33 @@ class UpdateInstancePayload(BaseModel): UpdateInstancePayload """ # noqa: E501 - acl: InstanceDocumentationACL = Field( - description="ACL is the Access Control List defining the IP ranges allowed to connect to the database" - ) backup_schedule: StrictStr = Field( - description="Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59", + description="The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.", alias="backupSchedule", ) - flavor_id: StrictStr = Field(description="Id of the selected flavor", alias="flavorId") - labels: Dict[str, Any] = Field(description="Labels for the instance") - name: StrictStr = Field(description="Name of the instance") - version: StrictStr = Field(description="Version of the MSSQL Server") - __properties: ClassVar[List[str]] = ["acl", "backupSchedule", "flavorId", "labels", "name", "version"] + flavor_id: StrictStr = Field(description="The id of the instance flavor.", alias="flavorId") + labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field( + default=None, + description="A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` ", + ) + name: StrictStr = Field(description="The name of the instance.") + network: UpdateInstancePayloadNetwork + retention_days: StrictInt = Field( + description="The days for how long the backup files should be stored before cleaned up. 30 to 90", + alias="retentionDays", + ) + storage: StorageUpdate + version: InstanceVersion + __properties: ClassVar[List[str]] = [ + "backupSchedule", + "flavorId", + "labels", + "name", + "network", + "retentionDays", + "storage", + "version", + ] model_config = ConfigDict( validate_by_name=True, @@ -82,9 +99,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of acl - if self.acl: - _dict["acl"] = self.acl.to_dict() + # override the default output from pydantic by calling `to_dict()` of network + if self.network: + _dict["network"] = self.network.to_dict() + # override the default output from pydantic by calling `to_dict()` of storage + if self.storage: + _dict["storage"] = self.storage.to_dict() return _dict @classmethod @@ -98,12 +118,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "acl": InstanceDocumentationACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None, "backupSchedule": obj.get("backupSchedule"), "flavorId": obj.get("flavorId"), "labels": obj.get("labels"), "name": obj.get("name"), - "version": obj.get("version") if obj.get("version") is not None else "2022", + "network": ( + UpdateInstancePayloadNetwork.from_dict(obj["network"]) if obj.get("network") is not None else None + ), + "retentionDays": obj.get("retentionDays"), + "storage": StorageUpdate.from_dict(obj["storage"]) if obj.get("storage") is not None else None, + "version": obj.get("version"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_acl.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload_network.py similarity index 80% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_acl.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload_network.py index 862d6b23d..228f596be 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_documentation_acl.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_payload_network.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,13 +23,13 @@ from typing_extensions import Self -class InstanceDocumentationACL(BaseModel): +class UpdateInstancePayloadNetwork(BaseModel): """ - InstanceDocumentationACL + the network configuration of the instance. """ # noqa: E501 - items: Optional[List[StrictStr]] = Field(default=None, description="a simple list with IP addresses with CIDR.") - __properties: ClassVar[List[str]] = ["items"] + acl: List[StrictStr] = Field(description="List of IPV4 cidr.") + __properties: ClassVar[List[str]] = ["acl"] model_config = ConfigDict( validate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceDocumentationACL from a JSON string""" + """Create an instance of UpdateInstancePayloadNetwork from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,12 +72,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceDocumentationACL from a dict""" + """Create an instance of UpdateInstancePayloadNetwork from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"items": obj.get("items")}) + _obj = cls.model_validate({"acl": obj.get("acl")}) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_list_instance.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_payload.py similarity index 76% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_list_instance.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_payload.py index 61ff3bc59..77151d7a2 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_list_instance.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_payload.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,20 +18,18 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool from pydantic_core import to_jsonable_python from typing_extensions import Self -class InstanceListInstance(BaseModel): +class UpdateInstanceProtectionPayload(BaseModel): """ - InstanceListInstance + UpdateInstanceProtectionPayload """ # noqa: E501 - id: Optional[StrictStr] = None - name: Optional[StrictStr] = None - status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name", "status"] + is_deletable: StrictBool = Field(description="Protect instance from deletion.", alias="isDeletable") + __properties: ClassVar[List[str]] = ["isDeletable"] model_config = ConfigDict( validate_by_name=True, @@ -50,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceListInstance from a JSON string""" + """Create an instance of UpdateInstanceProtectionPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,12 +72,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceListInstance from a dict""" + """Create an instance of UpdateInstanceProtectionPayload from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "status": obj.get("status")}) + _obj = cls.model_validate({"isDeletable": obj.get("isDeletable")}) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_response.py new file mode 100644 index 000000000..53286e1d1 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_protection_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class UpdateInstanceProtectionResponse(BaseModel): + """ + UpdateInstanceProtectionResponse + """ # noqa: E501 + + is_deletable: StrictBool = Field(description="Protect instance from deletion.", alias="isDeletable") + __properties: ClassVar[List[str]] = ["isDeletable"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateInstanceProtectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateInstanceProtectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"isDeletable": obj.get("isDeletable")}) + return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_response.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_response.py deleted file mode 100644 index f7782e5cd..000000000 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/update_instance_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MSSQL Service API - - This is the documentation for the STACKIT MSSQL service - - The version of the OpenAPI document: 2.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict -from pydantic_core import to_jsonable_python -from typing_extensions import Self - -from stackit.sqlserverflex.models.instance import Instance - - -class UpdateInstanceResponse(BaseModel): - """ - UpdateInstanceResponse - """ # noqa: E501 - - item: Optional[Instance] = None - __properties: ClassVar[List[str]] = ["item"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateInstanceResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of item - if self.item: - _dict["item"] = self.item.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateInstanceResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({"item": Instance.from_dict(obj["item"]) if obj.get("item") is not None else None}) - return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/user.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/user.py deleted file mode 100644 index e8864ebc7..000000000 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/user.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MSSQL Service API - - This is the documentation for the STACKIT MSSQL service - - The version of the OpenAPI document: 2.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from pydantic_core import to_jsonable_python -from typing_extensions import Self - - -class User(BaseModel): - """ - User - """ # noqa: E501 - - database: Optional[StrictStr] = None - host: Optional[StrictStr] = None - id: Optional[StrictStr] = None - password: Optional[StrictStr] = None - port: Optional[StrictInt] = None - roles: Optional[List[StrictStr]] = None - uri: Optional[StrictStr] = None - username: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["database", "host", "id", "password", "port", "roles", "uri", "username"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of User from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of User from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate( - { - "database": obj.get("database"), - "host": obj.get("host"), - "id": obj.get("id"), - "password": obj.get("password"), - "port": obj.get("port"), - "roles": obj.get("roles"), - "uri": obj.get("uri"), - "username": obj.get("username"), - } - ) - return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/user_sort.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/user_sort.py new file mode 100644 index 000000000..7cfb19db6 --- /dev/null +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/user_sort.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + STACKIT MSSQL Service API + + This is the documentation for the STACKIT MSSQL service + + The version of the OpenAPI document: 3.0.0 + Contact: support@stackit.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class UserSort(str, Enum): + """ + UserSort + """ + + """ + allowed enum values + """ + ID_DOT_ASC = "id.asc" + ID_DOT_DESC = "id.desc" + INDEX_DOT_DESC = "index.desc" + INDEX_DOT_ASC = "index.asc" + NAME_DOT_DESC = "name.desc" + NAME_DOT_ASC = "name.asc" + STATUS_DOT_DESC = "status.desc" + STATUS_DOT_ASC = "status.asc" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserSort from a JSON string""" + return cls(json.loads(json_str)) diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/host_metric.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/validation_error.py similarity index 64% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/host_metric.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/validation_error.py index 19366a03e..a4e135d11 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/host_metric.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/validation_error.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,22 +18,25 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt from pydantic_core import to_jsonable_python from typing_extensions import Self -from stackit.sqlserverflex.models.data_point import DataPoint +from stackit.sqlserverflex.models.validation_error_validation_inner import ( + ValidationErrorValidationInner, +) -class HostMetric(BaseModel): +class ValidationError(BaseModel): """ - HostMetric + ValidationError """ # noqa: E501 - datapoints: Optional[List[DataPoint]] = None - name: Optional[StrictStr] = None - units: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["datapoints", "name", "units"] + code: StrictInt = Field(description="the http error should be always 422 for validationError") + validation: List[ValidationErrorValidationInner] = Field( + description="errors for all fields where the error happened" + ) + __properties: ClassVar[List[str]] = ["code", "validation"] model_config = ConfigDict( validate_by_name=True, @@ -52,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HostMetric from a JSON string""" + """Create an instance of ValidationError from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,18 +75,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in datapoints (list) + # override the default output from pydantic by calling `to_dict()` of each item in validation (list) _items = [] - if self.datapoints: - for _item_datapoints in self.datapoints: - if _item_datapoints: - _items.append(_item_datapoints.to_dict()) - _dict["datapoints"] = _items + if self.validation: + for _item_validation in self.validation: + if _item_validation: + _items.append(_item_validation.to_dict()) + _dict["validation"] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HostMetric from a dict""" + """Create an instance of ValidationError from a dict""" if obj is None: return None @@ -92,13 +95,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "datapoints": ( - [DataPoint.from_dict(_item) for _item in obj["datapoints"]] - if obj.get("datapoints") is not None + "code": obj.get("code"), + "validation": ( + [ValidationErrorValidationInner.from_dict(_item) for _item in obj["validation"]] + if obj.get("validation") is not None else None ), - "name": obj.get("name"), - "units": obj.get("units"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_list_user.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/validation_error_validation_inner.py similarity index 77% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/instance_list_user.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/validation_error_validation_inner.py index 53f11ccdd..3f4ad2e75 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/instance_list_user.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/validation_error_validation_inner.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,19 +18,19 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self -class InstanceListUser(BaseModel): +class ValidationErrorValidationInner(BaseModel): """ - InstanceListUser + ValidationErrorValidationInner """ # noqa: E501 - id: Optional[StrictStr] = None - username: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "username"] + var_field: StrictStr = Field(alias="field") + message: StrictStr + __properties: ClassVar[List[str]] = ["field", "message"] model_config = ConfigDict( validate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceListUser from a JSON string""" + """Create an instance of ValidationErrorValidationInner from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,12 +73,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceListUser from a dict""" + """Create an instance of ValidationErrorValidationInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "username": obj.get("username")}) + _obj = cls.model_validate({"field": obj.get("field"), "message": obj.get("message")}) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/models/database_options.py b/services/sqlserverflex/src/stackit/sqlserverflex/models/version.py similarity index 64% rename from services/sqlserverflex/src/stackit/sqlserverflex/models/database_options.py rename to services/sqlserverflex/src/stackit/sqlserverflex/models/version.py index 0db92d52f..df10df30e 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/models/database_options.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/models/version.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,24 +18,31 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, +) from pydantic_core import to_jsonable_python from typing_extensions import Self -class DatabaseOptions(BaseModel): +class Version(BaseModel): """ - DatabaseOptions + The version of the sqlserver instance and more details. """ # noqa: E501 - collation_name: Optional[StrictStr] = Field( - default=None, description="Name of the collation of the database", alias="collationName" + beta: StrictBool = Field( + description="Flag if the version is a beta version. If set the version may contain bugs and is not fully tested." ) - compatibility_level: Optional[StrictInt] = Field( - default=None, description="CompatibilityLevel of the Database.", alias="compatibilityLevel" + deprecated: StrictStr = Field( + description="Timestamp in RFC3339 format which says when the version will no longer be supported by STACKIT." ) - owner: Optional[StrictStr] = Field(default=None, description="Name of the owner of the database.") - __properties: ClassVar[List[str]] = ["collationName", "compatibilityLevel", "owner"] + recommend: StrictBool = Field(description="Flag if the version is recommend by the STACKIT Team.") + version: StrictStr = Field(description="The sqlserver version used for the instance.") + __properties: ClassVar[List[str]] = ["beta", "deprecated", "recommend", "version"] model_config = ConfigDict( validate_by_name=True, @@ -54,7 +61,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatabaseOptions from a JSON string""" + """Create an instance of Version from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatabaseOptions from a dict""" + """Create an instance of Version from a dict""" if obj is None: return None @@ -87,9 +94,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "collationName": obj.get("collationName"), - "compatibilityLevel": obj.get("compatibilityLevel"), - "owner": obj.get("owner"), + "beta": obj.get("beta"), + "deprecated": obj.get("deprecated"), + "recommend": obj.get("recommend"), + "version": obj.get("version"), } ) return _obj diff --git a/services/sqlserverflex/src/stackit/sqlserverflex/rest.py b/services/sqlserverflex/src/stackit/sqlserverflex/rest.py index d827c66bd..cb1b6d8dc 100644 --- a/services/sqlserverflex/src/stackit/sqlserverflex/rest.py +++ b/services/sqlserverflex/src/stackit/sqlserverflex/rest.py @@ -5,7 +5,7 @@ This is the documentation for the STACKIT MSSQL service - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 3.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech)