From 20e9a00c9488e3681c5f3d1430f4054ea4e6906c Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 1 Jul 2025 14:33:20 +0000 Subject: [PATCH] Generate mariadb --- .../mariadb/src/stackit/mariadb/__init__.py | 147 ++++++++++++----- .../src/stackit/mariadb/api/default_api.py | 154 +++++++++--------- .../mariadb/src/stackit/mariadb/api_client.py | 23 ++- .../src/stackit/mariadb/configuration.py | 44 +++-- .../mariadb/src/stackit/mariadb/exceptions.py | 23 ++- .../src/stackit/mariadb/models/__init__.py | 2 +- .../src/stackit/mariadb/models/backup.py | 4 +- .../models/create_backup_response_item.py | 4 +- .../mariadb/models/create_instance_payload.py | 4 +- .../models/create_instance_response.py | 4 +- .../src/stackit/mariadb/models/credentials.py | 4 +- .../mariadb/models/credentials_list_item.py | 4 +- .../mariadb/models/credentials_response.py | 4 +- .../src/stackit/mariadb/models/error.py | 4 +- .../mariadb/models/get_metrics_response.py | 4 +- .../src/stackit/mariadb/models/instance.py | 4 +- .../mariadb/models/instance_last_operation.py | 4 +- .../mariadb/models/instance_parameters.py | 4 +- .../stackit/mariadb/models/instance_schema.py | 4 +- .../mariadb/models/list_backups_response.py | 4 +- .../models/list_credentials_response.py | 4 +- .../mariadb/models/list_instances_response.py | 4 +- .../mariadb/models/list_offerings_response.py | 4 +- .../mariadb/models/list_restores_response.py | 4 +- .../stackit/mariadb/models/model_schema.py | 4 +- .../src/stackit/mariadb/models/offering.py | 4 +- .../models/partial_update_instance_payload.py | 4 +- .../src/stackit/mariadb/models/plan.py | 4 +- .../stackit/mariadb/models/raw_credentials.py | 4 +- .../src/stackit/mariadb/models/restore.py | 4 +- .../models/trigger_restore_response.py | 4 +- .../models/update_backups_config_payload.py | 4 +- .../models/update_backups_config_response.py | 4 +- services/mariadb/src/stackit/mariadb/rest.py | 4 +- 34 files changed, 313 insertions(+), 192 deletions(-) diff --git a/services/mariadb/src/stackit/mariadb/__init__.py b/services/mariadb/src/stackit/mariadb/__init__.py index b1f3f018..6e397a4a 100644 --- a/services/mariadb/src/stackit/mariadb/__init__.py +++ b/services/mariadb/src/stackit/mariadb/__init__.py @@ -11,58 +11,125 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 __version__ = "1.0.0" +# Define package exports +__all__ = [ + "DefaultApi", + "ApiResponse", + "ApiClient", + "HostConfiguration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "Backup", + "CreateBackupResponseItem", + "CreateInstancePayload", + "CreateInstanceResponse", + "Credentials", + "CredentialsListItem", + "CredentialsResponse", + "Error", + "GetMetricsResponse", + "Instance", + "InstanceLastOperation", + "InstanceParameters", + "InstanceSchema", + "ListBackupsResponse", + "ListCredentialsResponse", + "ListInstancesResponse", + "ListOfferingsResponse", + "ListRestoresResponse", + "ModelSchema", + "Offering", + "PartialUpdateInstancePayload", + "Plan", + "RawCredentials", + "Restore", + "TriggerRestoreResponse", + "UpdateBackupsConfigPayload", + "UpdateBackupsConfigResponse", +] + # import apis into sdk package -from stackit.mariadb.api.default_api import DefaultApi -from stackit.mariadb.api_client import ApiClient +from stackit.mariadb.api.default_api import DefaultApi as DefaultApi +from stackit.mariadb.api_client import ApiClient as ApiClient # import ApiClient -from stackit.mariadb.api_response import ApiResponse -from stackit.mariadb.configuration import HostConfiguration -from stackit.mariadb.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.mariadb.api_response import ApiResponse as ApiResponse +from stackit.mariadb.configuration import HostConfiguration as HostConfiguration +from stackit.mariadb.exceptions import ApiAttributeError as ApiAttributeError +from stackit.mariadb.exceptions import ApiException as ApiException +from stackit.mariadb.exceptions import ApiKeyError as ApiKeyError +from stackit.mariadb.exceptions import ApiTypeError as ApiTypeError +from stackit.mariadb.exceptions import ApiValueError as ApiValueError +from stackit.mariadb.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.mariadb.models.backup import Backup -from stackit.mariadb.models.create_backup_response_item import CreateBackupResponseItem -from stackit.mariadb.models.create_instance_payload import CreateInstancePayload -from stackit.mariadb.models.create_instance_response import CreateInstanceResponse -from stackit.mariadb.models.credentials import Credentials -from stackit.mariadb.models.credentials_list_item import CredentialsListItem -from stackit.mariadb.models.credentials_response import CredentialsResponse -from stackit.mariadb.models.error import Error -from stackit.mariadb.models.get_metrics_response import GetMetricsResponse -from stackit.mariadb.models.instance import Instance -from stackit.mariadb.models.instance_last_operation import InstanceLastOperation -from stackit.mariadb.models.instance_parameters import InstanceParameters -from stackit.mariadb.models.instance_schema import InstanceSchema -from stackit.mariadb.models.list_backups_response import ListBackupsResponse -from stackit.mariadb.models.list_credentials_response import ListCredentialsResponse -from stackit.mariadb.models.list_instances_response import ListInstancesResponse -from stackit.mariadb.models.list_offerings_response import ListOfferingsResponse -from stackit.mariadb.models.list_restores_response import ListRestoresResponse -from stackit.mariadb.models.model_schema import ModelSchema -from stackit.mariadb.models.offering import Offering +from stackit.mariadb.models.backup import Backup as Backup +from stackit.mariadb.models.create_backup_response_item import ( + CreateBackupResponseItem as CreateBackupResponseItem, +) +from stackit.mariadb.models.create_instance_payload import ( + CreateInstancePayload as CreateInstancePayload, +) +from stackit.mariadb.models.create_instance_response import ( + CreateInstanceResponse as CreateInstanceResponse, +) +from stackit.mariadb.models.credentials import Credentials as Credentials +from stackit.mariadb.models.credentials_list_item import ( + CredentialsListItem as CredentialsListItem, +) +from stackit.mariadb.models.credentials_response import ( + CredentialsResponse as CredentialsResponse, +) +from stackit.mariadb.models.error import Error as Error +from stackit.mariadb.models.get_metrics_response import ( + GetMetricsResponse as GetMetricsResponse, +) +from stackit.mariadb.models.instance import Instance as Instance +from stackit.mariadb.models.instance_last_operation import ( + InstanceLastOperation as InstanceLastOperation, +) +from stackit.mariadb.models.instance_parameters import ( + InstanceParameters as InstanceParameters, +) +from stackit.mariadb.models.instance_schema import InstanceSchema as InstanceSchema +from stackit.mariadb.models.list_backups_response import ( + ListBackupsResponse as ListBackupsResponse, +) +from stackit.mariadb.models.list_credentials_response import ( + ListCredentialsResponse as ListCredentialsResponse, +) +from stackit.mariadb.models.list_instances_response import ( + ListInstancesResponse as ListInstancesResponse, +) +from stackit.mariadb.models.list_offerings_response import ( + ListOfferingsResponse as ListOfferingsResponse, +) +from stackit.mariadb.models.list_restores_response import ( + ListRestoresResponse as ListRestoresResponse, +) +from stackit.mariadb.models.model_schema import ModelSchema as ModelSchema +from stackit.mariadb.models.offering import Offering as Offering from stackit.mariadb.models.partial_update_instance_payload import ( - PartialUpdateInstancePayload, + PartialUpdateInstancePayload as PartialUpdateInstancePayload, +) +from stackit.mariadb.models.plan import Plan as Plan +from stackit.mariadb.models.raw_credentials import RawCredentials as RawCredentials +from stackit.mariadb.models.restore import Restore as Restore +from stackit.mariadb.models.trigger_restore_response import ( + TriggerRestoreResponse as TriggerRestoreResponse, ) -from stackit.mariadb.models.plan import Plan -from stackit.mariadb.models.raw_credentials import RawCredentials -from stackit.mariadb.models.restore import Restore -from stackit.mariadb.models.trigger_restore_response import TriggerRestoreResponse from stackit.mariadb.models.update_backups_config_payload import ( - UpdateBackupsConfigPayload, + UpdateBackupsConfigPayload as UpdateBackupsConfigPayload, ) from stackit.mariadb.models.update_backups_config_response import ( - UpdateBackupsConfigResponse, + UpdateBackupsConfigResponse as UpdateBackupsConfigResponse, ) diff --git a/services/mariadb/src/stackit/mariadb/api/default_api.py b/services/mariadb/src/stackit/mariadb/api/default_api.py index 177f334a..b2274d1b 100644 --- a/services/mariadb/src/stackit/mariadb/api/default_api.py +++ b/services/mariadb/src/stackit/mariadb/api/default_api.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Dict, List, Optional, Tuple, Union @@ -104,7 +104,7 @@ def create_backup( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_backup_serialize( instance_id=instance_id, @@ -169,7 +169,7 @@ def create_backup_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_backup_serialize( instance_id=instance_id, @@ -234,7 +234,7 @@ def create_backup_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_backup_serialize( instance_id=instance_id, @@ -271,7 +271,7 @@ def _create_backup_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -349,7 +349,7 @@ def create_credentials( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_credentials_serialize( project_id=project_id, @@ -414,7 +414,7 @@ def create_credentials_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_credentials_serialize( project_id=project_id, @@ -479,7 +479,7 @@ def create_credentials_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_credentials_serialize( project_id=project_id, @@ -515,7 +515,7 @@ def _create_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -595,7 +595,7 @@ def create_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_instance_serialize( project_id=project_id, @@ -663,7 +663,7 @@ def create_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_instance_serialize( project_id=project_id, @@ -731,7 +731,7 @@ def create_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_instance_serialize( project_id=project_id, @@ -768,7 +768,7 @@ def _create_instance_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -857,7 +857,7 @@ def delete_credentials( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_credentials_serialize( project_id=project_id, @@ -926,7 +926,7 @@ def delete_credentials_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_credentials_serialize( project_id=project_id, @@ -995,7 +995,7 @@ def delete_credentials_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_credentials_serialize( project_id=project_id, @@ -1033,7 +1033,7 @@ def _delete_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1113,7 +1113,7 @@ def delete_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_instance_serialize( project_id=project_id, @@ -1179,7 +1179,7 @@ def delete_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_instance_serialize( project_id=project_id, @@ -1245,7 +1245,7 @@ def delete_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_instance_serialize( project_id=project_id, @@ -1282,7 +1282,7 @@ def _delete_instance_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1362,7 +1362,7 @@ def download_backup( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._download_backup_serialize( backup_id=backup_id, @@ -1430,7 +1430,7 @@ def download_backup_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._download_backup_serialize( backup_id=backup_id, @@ -1498,7 +1498,7 @@ def download_backup_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._download_backup_serialize( backup_id=backup_id, @@ -1536,7 +1536,7 @@ def _download_backup_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1621,7 +1621,7 @@ def get_credentials( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_credentials_serialize( project_id=project_id, @@ -1690,7 +1690,7 @@ def get_credentials_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_credentials_serialize( project_id=project_id, @@ -1759,7 +1759,7 @@ def get_credentials_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_credentials_serialize( project_id=project_id, @@ -1797,7 +1797,7 @@ def _get_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1877,7 +1877,7 @@ def get_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_instance_serialize( project_id=project_id, @@ -1943,7 +1943,7 @@ def get_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_instance_serialize( project_id=project_id, @@ -2009,7 +2009,7 @@ def get_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_instance_serialize( project_id=project_id, @@ -2046,7 +2046,7 @@ def _get_instance_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2123,7 +2123,7 @@ def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_metrics_serialize( instance_id=instance_id, @@ -2187,7 +2187,7 @@ def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_metrics_serialize( instance_id=instance_id, @@ -2251,7 +2251,7 @@ def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_metrics_serialize( instance_id=instance_id, @@ -2287,7 +2287,7 @@ def _get_metrics_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2364,7 +2364,7 @@ def list_backups( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_backups_serialize( instance_id=instance_id, @@ -2428,7 +2428,7 @@ def list_backups_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_backups_serialize( instance_id=instance_id, @@ -2492,7 +2492,7 @@ def list_backups_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_backups_serialize( instance_id=instance_id, @@ -2528,7 +2528,7 @@ def _list_backups_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2606,7 +2606,7 @@ def list_credentials( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_credentials_serialize( project_id=project_id, @@ -2671,7 +2671,7 @@ def list_credentials_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_credentials_serialize( project_id=project_id, @@ -2736,7 +2736,7 @@ def list_credentials_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_credentials_serialize( project_id=project_id, @@ -2772,7 +2772,7 @@ def _list_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2847,7 +2847,7 @@ def list_instances( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_instances_serialize( project_id=project_id, @@ -2908,7 +2908,7 @@ def list_instances_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_instances_serialize( project_id=project_id, @@ -2969,7 +2969,7 @@ def list_instances_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_instances_serialize( project_id=project_id, @@ -3003,7 +3003,7 @@ def _list_instances_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3076,7 +3076,7 @@ def list_offerings( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_offerings_serialize( project_id=project_id, @@ -3136,7 +3136,7 @@ def list_offerings_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_offerings_serialize( project_id=project_id, @@ -3196,7 +3196,7 @@ def list_offerings_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_offerings_serialize( project_id=project_id, @@ -3229,7 +3229,7 @@ def _list_offerings_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3304,7 +3304,7 @@ def list_restores( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_restores_serialize( instance_id=instance_id, @@ -3368,7 +3368,7 @@ def list_restores_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_restores_serialize( instance_id=instance_id, @@ -3432,7 +3432,7 @@ def list_restores_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_restores_serialize( instance_id=instance_id, @@ -3468,7 +3468,7 @@ def _list_restores_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3554,7 +3554,7 @@ def partial_update_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_instance_serialize( project_id=project_id, @@ -3629,7 +3629,7 @@ def partial_update_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_instance_serialize( project_id=project_id, @@ -3704,7 +3704,7 @@ def partial_update_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_instance_serialize( project_id=project_id, @@ -3743,7 +3743,7 @@ def _partial_update_instance_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3830,7 +3830,7 @@ def trigger_recreate( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_recreate_serialize( instance_id=instance_id, @@ -3895,7 +3895,7 @@ def trigger_recreate_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_recreate_serialize( instance_id=instance_id, @@ -3960,7 +3960,7 @@ def trigger_recreate_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_recreate_serialize( instance_id=instance_id, @@ -3997,7 +3997,7 @@ def _trigger_recreate_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4074,7 +4074,7 @@ def trigger_restart( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_restart_serialize( instance_id=instance_id, @@ -4139,7 +4139,7 @@ def trigger_restart_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_restart_serialize( instance_id=instance_id, @@ -4204,7 +4204,7 @@ def trigger_restart_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_restart_serialize( instance_id=instance_id, @@ -4241,7 +4241,7 @@ def _trigger_restart_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4321,7 +4321,7 @@ def trigger_restore( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_restore_serialize( instance_id=instance_id, @@ -4390,7 +4390,7 @@ def trigger_restore_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_restore_serialize( instance_id=instance_id, @@ -4459,7 +4459,7 @@ def trigger_restore_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._trigger_restore_serialize( instance_id=instance_id, @@ -4498,7 +4498,7 @@ def _trigger_restore_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4583,7 +4583,7 @@ def update_backups_config( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_backups_config_serialize( instance_id=instance_id, @@ -4655,7 +4655,7 @@ def update_backups_config_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_backups_config_serialize( instance_id=instance_id, @@ -4727,7 +4727,7 @@ def update_backups_config_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_backups_config_serialize( instance_id=instance_id, @@ -4766,7 +4766,7 @@ def _update_backups_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/services/mariadb/src/stackit/mariadb/api_client.py b/services/mariadb/src/stackit/mariadb/api_client.py index de934638..265e25d6 100644 --- a/services/mariadb/src/stackit/mariadb/api_client.py +++ b/services/mariadb/src/stackit/mariadb/api_client.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import datetime import json @@ -331,6 +331,10 @@ def sanitize_for_serialization(self, obj): else: obj_dict = obj.__dict__ + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): @@ -350,12 +354,12 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match(r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: raise ApiException(status=0, reason="Unsupported content type: {0}".format(content_type)) @@ -457,7 +461,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == "multi": - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == "ssv": delimiter = " " @@ -473,7 +477,10 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. @@ -488,6 +495,12 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue else: raise ValueError("Unsupported file value") mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" diff --git a/services/mariadb/src/stackit/mariadb/configuration.py b/services/mariadb/src/stackit/mariadb/configuration.py index 6f926624..2131958e 100644 --- a/services/mariadb/src/stackit/mariadb/configuration.py +++ b/services/mariadb/src/stackit/mariadb/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ STACKIT MariaDB API @@ -14,7 +9,29 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 + +import sys +from typing import Dict, List, Optional, TypedDict + +from typing_extensions import NotRequired + +import os + + +ServerVariablesT = Dict[str, str] + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] class HostConfiguration: @@ -53,7 +70,7 @@ def __init__( """Ignore operation servers """ - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -72,7 +89,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT] = None, + servers: Optional[List[HostSetting]] = None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -112,7 +134,7 @@ def get_host_from_settings(self, index, variables=None, servers=None): and variables.get(variable_name) is not None ): raise ValueError( - "this API does not support setting a region in the the client configuration, " + "this API does not support setting a region in the client configuration, " "please check if the region can be specified as a function parameter" ) used_value = variables.get(variable_name, variable["default_value"]) @@ -131,12 +153,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/services/mariadb/src/stackit/mariadb/exceptions.py b/services/mariadb/src/stackit/mariadb/exceptions.py index 1ee61c85..29e15057 100644 --- a/services/mariadb/src/stackit/mariadb/exceptions.py +++ b/services/mariadb/src/stackit/mariadb/exceptions.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Optional @@ -127,7 +127,7 @@ def __init__( if self.body is None: try: self.body = http_resp.data.decode("utf-8") - except Exception: # noqa: S110 + except Exception: pass self.headers = http_resp.getheaders() @@ -151,6 +151,13 @@ def from_response( if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -187,6 +194,18 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/services/mariadb/src/stackit/mariadb/models/__init__.py b/services/mariadb/src/stackit/mariadb/models/__init__.py index 7a4a8bbc..70c7fc61 100644 --- a/services/mariadb/src/stackit/mariadb/models/__init__.py +++ b/services/mariadb/src/stackit/mariadb/models/__init__.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 # import models into model package diff --git a/services/mariadb/src/stackit/mariadb/models/backup.py b/services/mariadb/src/stackit/mariadb/models/backup.py index 5923afec..dc226e7c 100644 --- a/services/mariadb/src/stackit/mariadb/models/backup.py +++ b/services/mariadb/src/stackit/mariadb/models/backup.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class Backup(BaseModel): """ Backup - """ + """ # noqa: E501 downloadable: Optional[StrictBool] = None finished_at: StrictStr diff --git a/services/mariadb/src/stackit/mariadb/models/create_backup_response_item.py b/services/mariadb/src/stackit/mariadb/models/create_backup_response_item.py index 431b442a..78f74500 100644 --- a/services/mariadb/src/stackit/mariadb/models/create_backup_response_item.py +++ b/services/mariadb/src/stackit/mariadb/models/create_backup_response_item.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class CreateBackupResponseItem(BaseModel): """ CreateBackupResponseItem - """ + """ # noqa: E501 id: StrictInt message: StrictStr diff --git a/services/mariadb/src/stackit/mariadb/models/create_instance_payload.py b/services/mariadb/src/stackit/mariadb/models/create_instance_payload.py index 13741559..9339f6b1 100644 --- a/services/mariadb/src/stackit/mariadb/models/create_instance_payload.py +++ b/services/mariadb/src/stackit/mariadb/models/create_instance_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class CreateInstancePayload(BaseModel): """ CreateInstancePayload - """ + """ # noqa: E501 instance_name: StrictStr = Field(alias="instanceName") parameters: Optional[InstanceParameters] = None diff --git a/services/mariadb/src/stackit/mariadb/models/create_instance_response.py b/services/mariadb/src/stackit/mariadb/models/create_instance_response.py index 7401ce60..c9ce1dc3 100644 --- a/services/mariadb/src/stackit/mariadb/models/create_instance_response.py +++ b/services/mariadb/src/stackit/mariadb/models/create_instance_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class CreateInstanceResponse(BaseModel): """ CreateInstanceResponse - """ + """ # noqa: E501 instance_id: StrictStr = Field(alias="instanceId") __properties: ClassVar[List[str]] = ["instanceId"] diff --git a/services/mariadb/src/stackit/mariadb/models/credentials.py b/services/mariadb/src/stackit/mariadb/models/credentials.py index 0f819887..6e72de36 100644 --- a/services/mariadb/src/stackit/mariadb/models/credentials.py +++ b/services/mariadb/src/stackit/mariadb/models/credentials.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class Credentials(BaseModel): """ Credentials - """ + """ # noqa: E501 host: StrictStr hosts: Optional[List[StrictStr]] = None diff --git a/services/mariadb/src/stackit/mariadb/models/credentials_list_item.py b/services/mariadb/src/stackit/mariadb/models/credentials_list_item.py index cc993a0e..436204b5 100644 --- a/services/mariadb/src/stackit/mariadb/models/credentials_list_item.py +++ b/services/mariadb/src/stackit/mariadb/models/credentials_list_item.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class CredentialsListItem(BaseModel): """ CredentialsListItem - """ + """ # noqa: E501 id: StrictStr __properties: ClassVar[List[str]] = ["id"] diff --git a/services/mariadb/src/stackit/mariadb/models/credentials_response.py b/services/mariadb/src/stackit/mariadb/models/credentials_response.py index 299a94af..a98a6f3e 100644 --- a/services/mariadb/src/stackit/mariadb/models/credentials_response.py +++ b/services/mariadb/src/stackit/mariadb/models/credentials_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class CredentialsResponse(BaseModel): """ CredentialsResponse - """ + """ # noqa: E501 id: StrictStr raw: Optional[RawCredentials] = None diff --git a/services/mariadb/src/stackit/mariadb/models/error.py b/services/mariadb/src/stackit/mariadb/models/error.py index 77163e5c..660852b7 100644 --- a/services/mariadb/src/stackit/mariadb/models/error.py +++ b/services/mariadb/src/stackit/mariadb/models/error.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class Error(BaseModel): """ Error - """ + """ # noqa: E501 description: StrictStr error: StrictStr diff --git a/services/mariadb/src/stackit/mariadb/models/get_metrics_response.py b/services/mariadb/src/stackit/mariadb/models/get_metrics_response.py index 26fe24be..5c94ea44 100644 --- a/services/mariadb/src/stackit/mariadb/models/get_metrics_response.py +++ b/services/mariadb/src/stackit/mariadb/models/get_metrics_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class GetMetricsResponse(BaseModel): """ GetMetricsResponse - """ + """ # noqa: E501 cpu_idle_time: Optional[StrictInt] = Field(default=None, alias="cpuIdleTime") cpu_load_percent: Union[StrictFloat, StrictInt] = Field(alias="cpuLoadPercent") diff --git a/services/mariadb/src/stackit/mariadb/models/instance.py b/services/mariadb/src/stackit/mariadb/models/instance.py index 75a0ae7b..4af4cb4a 100644 --- a/services/mariadb/src/stackit/mariadb/models/instance.py +++ b/services/mariadb/src/stackit/mariadb/models/instance.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class Instance(BaseModel): """ Instance - """ + """ # noqa: E501 cf_guid: StrictStr = Field(alias="cfGuid") cf_organization_guid: StrictStr = Field(alias="cfOrganizationGuid") diff --git a/services/mariadb/src/stackit/mariadb/models/instance_last_operation.py b/services/mariadb/src/stackit/mariadb/models/instance_last_operation.py index d49cd32b..b13b1bd3 100644 --- a/services/mariadb/src/stackit/mariadb/models/instance_last_operation.py +++ b/services/mariadb/src/stackit/mariadb/models/instance_last_operation.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class InstanceLastOperation(BaseModel): """ InstanceLastOperation - """ + """ # noqa: E501 description: StrictStr state: StrictStr diff --git a/services/mariadb/src/stackit/mariadb/models/instance_parameters.py b/services/mariadb/src/stackit/mariadb/models/instance_parameters.py index d19bb537..7f0ceae9 100644 --- a/services/mariadb/src/stackit/mariadb/models/instance_parameters.py +++ b/services/mariadb/src/stackit/mariadb/models/instance_parameters.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class InstanceParameters(BaseModel): """ InstanceParameters - """ + """ # noqa: E501 enable_monitoring: Optional[StrictBool] = False graphite: Optional[StrictStr] = Field( diff --git a/services/mariadb/src/stackit/mariadb/models/instance_schema.py b/services/mariadb/src/stackit/mariadb/models/instance_schema.py index ee3b7a81..9efb9623 100644 --- a/services/mariadb/src/stackit/mariadb/models/instance_schema.py +++ b/services/mariadb/src/stackit/mariadb/models/instance_schema.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class InstanceSchema(BaseModel): """ InstanceSchema - """ + """ # noqa: E501 create: ModelSchema update: ModelSchema diff --git a/services/mariadb/src/stackit/mariadb/models/list_backups_response.py b/services/mariadb/src/stackit/mariadb/models/list_backups_response.py index cc6bb684..afe362e0 100644 --- a/services/mariadb/src/stackit/mariadb/models/list_backups_response.py +++ b/services/mariadb/src/stackit/mariadb/models/list_backups_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ListBackupsResponse(BaseModel): """ ListBackupsResponse - """ + """ # noqa: E501 instance_backups: List[Backup] = Field(alias="instanceBackups") __properties: ClassVar[List[str]] = ["instanceBackups"] diff --git a/services/mariadb/src/stackit/mariadb/models/list_credentials_response.py b/services/mariadb/src/stackit/mariadb/models/list_credentials_response.py index abbe1db0..7faf051d 100644 --- a/services/mariadb/src/stackit/mariadb/models/list_credentials_response.py +++ b/services/mariadb/src/stackit/mariadb/models/list_credentials_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ListCredentialsResponse(BaseModel): """ ListCredentialsResponse - """ + """ # noqa: E501 credentials_list: List[CredentialsListItem] = Field(alias="credentialsList") __properties: ClassVar[List[str]] = ["credentialsList"] diff --git a/services/mariadb/src/stackit/mariadb/models/list_instances_response.py b/services/mariadb/src/stackit/mariadb/models/list_instances_response.py index f086b362..bd101c9b 100644 --- a/services/mariadb/src/stackit/mariadb/models/list_instances_response.py +++ b/services/mariadb/src/stackit/mariadb/models/list_instances_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ListInstancesResponse(BaseModel): """ ListInstancesResponse - """ + """ # noqa: E501 instances: List[Instance] __properties: ClassVar[List[str]] = ["instances"] diff --git a/services/mariadb/src/stackit/mariadb/models/list_offerings_response.py b/services/mariadb/src/stackit/mariadb/models/list_offerings_response.py index 94c8d30d..fb688013 100644 --- a/services/mariadb/src/stackit/mariadb/models/list_offerings_response.py +++ b/services/mariadb/src/stackit/mariadb/models/list_offerings_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ListOfferingsResponse(BaseModel): """ ListOfferingsResponse - """ + """ # noqa: E501 offerings: List[Offering] __properties: ClassVar[List[str]] = ["offerings"] diff --git a/services/mariadb/src/stackit/mariadb/models/list_restores_response.py b/services/mariadb/src/stackit/mariadb/models/list_restores_response.py index ff93a8d0..ef693261 100644 --- a/services/mariadb/src/stackit/mariadb/models/list_restores_response.py +++ b/services/mariadb/src/stackit/mariadb/models/list_restores_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ListRestoresResponse(BaseModel): """ ListRestoresResponse - """ + """ # noqa: E501 instance_restores: List[Restore] = Field(alias="instanceRestores") __properties: ClassVar[List[str]] = ["instanceRestores"] diff --git a/services/mariadb/src/stackit/mariadb/models/model_schema.py b/services/mariadb/src/stackit/mariadb/models/model_schema.py index 6d81541b..221cd3bf 100644 --- a/services/mariadb/src/stackit/mariadb/models/model_schema.py +++ b/services/mariadb/src/stackit/mariadb/models/model_schema.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class ModelSchema(BaseModel): """ ModelSchema - """ + """ # noqa: E501 parameters: Dict[str, Any] __properties: ClassVar[List[str]] = ["parameters"] diff --git a/services/mariadb/src/stackit/mariadb/models/offering.py b/services/mariadb/src/stackit/mariadb/models/offering.py index ab54aa16..ace059d0 100644 --- a/services/mariadb/src/stackit/mariadb/models/offering.py +++ b/services/mariadb/src/stackit/mariadb/models/offering.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class Offering(BaseModel): """ Offering - """ + """ # noqa: E501 description: StrictStr documentation_url: StrictStr = Field(alias="documentationUrl") diff --git a/services/mariadb/src/stackit/mariadb/models/partial_update_instance_payload.py b/services/mariadb/src/stackit/mariadb/models/partial_update_instance_payload.py index 9098fe58..5aab8e1f 100644 --- a/services/mariadb/src/stackit/mariadb/models/partial_update_instance_payload.py +++ b/services/mariadb/src/stackit/mariadb/models/partial_update_instance_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class PartialUpdateInstancePayload(BaseModel): """ PartialUpdateInstancePayload - """ + """ # noqa: E501 instance_name: Optional[StrictStr] = Field(default=None, alias="instanceName") parameters: Optional[InstanceParameters] = None diff --git a/services/mariadb/src/stackit/mariadb/models/plan.py b/services/mariadb/src/stackit/mariadb/models/plan.py index 377a8de9..d2581410 100644 --- a/services/mariadb/src/stackit/mariadb/models/plan.py +++ b/services/mariadb/src/stackit/mariadb/models/plan.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class Plan(BaseModel): """ Plan - """ + """ # noqa: E501 description: StrictStr free: StrictBool diff --git a/services/mariadb/src/stackit/mariadb/models/raw_credentials.py b/services/mariadb/src/stackit/mariadb/models/raw_credentials.py index 0e80fe31..d9b1f4a6 100644 --- a/services/mariadb/src/stackit/mariadb/models/raw_credentials.py +++ b/services/mariadb/src/stackit/mariadb/models/raw_credentials.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class RawCredentials(BaseModel): """ RawCredentials - """ + """ # noqa: E501 credentials: Credentials __properties: ClassVar[List[str]] = ["credentials"] diff --git a/services/mariadb/src/stackit/mariadb/models/restore.py b/services/mariadb/src/stackit/mariadb/models/restore.py index a12dc9e0..3b8bf638 100644 --- a/services/mariadb/src/stackit/mariadb/models/restore.py +++ b/services/mariadb/src/stackit/mariadb/models/restore.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class Restore(BaseModel): """ Restore - """ + """ # noqa: E501 backup_id: StrictInt finished_at: StrictStr diff --git a/services/mariadb/src/stackit/mariadb/models/trigger_restore_response.py b/services/mariadb/src/stackit/mariadb/models/trigger_restore_response.py index 54b82735..f5cb70a0 100644 --- a/services/mariadb/src/stackit/mariadb/models/trigger_restore_response.py +++ b/services/mariadb/src/stackit/mariadb/models/trigger_restore_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class TriggerRestoreResponse(BaseModel): """ TriggerRestoreResponse - """ + """ # noqa: E501 id: StrictInt __properties: ClassVar[List[str]] = ["id"] diff --git a/services/mariadb/src/stackit/mariadb/models/update_backups_config_payload.py b/services/mariadb/src/stackit/mariadb/models/update_backups_config_payload.py index a678969f..5990aca7 100644 --- a/services/mariadb/src/stackit/mariadb/models/update_backups_config_payload.py +++ b/services/mariadb/src/stackit/mariadb/models/update_backups_config_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class UpdateBackupsConfigPayload(BaseModel): """ UpdateBackupsConfigPayload - """ + """ # noqa: E501 encryption_key: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["encryption_key"] diff --git a/services/mariadb/src/stackit/mariadb/models/update_backups_config_response.py b/services/mariadb/src/stackit/mariadb/models/update_backups_config_response.py index b752ba73..2a081e72 100644 --- a/services/mariadb/src/stackit/mariadb/models/update_backups_config_response.py +++ b/services/mariadb/src/stackit/mariadb/models/update_backups_config_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class UpdateBackupsConfigResponse(BaseModel): """ UpdateBackupsConfigResponse - """ + """ # noqa: E501 message: StrictStr __properties: ClassVar[List[str]] = ["message"] diff --git a/services/mariadb/src/stackit/mariadb/rest.py b/services/mariadb/src/stackit/mariadb/rest.py index bbd7383e..eb726257 100644 --- a/services/mariadb/src/stackit/mariadb/rest.py +++ b/services/mariadb/src/stackit/mariadb/rest.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import io import json @@ -124,7 +124,7 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque data=body, headers=headers, ) - elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): + elif headers["Content-Type"].startswith("text/") and isinstance(body, bool): request_body = "true" if body else "false" r = self.session.request(method, url, data=request_body, headers=headers) else: