From c5dd710fef995e94c2a2401638a6d8414a7a412a Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 3 Jul 2025 10:49:56 +0000 Subject: [PATCH] Generate opensearch --- .../src/stackit/opensearch/__init__.py | 147 ++++++++++++----- .../src/stackit/opensearch/api/default_api.py | 154 +++++++++--------- .../src/stackit/opensearch/api_client.py | 23 ++- .../src/stackit/opensearch/configuration.py | 44 +++-- .../src/stackit/opensearch/exceptions.py | 23 ++- .../src/stackit/opensearch/models/__init__.py | 2 +- .../src/stackit/opensearch/models/backup.py | 4 +- .../models/create_backup_response_item.py | 4 +- .../models/create_instance_payload.py | 4 +- .../models/create_instance_response.py | 4 +- .../stackit/opensearch/models/credentials.py | 4 +- .../models/credentials_list_item.py | 4 +- .../opensearch/models/credentials_response.py | 4 +- .../src/stackit/opensearch/models/error.py | 4 +- .../opensearch/models/get_metrics_response.py | 4 +- .../src/stackit/opensearch/models/instance.py | 4 +- .../models/instance_last_operation.py | 4 +- .../opensearch/models/instance_parameters.py | 4 +- .../opensearch/models/instance_schema.py | 4 +- .../models/list_backups_response.py | 4 +- .../models/list_credentials_response.py | 4 +- .../models/list_instances_response.py | 4 +- .../models/list_offerings_response.py | 4 +- .../models/list_restores_response.py | 4 +- .../stackit/opensearch/models/model_schema.py | 4 +- .../src/stackit/opensearch/models/offering.py | 4 +- .../models/partial_update_instance_payload.py | 4 +- .../src/stackit/opensearch/models/plan.py | 4 +- .../opensearch/models/raw_credentials.py | 4 +- .../src/stackit/opensearch/models/restore.py | 4 +- .../models/trigger_restore_response.py | 4 +- .../models/update_backups_config_payload.py | 4 +- .../models/update_backups_config_response.py | 4 +- .../opensearch/src/stackit/opensearch/rest.py | 4 +- 34 files changed, 312 insertions(+), 193 deletions(-) diff --git a/services/opensearch/src/stackit/opensearch/__init__.py b/services/opensearch/src/stackit/opensearch/__init__.py index 07142860..0004633d 100644 --- a/services/opensearch/src/stackit/opensearch/__init__.py +++ b/services/opensearch/src/stackit/opensearch/__init__.py @@ -11,60 +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.opensearch.api.default_api import DefaultApi -from stackit.opensearch.api_client import ApiClient +from stackit.opensearch.api.default_api import DefaultApi as DefaultApi +from stackit.opensearch.api_client import ApiClient as ApiClient # import ApiClient -from stackit.opensearch.api_response import ApiResponse -from stackit.opensearch.configuration import HostConfiguration -from stackit.opensearch.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.opensearch.api_response import ApiResponse as ApiResponse +from stackit.opensearch.configuration import HostConfiguration as HostConfiguration +from stackit.opensearch.exceptions import ApiAttributeError as ApiAttributeError +from stackit.opensearch.exceptions import ApiException as ApiException +from stackit.opensearch.exceptions import ApiKeyError as ApiKeyError +from stackit.opensearch.exceptions import ApiTypeError as ApiTypeError +from stackit.opensearch.exceptions import ApiValueError as ApiValueError +from stackit.opensearch.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.opensearch.models.backup import Backup +from stackit.opensearch.models.backup import Backup as Backup from stackit.opensearch.models.create_backup_response_item import ( - CreateBackupResponseItem, -) -from stackit.opensearch.models.create_instance_payload import CreateInstancePayload -from stackit.opensearch.models.create_instance_response import CreateInstanceResponse -from stackit.opensearch.models.credentials import Credentials -from stackit.opensearch.models.credentials_list_item import CredentialsListItem -from stackit.opensearch.models.credentials_response import CredentialsResponse -from stackit.opensearch.models.error import Error -from stackit.opensearch.models.get_metrics_response import GetMetricsResponse -from stackit.opensearch.models.instance import Instance -from stackit.opensearch.models.instance_last_operation import InstanceLastOperation -from stackit.opensearch.models.instance_parameters import InstanceParameters -from stackit.opensearch.models.instance_schema import InstanceSchema -from stackit.opensearch.models.list_backups_response import ListBackupsResponse -from stackit.opensearch.models.list_credentials_response import ListCredentialsResponse -from stackit.opensearch.models.list_instances_response import ListInstancesResponse -from stackit.opensearch.models.list_offerings_response import ListOfferingsResponse -from stackit.opensearch.models.list_restores_response import ListRestoresResponse -from stackit.opensearch.models.model_schema import ModelSchema -from stackit.opensearch.models.offering import Offering + CreateBackupResponseItem as CreateBackupResponseItem, +) +from stackit.opensearch.models.create_instance_payload import ( + CreateInstancePayload as CreateInstancePayload, +) +from stackit.opensearch.models.create_instance_response import ( + CreateInstanceResponse as CreateInstanceResponse, +) +from stackit.opensearch.models.credentials import Credentials as Credentials +from stackit.opensearch.models.credentials_list_item import ( + CredentialsListItem as CredentialsListItem, +) +from stackit.opensearch.models.credentials_response import ( + CredentialsResponse as CredentialsResponse, +) +from stackit.opensearch.models.error import Error as Error +from stackit.opensearch.models.get_metrics_response import ( + GetMetricsResponse as GetMetricsResponse, +) +from stackit.opensearch.models.instance import Instance as Instance +from stackit.opensearch.models.instance_last_operation import ( + InstanceLastOperation as InstanceLastOperation, +) +from stackit.opensearch.models.instance_parameters import ( + InstanceParameters as InstanceParameters, +) +from stackit.opensearch.models.instance_schema import InstanceSchema as InstanceSchema +from stackit.opensearch.models.list_backups_response import ( + ListBackupsResponse as ListBackupsResponse, +) +from stackit.opensearch.models.list_credentials_response import ( + ListCredentialsResponse as ListCredentialsResponse, +) +from stackit.opensearch.models.list_instances_response import ( + ListInstancesResponse as ListInstancesResponse, +) +from stackit.opensearch.models.list_offerings_response import ( + ListOfferingsResponse as ListOfferingsResponse, +) +from stackit.opensearch.models.list_restores_response import ( + ListRestoresResponse as ListRestoresResponse, +) +from stackit.opensearch.models.model_schema import ModelSchema as ModelSchema +from stackit.opensearch.models.offering import Offering as Offering from stackit.opensearch.models.partial_update_instance_payload import ( - PartialUpdateInstancePayload, + PartialUpdateInstancePayload as PartialUpdateInstancePayload, +) +from stackit.opensearch.models.plan import Plan as Plan +from stackit.opensearch.models.raw_credentials import RawCredentials as RawCredentials +from stackit.opensearch.models.restore import Restore as Restore +from stackit.opensearch.models.trigger_restore_response import ( + TriggerRestoreResponse as TriggerRestoreResponse, ) -from stackit.opensearch.models.plan import Plan -from stackit.opensearch.models.raw_credentials import RawCredentials -from stackit.opensearch.models.restore import Restore -from stackit.opensearch.models.trigger_restore_response import TriggerRestoreResponse from stackit.opensearch.models.update_backups_config_payload import ( - UpdateBackupsConfigPayload, + UpdateBackupsConfigPayload as UpdateBackupsConfigPayload, ) from stackit.opensearch.models.update_backups_config_response import ( - UpdateBackupsConfigResponse, + UpdateBackupsConfigResponse as UpdateBackupsConfigResponse, ) diff --git a/services/opensearch/src/stackit/opensearch/api/default_api.py b/services/opensearch/src/stackit/opensearch/api/default_api.py index bfca9705..8dabfd95 100644 --- a/services/opensearch/src/stackit/opensearch/api/default_api.py +++ b/services/opensearch/src/stackit/opensearch/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 @@ -106,7 +106,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, @@ -171,7 +171,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, @@ -236,7 +236,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, @@ -273,7 +273,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 @@ -351,7 +351,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, @@ -416,7 +416,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, @@ -481,7 +481,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, @@ -517,7 +517,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 @@ -597,7 +597,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, @@ -665,7 +665,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, @@ -733,7 +733,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, @@ -770,7 +770,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 @@ -859,7 +859,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, @@ -928,7 +928,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, @@ -997,7 +997,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, @@ -1035,7 +1035,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 @@ -1115,7 +1115,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, @@ -1181,7 +1181,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, @@ -1247,7 +1247,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, @@ -1284,7 +1284,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 @@ -1364,7 +1364,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, @@ -1432,7 +1432,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, @@ -1500,7 +1500,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, @@ -1538,7 +1538,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 @@ -1623,7 +1623,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, @@ -1692,7 +1692,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, @@ -1761,7 +1761,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, @@ -1799,7 +1799,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 @@ -1879,7 +1879,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, @@ -1945,7 +1945,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, @@ -2011,7 +2011,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, @@ -2048,7 +2048,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 @@ -2125,7 +2125,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, @@ -2189,7 +2189,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, @@ -2253,7 +2253,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, @@ -2289,7 +2289,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 @@ -2366,7 +2366,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, @@ -2430,7 +2430,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, @@ -2494,7 +2494,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, @@ -2530,7 +2530,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 @@ -2608,7 +2608,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, @@ -2673,7 +2673,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, @@ -2738,7 +2738,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, @@ -2774,7 +2774,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 @@ -2849,7 +2849,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, @@ -2910,7 +2910,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, @@ -2971,7 +2971,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, @@ -3005,7 +3005,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 @@ -3078,7 +3078,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, @@ -3138,7 +3138,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, @@ -3198,7 +3198,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, @@ -3231,7 +3231,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 @@ -3306,7 +3306,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, @@ -3370,7 +3370,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, @@ -3434,7 +3434,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, @@ -3470,7 +3470,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 @@ -3556,7 +3556,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, @@ -3631,7 +3631,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, @@ -3706,7 +3706,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, @@ -3745,7 +3745,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 @@ -3832,7 +3832,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, @@ -3897,7 +3897,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, @@ -3962,7 +3962,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, @@ -3999,7 +3999,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 @@ -4076,7 +4076,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, @@ -4141,7 +4141,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, @@ -4206,7 +4206,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, @@ -4243,7 +4243,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 @@ -4323,7 +4323,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, @@ -4392,7 +4392,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, @@ -4461,7 +4461,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, @@ -4500,7 +4500,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 @@ -4585,7 +4585,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, @@ -4657,7 +4657,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, @@ -4729,7 +4729,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, @@ -4768,7 +4768,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/opensearch/src/stackit/opensearch/api_client.py b/services/opensearch/src/stackit/opensearch/api_client.py index fc0ed04c..b5048213 100644 --- a/services/opensearch/src/stackit/opensearch/api_client.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/configuration.py b/services/opensearch/src/stackit/opensearch/configuration.py index ee5560ab..f8e5ce4b 100644 --- a/services/opensearch/src/stackit/opensearch/configuration.py +++ b/services/opensearch/src/stackit/opensearch/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ STACKIT Opensearch 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/opensearch/src/stackit/opensearch/exceptions.py b/services/opensearch/src/stackit/opensearch/exceptions.py index 62edb6ce..be9ac977 100644 --- a/services/opensearch/src/stackit/opensearch/exceptions.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/__init__.py b/services/opensearch/src/stackit/opensearch/models/__init__.py index 384cc705..666888eb 100644 --- a/services/opensearch/src/stackit/opensearch/models/__init__.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/backup.py b/services/opensearch/src/stackit/opensearch/models/backup.py index 3a0aeb87..9e4d177e 100644 --- a/services/opensearch/src/stackit/opensearch/models/backup.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/create_backup_response_item.py b/services/opensearch/src/stackit/opensearch/models/create_backup_response_item.py index 982b429d..1f60ae48 100644 --- a/services/opensearch/src/stackit/opensearch/models/create_backup_response_item.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/create_instance_payload.py b/services/opensearch/src/stackit/opensearch/models/create_instance_payload.py index 4b7943d5..6c235dcb 100644 --- a/services/opensearch/src/stackit/opensearch/models/create_instance_payload.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/create_instance_response.py b/services/opensearch/src/stackit/opensearch/models/create_instance_response.py index 987850b8..75abed57 100644 --- a/services/opensearch/src/stackit/opensearch/models/create_instance_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/credentials.py b/services/opensearch/src/stackit/opensearch/models/credentials.py index dd3f7f0f..6222f090 100644 --- a/services/opensearch/src/stackit/opensearch/models/credentials.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/credentials_list_item.py b/services/opensearch/src/stackit/opensearch/models/credentials_list_item.py index eb10a0a2..debc34f6 100644 --- a/services/opensearch/src/stackit/opensearch/models/credentials_list_item.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/credentials_response.py b/services/opensearch/src/stackit/opensearch/models/credentials_response.py index 81167d03..33033491 100644 --- a/services/opensearch/src/stackit/opensearch/models/credentials_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/error.py b/services/opensearch/src/stackit/opensearch/models/error.py index e950e669..d8c463de 100644 --- a/services/opensearch/src/stackit/opensearch/models/error.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/get_metrics_response.py b/services/opensearch/src/stackit/opensearch/models/get_metrics_response.py index fac3b5ac..c174f907 100644 --- a/services/opensearch/src/stackit/opensearch/models/get_metrics_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/instance.py b/services/opensearch/src/stackit/opensearch/models/instance.py index 251f3469..1a349a5d 100644 --- a/services/opensearch/src/stackit/opensearch/models/instance.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/instance_last_operation.py b/services/opensearch/src/stackit/opensearch/models/instance_last_operation.py index 302d977d..d0b6a0d9 100644 --- a/services/opensearch/src/stackit/opensearch/models/instance_last_operation.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/instance_parameters.py b/services/opensearch/src/stackit/opensearch/models/instance_parameters.py index 7081e297..5a145f50 100644 --- a/services/opensearch/src/stackit/opensearch/models/instance_parameters.py +++ b/services/opensearch/src/stackit/opensearch/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 @@ -32,7 +32,7 @@ class InstanceParameters(BaseModel): """ InstanceParameters - """ + """ # noqa: E501 enable_monitoring: Optional[StrictBool] = False graphite: Optional[StrictStr] = Field( diff --git a/services/opensearch/src/stackit/opensearch/models/instance_schema.py b/services/opensearch/src/stackit/opensearch/models/instance_schema.py index 2b1dbde0..9f59459f 100644 --- a/services/opensearch/src/stackit/opensearch/models/instance_schema.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/list_backups_response.py b/services/opensearch/src/stackit/opensearch/models/list_backups_response.py index 21c80f4b..88701149 100644 --- a/services/opensearch/src/stackit/opensearch/models/list_backups_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/list_credentials_response.py b/services/opensearch/src/stackit/opensearch/models/list_credentials_response.py index de177b8d..e975d346 100644 --- a/services/opensearch/src/stackit/opensearch/models/list_credentials_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/list_instances_response.py b/services/opensearch/src/stackit/opensearch/models/list_instances_response.py index 06dfe173..c13deac1 100644 --- a/services/opensearch/src/stackit/opensearch/models/list_instances_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/list_offerings_response.py b/services/opensearch/src/stackit/opensearch/models/list_offerings_response.py index 6f7a65c7..ef2992b7 100644 --- a/services/opensearch/src/stackit/opensearch/models/list_offerings_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/list_restores_response.py b/services/opensearch/src/stackit/opensearch/models/list_restores_response.py index 12abf0d5..9722ca83 100644 --- a/services/opensearch/src/stackit/opensearch/models/list_restores_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/model_schema.py b/services/opensearch/src/stackit/opensearch/models/model_schema.py index 72550288..787ba950 100644 --- a/services/opensearch/src/stackit/opensearch/models/model_schema.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/offering.py b/services/opensearch/src/stackit/opensearch/models/offering.py index f2f49ba4..6d5cfcf5 100644 --- a/services/opensearch/src/stackit/opensearch/models/offering.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/partial_update_instance_payload.py b/services/opensearch/src/stackit/opensearch/models/partial_update_instance_payload.py index 90deee04..25c2a704 100644 --- a/services/opensearch/src/stackit/opensearch/models/partial_update_instance_payload.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/plan.py b/services/opensearch/src/stackit/opensearch/models/plan.py index 5b95f08e..6e3aa3eb 100644 --- a/services/opensearch/src/stackit/opensearch/models/plan.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/raw_credentials.py b/services/opensearch/src/stackit/opensearch/models/raw_credentials.py index a87c0e70..ed82169c 100644 --- a/services/opensearch/src/stackit/opensearch/models/raw_credentials.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/restore.py b/services/opensearch/src/stackit/opensearch/models/restore.py index ee68742b..37537ac4 100644 --- a/services/opensearch/src/stackit/opensearch/models/restore.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/trigger_restore_response.py b/services/opensearch/src/stackit/opensearch/models/trigger_restore_response.py index aad997d0..93cb5fd2 100644 --- a/services/opensearch/src/stackit/opensearch/models/trigger_restore_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/update_backups_config_payload.py b/services/opensearch/src/stackit/opensearch/models/update_backups_config_payload.py index 7ca3af1e..7d5782d9 100644 --- a/services/opensearch/src/stackit/opensearch/models/update_backups_config_payload.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/models/update_backups_config_response.py b/services/opensearch/src/stackit/opensearch/models/update_backups_config_response.py index 62c8ec8e..57b3f7ef 100644 --- a/services/opensearch/src/stackit/opensearch/models/update_backups_config_response.py +++ b/services/opensearch/src/stackit/opensearch/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/opensearch/src/stackit/opensearch/rest.py b/services/opensearch/src/stackit/opensearch/rest.py index fdf2de40..9b9428b4 100644 --- a/services/opensearch/src/stackit/opensearch/rest.py +++ b/services/opensearch/src/stackit/opensearch/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: