diff --git a/services/secretsmanager/src/stackit/secretsmanager/__init__.py b/services/secretsmanager/src/stackit/secretsmanager/__init__.py index 77e42d18..0e7992c8 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/__init__.py +++ b/services/secretsmanager/src/stackit/secretsmanager/__init__.py @@ -11,41 +11,89 @@ 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", + "ACL", + "BadRequest", + "Conflict", + "CreateACLPayload", + "CreateInstancePayload", + "CreateUserPayload", + "Instance", + "ListACLsResponse", + "ListInstancesResponse", + "ListUsersResponse", + "NotFound", + "UpdateACLPayload", + "UpdateACLsPayload", + "UpdateInstancePayload", + "UpdateUserPayload", + "User", +] + # import apis into sdk package -from stackit.secretsmanager.api.default_api import DefaultApi -from stackit.secretsmanager.api_client import ApiClient +from stackit.secretsmanager.api.default_api import DefaultApi as DefaultApi +from stackit.secretsmanager.api_client import ApiClient as ApiClient # import ApiClient -from stackit.secretsmanager.api_response import ApiResponse -from stackit.secretsmanager.configuration import HostConfiguration -from stackit.secretsmanager.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.secretsmanager.api_response import ApiResponse as ApiResponse +from stackit.secretsmanager.configuration import HostConfiguration as HostConfiguration +from stackit.secretsmanager.exceptions import ApiAttributeError as ApiAttributeError +from stackit.secretsmanager.exceptions import ApiException as ApiException +from stackit.secretsmanager.exceptions import ApiKeyError as ApiKeyError +from stackit.secretsmanager.exceptions import ApiTypeError as ApiTypeError +from stackit.secretsmanager.exceptions import ApiValueError as ApiValueError +from stackit.secretsmanager.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.secretsmanager.models.acl import ACL -from stackit.secretsmanager.models.bad_request import BadRequest -from stackit.secretsmanager.models.conflict import Conflict -from stackit.secretsmanager.models.create_acl_payload import CreateACLPayload -from stackit.secretsmanager.models.create_instance_payload import CreateInstancePayload -from stackit.secretsmanager.models.create_user_payload import CreateUserPayload -from stackit.secretsmanager.models.instance import Instance -from stackit.secretsmanager.models.list_acls_response import ListACLsResponse -from stackit.secretsmanager.models.list_instances_response import ListInstancesResponse -from stackit.secretsmanager.models.list_users_response import ListUsersResponse -from stackit.secretsmanager.models.not_found import NotFound -from stackit.secretsmanager.models.update_acl_payload import UpdateACLPayload -from stackit.secretsmanager.models.update_acls_payload import UpdateACLsPayload -from stackit.secretsmanager.models.update_instance_payload import UpdateInstancePayload -from stackit.secretsmanager.models.update_user_payload import UpdateUserPayload -from stackit.secretsmanager.models.user import User +from stackit.secretsmanager.models.acl import ACL as ACL +from stackit.secretsmanager.models.bad_request import BadRequest as BadRequest +from stackit.secretsmanager.models.conflict import Conflict as Conflict +from stackit.secretsmanager.models.create_acl_payload import ( + CreateACLPayload as CreateACLPayload, +) +from stackit.secretsmanager.models.create_instance_payload import ( + CreateInstancePayload as CreateInstancePayload, +) +from stackit.secretsmanager.models.create_user_payload import ( + CreateUserPayload as CreateUserPayload, +) +from stackit.secretsmanager.models.instance import Instance as Instance +from stackit.secretsmanager.models.list_acls_response import ( + ListACLsResponse as ListACLsResponse, +) +from stackit.secretsmanager.models.list_instances_response import ( + ListInstancesResponse as ListInstancesResponse, +) +from stackit.secretsmanager.models.list_users_response import ( + ListUsersResponse as ListUsersResponse, +) +from stackit.secretsmanager.models.not_found import NotFound as NotFound +from stackit.secretsmanager.models.update_acl_payload import ( + UpdateACLPayload as UpdateACLPayload, +) +from stackit.secretsmanager.models.update_acls_payload import ( + UpdateACLsPayload as UpdateACLsPayload, +) +from stackit.secretsmanager.models.update_instance_payload import ( + UpdateInstancePayload as UpdateInstancePayload, +) +from stackit.secretsmanager.models.update_user_payload import ( + UpdateUserPayload as UpdateUserPayload, +) +from stackit.secretsmanager.models.user import User as User diff --git a/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py b/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py index c3df5bc0..ae0f6d75 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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 @@ -96,7 +96,7 @@ def create_acl( 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_acl_serialize( project_id=project_id, @@ -170,7 +170,7 @@ def create_acl_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_acl_serialize( project_id=project_id, @@ -244,7 +244,7 @@ def create_acl_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_acl_serialize( project_id=project_id, @@ -285,7 +285,7 @@ def _create_acl_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 @@ -375,7 +375,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, @@ -444,7 +444,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, @@ -513,7 +513,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, @@ -551,7 +551,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 @@ -642,7 +642,7 @@ def create_user( 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_user_serialize( project_id=project_id, @@ -717,7 +717,7 @@ def create_user_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_user_serialize( project_id=project_id, @@ -792,7 +792,7 @@ def create_user_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_user_serialize( project_id=project_id, @@ -834,7 +834,7 @@ def _create_user_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 @@ -927,7 +927,7 @@ def delete_acl( 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_acl_serialize( project_id=project_id, @@ -1001,7 +1001,7 @@ def delete_acl_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_acl_serialize( project_id=project_id, @@ -1075,7 +1075,7 @@ def delete_acl_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_acl_serialize( project_id=project_id, @@ -1116,7 +1116,7 @@ def _delete_acl_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 @@ -1198,7 +1198,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, @@ -1268,7 +1268,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, @@ -1338,7 +1338,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, @@ -1377,7 +1377,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 @@ -1462,7 +1462,7 @@ def delete_user( 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_user_serialize( project_id=project_id, @@ -1538,7 +1538,7 @@ def delete_user_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_user_serialize( project_id=project_id, @@ -1614,7 +1614,7 @@ def delete_user_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_user_serialize( project_id=project_id, @@ -1655,7 +1655,7 @@ def _delete_user_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 @@ -1740,7 +1740,7 @@ def get_acl( 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_acl_serialize( project_id=project_id, @@ -1814,7 +1814,7 @@ def get_acl_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_acl_serialize( project_id=project_id, @@ -1888,7 +1888,7 @@ def get_acl_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_acl_serialize( project_id=project_id, @@ -1929,7 +1929,7 @@ def _get_acl_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 @@ -2011,7 +2011,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, @@ -2081,7 +2081,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, @@ -2151,7 +2151,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, @@ -2190,7 +2190,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 @@ -2275,7 +2275,7 @@ def get_user( 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_user_serialize( project_id=project_id, @@ -2351,7 +2351,7 @@ def get_user_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_user_serialize( project_id=project_id, @@ -2427,7 +2427,7 @@ def get_user_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_user_serialize( project_id=project_id, @@ -2468,7 +2468,7 @@ def _get_user_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 @@ -2550,7 +2550,7 @@ def list_acls( 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_acls_serialize( project_id=project_id, @@ -2620,7 +2620,7 @@ def list_acls_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_acls_serialize( project_id=project_id, @@ -2690,7 +2690,7 @@ def list_acls_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_acls_serialize( project_id=project_id, @@ -2729,7 +2729,7 @@ def _list_acls_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 @@ -2806,7 +2806,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, @@ -2871,7 +2871,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, @@ -2936,7 +2936,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, @@ -2972,7 +2972,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 @@ -3050,7 +3050,7 @@ def list_users( 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_users_serialize( project_id=project_id, @@ -3120,7 +3120,7 @@ def list_users_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_users_serialize( project_id=project_id, @@ -3190,7 +3190,7 @@ def list_users_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_users_serialize( project_id=project_id, @@ -3229,7 +3229,7 @@ def _list_users_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 @@ -3315,7 +3315,7 @@ def update_acl( 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_acl_serialize( project_id=project_id, @@ -3393,7 +3393,7 @@ def update_acl_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_acl_serialize( project_id=project_id, @@ -3471,7 +3471,7 @@ def update_acl_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_acl_serialize( project_id=project_id, @@ -3514,7 +3514,7 @@ def _update_acl_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 @@ -3609,7 +3609,7 @@ def update_acls( 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_acls_serialize( project_id=project_id, @@ -3683,7 +3683,7 @@ def update_acls_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_acls_serialize( project_id=project_id, @@ -3757,7 +3757,7 @@ def update_acls_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_acls_serialize( project_id=project_id, @@ -3798,7 +3798,7 @@ def _update_acls_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 @@ -3891,7 +3891,7 @@ def 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._update_instance_serialize( project_id=project_id, @@ -3965,7 +3965,7 @@ def 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._update_instance_serialize( project_id=project_id, @@ -4039,7 +4039,7 @@ def 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._update_instance_serialize( project_id=project_id, @@ -4080,7 +4080,7 @@ def _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 @@ -4178,7 +4178,7 @@ def update_user( 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_user_serialize( project_id=project_id, @@ -4258,7 +4258,7 @@ def update_user_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_user_serialize( project_id=project_id, @@ -4338,7 +4338,7 @@ def update_user_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_user_serialize( project_id=project_id, @@ -4381,7 +4381,7 @@ def _update_user_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/secretsmanager/src/stackit/secretsmanager/api_client.py b/services/secretsmanager/src/stackit/secretsmanager/api_client.py index 6ebb126e..403f8ade 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/api_client.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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/secretsmanager/src/stackit/secretsmanager/configuration.py b/services/secretsmanager/src/stackit/secretsmanager/configuration.py index b2070b2b..42ceebd1 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/configuration.py +++ b/services/secretsmanager/src/stackit/secretsmanager/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ STACKIT Secrets Manager 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/secretsmanager/src/stackit/secretsmanager/exceptions.py b/services/secretsmanager/src/stackit/secretsmanager/exceptions.py index 223cf2d3..aff88605 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/exceptions.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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/secretsmanager/src/stackit/secretsmanager/models/__init__.py b/services/secretsmanager/src/stackit/secretsmanager/models/__init__.py index 53f34d16..e2399a01 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/__init__.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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/secretsmanager/src/stackit/secretsmanager/models/acl.py b/services/secretsmanager/src/stackit/secretsmanager/models/acl.py index d8d8b166..c7877d67 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/acl.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/acl.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 ACL(BaseModel): """ ACL - """ + """ # noqa: E501 cidr: StrictStr = Field(description="The given IP/IP Range that is permitted to access.") id: StrictStr = Field(description="A auto generated unique id which identifies the acl.") diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/bad_request.py b/services/secretsmanager/src/stackit/secretsmanager/models/bad_request.py index 1aa0dbd4..c9a3104e 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/bad_request.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/bad_request.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 BadRequest(BaseModel): """ BadRequest - """ + """ # noqa: E501 message: StrictStr = Field(description="The error message for bad requests") __properties: ClassVar[List[str]] = ["message"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/conflict.py b/services/secretsmanager/src/stackit/secretsmanager/models/conflict.py index 2c2bfb83..98149919 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/conflict.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/conflict.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 Conflict(BaseModel): """ Conflict - """ + """ # noqa: E501 message: StrictStr = Field(description="The error message for conflicts") __properties: ClassVar[List[str]] = ["message"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/create_acl_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/create_acl_payload.py index acaab559..94ed2d43 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/create_acl_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/create_acl_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 CreateACLPayload(BaseModel): """ CreateACLPayload - """ + """ # noqa: E501 cidr: StrictStr = Field(description="The given IP/IP Range that is permitted to access.") __properties: ClassVar[List[str]] = ["cidr"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/create_instance_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/create_instance_payload.py index bb63be6f..03a170e3 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/create_instance_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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 @@ -24,7 +24,7 @@ class CreateInstancePayload(BaseModel): """ CreateInstancePayload - """ + """ # noqa: E501 name: StrictStr = Field(description="A user chosen name to distinguish multiple secrets manager instances.") __properties: ClassVar[List[str]] = ["name"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/create_user_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/create_user_payload.py index e2b45a84..60744400 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/create_user_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/create_user_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 CreateUserPayload(BaseModel): """ CreateUserPayload - """ + """ # noqa: E501 description: StrictStr = Field(description="A user chosen description to differentiate between multiple users.") write: StrictBool = Field( diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/instance.py b/services/secretsmanager/src/stackit/secretsmanager/models/instance.py index 732c30e6..5447b496 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/instance.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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 @@ -24,7 +24,7 @@ class Instance(BaseModel): """ Instance - """ + """ # noqa: E501 api_url: StrictStr = Field(description="The API endpoint for connecting to the secrets engine.", alias="apiUrl") creation_finished_date: Optional[StrictStr] = Field( diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/list_acls_response.py b/services/secretsmanager/src/stackit/secretsmanager/models/list_acls_response.py index 9e45b5db..3c74d5ab 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/list_acls_response.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/list_acls_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 ListACLsResponse(BaseModel): """ ListACLsResponse - """ + """ # noqa: E501 acls: List[ACL] __properties: ClassVar[List[str]] = ["acls"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/list_instances_response.py b/services/secretsmanager/src/stackit/secretsmanager/models/list_instances_response.py index 54ce21a1..d4b83522 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/list_instances_response.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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/secretsmanager/src/stackit/secretsmanager/models/list_users_response.py b/services/secretsmanager/src/stackit/secretsmanager/models/list_users_response.py index 15ce919a..362c6624 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/list_users_response.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/list_users_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 ListUsersResponse(BaseModel): """ ListUsersResponse - """ + """ # noqa: E501 users: List[User] __properties: ClassVar[List[str]] = ["users"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/not_found.py b/services/secretsmanager/src/stackit/secretsmanager/models/not_found.py index 7f376a3b..90400c3e 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/not_found.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/not_found.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 NotFound(BaseModel): """ NotFound - """ + """ # noqa: E501 message: StrictStr = Field(description="The error message for not found resources") __properties: ClassVar[List[str]] = ["message"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/update_acl_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/update_acl_payload.py index 5d94f442..6c01906e 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/update_acl_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/update_acl_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 UpdateACLPayload(BaseModel): """ UpdateACLPayload - """ + """ # noqa: E501 cidr: StrictStr = Field(description="The given IP/IP Range that is permitted to access.") __properties: ClassVar[List[str]] = ["cidr"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/update_acls_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/update_acls_payload.py index 72b5ae06..19e28027 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/update_acls_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/update_acls_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 UpdateACLsPayload(BaseModel): """ UpdateACLsPayload - """ + """ # noqa: E501 cidrs: Optional[List[UpdateACLPayload]] = None __properties: ClassVar[List[str]] = ["cidrs"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/update_instance_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/update_instance_payload.py index cd2242f0..a3b88307 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/update_instance_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/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 @@ -24,7 +24,7 @@ class UpdateInstancePayload(BaseModel): """ UpdateInstancePayload - """ + """ # noqa: E501 name: StrictStr = Field(description="A user chosen name to distinguish multiple secrets manager instances.") __properties: ClassVar[List[str]] = ["name"] diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/update_user_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/update_user_payload.py index 506a1c55..1922bb7d 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/update_user_payload.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/update_user_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 UpdateUserPayload(BaseModel): """ UpdateUserPayload - """ + """ # noqa: E501 description: Optional[StrictStr] = Field( default=None, description="A user chosen description to differentiate between multiple users." diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/user.py b/services/secretsmanager/src/stackit/secretsmanager/models/user.py index d469a48e..63aa0e93 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/user.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/user.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 User(BaseModel): """ User - """ + """ # noqa: E501 description: StrictStr = Field(description="A user chosen description to differentiate between multiple users.") id: StrictStr = Field(description="A auto generated unique id which identifies the users.") diff --git a/services/secretsmanager/src/stackit/secretsmanager/rest.py b/services/secretsmanager/src/stackit/secretsmanager/rest.py index 0c452a50..8af4c017 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/rest.py +++ b/services/secretsmanager/src/stackit/secretsmanager/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: