diff --git a/services/resourcemanager/src/stackit/resourcemanager/__init__.py b/services/resourcemanager/src/stackit/resourcemanager/__init__.py index 3542fb2c..93907345 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/__init__.py +++ b/services/resourcemanager/src/stackit/resourcemanager/__init__.py @@ -11,59 +11,109 @@ 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", + "CreateFolderPayload", + "CreateProjectPayload", + "ErrorResponse", + "FolderResponse", + "GetFolderDetailsResponse", + "GetProjectResponse", + "LifecycleState", + "ListFoldersResponse", + "ListFoldersResponseItemsInner", + "ListOrganizationsResponse", + "ListOrganizationsResponseItemsInner", + "ListProjectsResponse", + "Member", + "OrganizationResponse", + "Parent", + "ParentListInner", + "PartialUpdateFolderPayload", + "PartialUpdateOrganizationPayload", + "PartialUpdateProjectPayload", + "Project", +] + # import apis into sdk package -from stackit.resourcemanager.api.default_api import DefaultApi -from stackit.resourcemanager.api_client import ApiClient +from stackit.resourcemanager.api.default_api import DefaultApi as DefaultApi +from stackit.resourcemanager.api_client import ApiClient as ApiClient # import ApiClient -from stackit.resourcemanager.api_response import ApiResponse -from stackit.resourcemanager.configuration import HostConfiguration -from stackit.resourcemanager.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.resourcemanager.api_response import ApiResponse as ApiResponse +from stackit.resourcemanager.configuration import HostConfiguration as HostConfiguration +from stackit.resourcemanager.exceptions import ApiAttributeError as ApiAttributeError +from stackit.resourcemanager.exceptions import ApiException as ApiException +from stackit.resourcemanager.exceptions import ApiKeyError as ApiKeyError +from stackit.resourcemanager.exceptions import ApiTypeError as ApiTypeError +from stackit.resourcemanager.exceptions import ApiValueError as ApiValueError +from stackit.resourcemanager.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.resourcemanager.models.create_folder_payload import CreateFolderPayload -from stackit.resourcemanager.models.create_project_payload import CreateProjectPayload -from stackit.resourcemanager.models.error_response import ErrorResponse -from stackit.resourcemanager.models.folder_response import FolderResponse +from stackit.resourcemanager.models.create_folder_payload import ( + CreateFolderPayload as CreateFolderPayload, +) +from stackit.resourcemanager.models.create_project_payload import ( + CreateProjectPayload as CreateProjectPayload, +) +from stackit.resourcemanager.models.error_response import ErrorResponse as ErrorResponse +from stackit.resourcemanager.models.folder_response import ( + FolderResponse as FolderResponse, +) from stackit.resourcemanager.models.get_folder_details_response import ( - GetFolderDetailsResponse, + GetFolderDetailsResponse as GetFolderDetailsResponse, +) +from stackit.resourcemanager.models.get_project_response import ( + GetProjectResponse as GetProjectResponse, +) +from stackit.resourcemanager.models.lifecycle_state import ( + LifecycleState as LifecycleState, +) +from stackit.resourcemanager.models.list_folders_response import ( + ListFoldersResponse as ListFoldersResponse, ) -from stackit.resourcemanager.models.get_project_response import GetProjectResponse -from stackit.resourcemanager.models.lifecycle_state import LifecycleState -from stackit.resourcemanager.models.list_folders_response import ListFoldersResponse from stackit.resourcemanager.models.list_folders_response_items_inner import ( - ListFoldersResponseItemsInner, + ListFoldersResponseItemsInner as ListFoldersResponseItemsInner, ) from stackit.resourcemanager.models.list_organizations_response import ( - ListOrganizationsResponse, + ListOrganizationsResponse as ListOrganizationsResponse, ) from stackit.resourcemanager.models.list_organizations_response_items_inner import ( - ListOrganizationsResponseItemsInner, + ListOrganizationsResponseItemsInner as ListOrganizationsResponseItemsInner, +) +from stackit.resourcemanager.models.list_projects_response import ( + ListProjectsResponse as ListProjectsResponse, +) +from stackit.resourcemanager.models.member import Member as Member +from stackit.resourcemanager.models.organization_response import ( + OrganizationResponse as OrganizationResponse, +) +from stackit.resourcemanager.models.parent import Parent as Parent +from stackit.resourcemanager.models.parent_list_inner import ( + ParentListInner as ParentListInner, ) -from stackit.resourcemanager.models.list_projects_response import ListProjectsResponse -from stackit.resourcemanager.models.member import Member -from stackit.resourcemanager.models.organization_response import OrganizationResponse -from stackit.resourcemanager.models.parent import Parent -from stackit.resourcemanager.models.parent_list_inner import ParentListInner from stackit.resourcemanager.models.partial_update_folder_payload import ( - PartialUpdateFolderPayload, + PartialUpdateFolderPayload as PartialUpdateFolderPayload, ) from stackit.resourcemanager.models.partial_update_organization_payload import ( - PartialUpdateOrganizationPayload, + PartialUpdateOrganizationPayload as PartialUpdateOrganizationPayload, ) from stackit.resourcemanager.models.partial_update_project_payload import ( - PartialUpdateProjectPayload, + PartialUpdateProjectPayload as PartialUpdateProjectPayload, ) -from stackit.resourcemanager.models.project import Project +from stackit.resourcemanager.models.project import Project as Project diff --git a/services/resourcemanager/src/stackit/resourcemanager/api/default_api.py b/services/resourcemanager/src/stackit/resourcemanager/api/default_api.py index 69764841..d8ecf9f4 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/api/default_api.py +++ b/services/resourcemanager/src/stackit/resourcemanager/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 datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union @@ -99,7 +99,7 @@ def create_folder( 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_folder_serialize( create_folder_payload=create_folder_payload, @@ -162,7 +162,7 @@ def create_folder_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_folder_serialize( create_folder_payload=create_folder_payload, @@ -225,7 +225,7 @@ def create_folder_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_folder_serialize( create_folder_payload=create_folder_payload, @@ -261,7 +261,7 @@ def _create_folder_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 @@ -342,7 +342,7 @@ def create_project( 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_project_serialize( create_project_payload=create_project_payload, @@ -405,7 +405,7 @@ def create_project_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_project_serialize( create_project_payload=create_project_payload, @@ -468,7 +468,7 @@ def create_project_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_project_serialize( create_project_payload=create_project_payload, @@ -504,7 +504,7 @@ def _create_project_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -595,7 +595,7 @@ def delete_folder( 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_folder_serialize( container_id=container_id, @@ -668,7 +668,7 @@ def delete_folder_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_folder_serialize( container_id=container_id, @@ -741,7 +741,7 @@ def delete_folder_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_folder_serialize( container_id=container_id, @@ -778,7 +778,7 @@ def _delete_folder_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 @@ -860,7 +860,7 @@ def delete_folder_labels( 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_folder_labels_serialize( container_id=container_id, @@ -927,7 +927,7 @@ def delete_folder_labels_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_folder_labels_serialize( container_id=container_id, @@ -994,7 +994,7 @@ def delete_folder_labels_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_folder_labels_serialize( container_id=container_id, @@ -1032,7 +1032,7 @@ def _delete_folder_labels_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_organization_labels( 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_organization_labels_serialize( container_id=container_id, @@ -1183,7 +1183,7 @@ def delete_organization_labels_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_organization_labels_serialize( container_id=container_id, @@ -1251,7 +1251,7 @@ def delete_organization_labels_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_organization_labels_serialize( container_id=container_id, @@ -1289,7 +1289,7 @@ def _delete_organization_labels_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 @@ -1368,7 +1368,7 @@ def delete_project( 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_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index @@ -1427,7 +1427,7 @@ def delete_project_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_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index @@ -1486,7 +1486,7 @@ def delete_project_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_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index @@ -1516,7 +1516,7 @@ def _delete_project_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 @@ -1594,7 +1594,7 @@ def delete_project_labels( 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_project_labels_serialize( container_id=container_id, @@ -1661,7 +1661,7 @@ def delete_project_labels_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_project_labels_serialize( container_id=container_id, @@ -1728,7 +1728,7 @@ def delete_project_labels_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_project_labels_serialize( container_id=container_id, @@ -1766,7 +1766,7 @@ def _delete_project_labels_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 @@ -1848,7 +1848,7 @@ def get_folder_details( 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_folder_details_serialize( container_id=container_id, @@ -1916,7 +1916,7 @@ def get_folder_details_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_folder_details_serialize( container_id=container_id, @@ -1984,7 +1984,7 @@ def get_folder_details_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_folder_details_serialize( container_id=container_id, @@ -2021,7 +2021,7 @@ def _get_folder_details_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 @@ -2101,7 +2101,7 @@ def get_organization( 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_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index @@ -2161,7 +2161,7 @@ def get_organization_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_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index @@ -2221,7 +2221,7 @@ def get_organization_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_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index @@ -2251,7 +2251,7 @@ def _get_organization_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 @@ -2329,7 +2329,7 @@ def get_project( 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_project_serialize( id=id, @@ -2397,7 +2397,7 @@ def get_project_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_project_serialize( id=id, @@ -2465,7 +2465,7 @@ def get_project_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_project_serialize( id=id, @@ -2502,7 +2502,7 @@ def _get_project_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 @@ -2624,7 +2624,7 @@ def list_folders( 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_folders_serialize( container_parent_id=container_parent_id, @@ -2737,7 +2737,7 @@ def list_folders_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_folders_serialize( container_parent_id=container_parent_id, @@ -2850,7 +2850,7 @@ def list_folders_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_folders_serialize( container_parent_id=container_parent_id, @@ -2898,7 +2898,7 @@ def _list_folders_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 @@ -3036,7 +3036,7 @@ def list_organizations( 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_organizations_serialize( container_ids=container_ids, @@ -3141,7 +3141,7 @@ def list_organizations_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_organizations_serialize( container_ids=container_ids, @@ -3246,7 +3246,7 @@ def list_organizations_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_organizations_serialize( container_ids=container_ids, @@ -3291,7 +3291,7 @@ def _list_organizations_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 @@ -3431,7 +3431,7 @@ def list_projects( 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_projects_serialize( container_parent_id=container_parent_id, @@ -3543,7 +3543,7 @@ def list_projects_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_projects_serialize( container_parent_id=container_parent_id, @@ -3655,7 +3655,7 @@ def list_projects_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_projects_serialize( container_parent_id=container_parent_id, @@ -3702,7 +3702,7 @@ def _list_projects_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 @@ -3806,7 +3806,7 @@ def partial_update_folder( 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_folder_serialize( container_id=container_id, @@ -3875,7 +3875,7 @@ def partial_update_folder_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_folder_serialize( container_id=container_id, @@ -3944,7 +3944,7 @@ def partial_update_folder_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_folder_serialize( container_id=container_id, @@ -3982,7 +3982,7 @@ def _partial_update_folder_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 @@ -4071,7 +4071,7 @@ def partial_update_organization( 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_organization_serialize( id=id, @@ -4140,7 +4140,7 @@ def partial_update_organization_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_organization_serialize( id=id, @@ -4209,7 +4209,7 @@ def partial_update_organization_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_organization_serialize( id=id, @@ -4246,7 +4246,7 @@ def _partial_update_organization_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 @@ -4334,7 +4334,7 @@ def partial_update_project( 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_project_serialize( id=id, @@ -4403,7 +4403,7 @@ def partial_update_project_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_project_serialize( id=id, @@ -4472,7 +4472,7 @@ def partial_update_project_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_project_serialize( id=id, @@ -4510,7 +4510,7 @@ def _partial_update_project_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/resourcemanager/src/stackit/resourcemanager/api_client.py b/services/resourcemanager/src/stackit/resourcemanager/api_client.py index 04793ba2..1cc38eac 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/api_client.py +++ b/services/resourcemanager/src/stackit/resourcemanager/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() # noqa: E501 + 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/resourcemanager/src/stackit/resourcemanager/configuration.py b/services/resourcemanager/src/stackit/resourcemanager/configuration.py index a8973ec4..14dec45e 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/configuration.py +++ b/services/resourcemanager/src/stackit/resourcemanager/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ Resource 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 @@ -71,7 +88,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 @@ -111,7 +133,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"]) @@ -130,12 +152,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/resourcemanager/src/stackit/resourcemanager/exceptions.py b/services/resourcemanager/src/stackit/resourcemanager/exceptions.py index 3687fe03..788747e3 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/exceptions.py +++ b/services/resourcemanager/src/stackit/resourcemanager/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 @@ -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/resourcemanager/src/stackit/resourcemanager/models/__init__.py b/services/resourcemanager/src/stackit/resourcemanager/models/__init__.py index ded70b65..2fcfe0a0 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/__init__.py +++ b/services/resourcemanager/src/stackit/resourcemanager/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/resourcemanager/src/stackit/resourcemanager/models/create_folder_payload.py b/services/resourcemanager/src/stackit/resourcemanager/models/create_folder_payload.py index f8b3c415..3cc18891 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/create_folder_payload.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/create_folder_payload.py @@ -9,13 +9,13 @@ 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 import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -27,7 +27,7 @@ class CreateFolderPayload(BaseModel): """ CreateFolderPayload - """ + """ # noqa: E501 container_parent_id: StrictStr = Field( description="Identifier of the parent resource container - containerId as well as UUID identifier is supported.", diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/create_project_payload.py b/services/resourcemanager/src/stackit/resourcemanager/models/create_project_payload.py index 1ecde16d..a452bc30 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/create_project_payload.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/create_project_payload.py @@ -9,13 +9,13 @@ 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 import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -27,7 +27,7 @@ class CreateProjectPayload(BaseModel): """ CreateProjectPayload - """ + """ # noqa: E501 container_parent_id: StrictStr = Field( description="Identifier of the parent resource container - containerId as well as UUID identifier is supported.", diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/error_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/error_response.py index 3f06f705..d6225a66 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/error_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/error_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 @@ -25,7 +25,7 @@ class ErrorResponse(BaseModel): """ ErrorResponse - """ + """ # noqa: E501 error: StrictStr = Field(description="The reason phrase of the status code.") message: StrictStr = Field(description="Description of the error.") diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/folder_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/folder_response.py index 0b9e41f7..37d8925e 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/folder_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/folder_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 @@ -27,7 +27,7 @@ class FolderResponse(BaseModel): """ FolderResponse - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique, user-friendly identifier.", alias="containerId") creation_time: datetime = Field(description="Timestamp at which the folder was created.", alias="creationTime") diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/get_folder_details_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/get_folder_details_response.py index 69258c45..1971ad9e 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/get_folder_details_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/get_folder_details_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 @@ -28,7 +28,7 @@ class GetFolderDetailsResponse(BaseModel): """ GetFolderDetailsResponse - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique user-friendly identifier.", alias="containerId") creation_time: datetime = Field(description="Timestamp at which the folder was created.", alias="creationTime") diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/get_project_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/get_project_response.py index 1a5205ce..60b1308a 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/get_project_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/get_project_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 @@ -29,7 +29,7 @@ class GetProjectResponse(BaseModel): """ GetProjectResponse - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique identifier.", alias="containerId") creation_time: datetime = Field(description="Timestamp at which the project was created.", alias="creationTime") diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/lifecycle_state.py b/services/resourcemanager/src/stackit/resourcemanager/models/lifecycle_state.py index 7770a4d8..7d486bab 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/lifecycle_state.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/lifecycle_state.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 diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response.py index 132de13f..9580b584 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_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 @@ -28,7 +28,7 @@ class ListFoldersResponse(BaseModel): """ ListFoldersResponse - """ + """ # noqa: E501 items: List[ListFoldersResponseItemsInner] limit: Union[ diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response_items_inner.py b/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response_items_inner.py index b569c03a..45a7b024 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response_items_inner.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/list_folders_response_items_inner.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 ListFoldersResponseItemsInner(BaseModel): """ ListFoldersResponseItemsInner - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique folder identifier.", alias="containerId") creation_time: datetime = Field(description="Timestamp at which the folder was created.", alias="creationTime") diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response.py index f89144ba..7b6da4a9 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_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 @@ -28,7 +28,7 @@ class ListOrganizationsResponse(BaseModel): """ ListOrganizationsResponse - """ + """ # noqa: E501 items: List[ListOrganizationsResponseItemsInner] limit: Union[ diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response_items_inner.py b/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response_items_inner.py index c7647f92..dc0ab923 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response_items_inner.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/list_organizations_response_items_inner.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 ListOrganizationsResponseItemsInner(BaseModel): """ ListOrganizationsResponseItemsInner - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique, user-friendly identifier.", alias="containerId") creation_time: datetime = Field( diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/list_projects_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/list_projects_response.py index 8b7c95b1..2b22bbfe 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/list_projects_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/list_projects_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 ListProjectsResponse(BaseModel): """ ListProjectsResponse - """ + """ # noqa: E501 items: List[Project] limit: Union[ diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/member.py b/services/resourcemanager/src/stackit/resourcemanager/models/member.py index 83566153..7ceebfb4 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/member.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/member.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 Member(BaseModel): """ Member - """ + """ # noqa: E501 role: StrictStr = Field(description="A valid role defined for the resource.") subject: StrictStr = Field(description="Unique identifier of the user, service account or client.") diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/organization_response.py b/services/resourcemanager/src/stackit/resourcemanager/models/organization_response.py index 8413b607..a21adec4 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/organization_response.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/organization_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 @@ -27,7 +27,7 @@ class OrganizationResponse(BaseModel): """ OrganizationResponse - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique, user-friendly identifier.", alias="containerId") creation_time: datetime = Field( diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/parent.py b/services/resourcemanager/src/stackit/resourcemanager/models/parent.py index 5fcfb105..4517630f 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/parent.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/parent.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 Parent(BaseModel): """ Parent container. - """ + """ # noqa: E501 container_id: StrictStr = Field( description="User-friendly identifier of either organization or folder (will replace id).", alias="containerId" diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/parent_list_inner.py b/services/resourcemanager/src/stackit/resourcemanager/models/parent_list_inner.py index 6c9d1457..04d02d37 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/parent_list_inner.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/parent_list_inner.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 ParentListInner(BaseModel): """ ParentListInner - """ + """ # noqa: E501 container_id: StrictStr = Field( description="User-friendly identifier of either organization or folder (will replace id).", alias="containerId" diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_folder_payload.py b/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_folder_payload.py index 4f62d928..2588afd4 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_folder_payload.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_folder_payload.py @@ -9,13 +9,13 @@ 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 import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -25,7 +25,7 @@ class PartialUpdateFolderPayload(BaseModel): """ PartialUpdateFolderPayload - """ + """ # noqa: E501 container_parent_id: Optional[StrictStr] = Field( default=None, diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_organization_payload.py b/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_organization_payload.py index 8346b5e3..4330fee4 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_organization_payload.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_organization_payload.py @@ -9,13 +9,13 @@ 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 import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -25,7 +25,7 @@ class PartialUpdateOrganizationPayload(BaseModel): """ PartialUpdateOrganizationPayload - """ + """ # noqa: E501 labels: Optional[Dict[str, StrictStr]] = Field( default=None, diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_project_payload.py b/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_project_payload.py index e093f89e..6370472a 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_project_payload.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/partial_update_project_payload.py @@ -9,13 +9,13 @@ 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 import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -25,7 +25,7 @@ class PartialUpdateProjectPayload(BaseModel): """ PartialUpdateProjectPayload - """ + """ # noqa: E501 container_parent_id: Optional[StrictStr] = Field( default=None, diff --git a/services/resourcemanager/src/stackit/resourcemanager/models/project.py b/services/resourcemanager/src/stackit/resourcemanager/models/project.py index 41e54816..2e8840df 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/models/project.py +++ b/services/resourcemanager/src/stackit/resourcemanager/models/project.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 @@ -28,7 +28,7 @@ class Project(BaseModel): """ Project - """ + """ # noqa: E501 container_id: StrictStr = Field(description="Globally unique, user-friendly identifier.", alias="containerId") creation_time: datetime = Field(description="Timestamp at which the project was created.", alias="creationTime") diff --git a/services/resourcemanager/src/stackit/resourcemanager/rest.py b/services/resourcemanager/src/stackit/resourcemanager/rest.py index 10f6f712..01075625 100644 --- a/services/resourcemanager/src/stackit/resourcemanager/rest.py +++ b/services/resourcemanager/src/stackit/resourcemanager/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: