From 77abd46daca4332ada848c93907f1a46b1504c52 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 4 Jul 2025 09:05:49 +0000 Subject: [PATCH] Generate serviceaccount --- .../src/stackit/serviceaccount/__init__.py | 110 ++++++++++++------ .../stackit/serviceaccount/api/default_api.py | 106 ++++++++--------- .../src/stackit/serviceaccount/api_client.py | 23 +++- .../stackit/serviceaccount/configuration.py | 44 +++++-- .../src/stackit/serviceaccount/exceptions.py | 23 +++- .../stackit/serviceaccount/models/__init__.py | 2 +- .../serviceaccount/models/access_token.py | 4 +- .../models/access_token_metadata.py | 4 +- .../serviceaccount/models/auth_error.py | 4 +- .../serviceaccount/models/auth_error_error.py | 4 +- .../models/create_access_token_payload.py | 4 +- .../create_service_account_key_payload.py | 4 +- .../create_service_account_key_response.py | 4 +- ...ervice_account_key_response_credentials.py | 4 +- .../models/create_service_account_payload.py | 6 +- ...reate_short_lived_access_token_response.py | 4 +- .../stackit/serviceaccount/models/error.py | 4 +- .../get_service_account_key_response.py | 4 +- ...ervice_account_key_response_credentials.py | 4 +- .../src/stackit/serviceaccount/models/jwk.py | 4 +- .../src/stackit/serviceaccount/models/jwks.py | 4 +- .../models/list_access_tokens_response.py | 4 +- .../list_service_account_keys_response.py | 4 +- .../models/list_service_accounts_response.py | 4 +- ...tial_update_service_account_key_payload.py | 4 +- ...ial_update_service_account_key_response.py | 4 +- .../serviceaccount/models/service_account.py | 4 +- .../service_account_key_list_response.py | 4 +- .../src/stackit/serviceaccount/rest.py | 4 +- 29 files changed, 248 insertions(+), 154 deletions(-) diff --git a/services/serviceaccount/src/stackit/serviceaccount/__init__.py b/services/serviceaccount/src/stackit/serviceaccount/__init__.py index 7557a601..ebb80345 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/__init__.py +++ b/services/serviceaccount/src/stackit/serviceaccount/__init__.py @@ -11,75 +11,115 @@ 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", + "AccessToken", + "AccessTokenMetadata", + "AuthError", + "AuthErrorError", + "CreateAccessTokenPayload", + "CreateServiceAccountKeyPayload", + "CreateServiceAccountKeyResponse", + "CreateServiceAccountKeyResponseCredentials", + "CreateServiceAccountPayload", + "CreateShortLivedAccessTokenResponse", + "Error", + "GetServiceAccountKeyResponse", + "GetServiceAccountKeyResponseCredentials", + "JWK", + "JWKS", + "ListAccessTokensResponse", + "ListServiceAccountKeysResponse", + "ListServiceAccountsResponse", + "PartialUpdateServiceAccountKeyPayload", + "PartialUpdateServiceAccountKeyResponse", + "ServiceAccount", + "ServiceAccountKeyListResponse", +] + # import apis into sdk package -from stackit.serviceaccount.api.default_api import DefaultApi -from stackit.serviceaccount.api_client import ApiClient +from stackit.serviceaccount.api.default_api import DefaultApi as DefaultApi +from stackit.serviceaccount.api_client import ApiClient as ApiClient # import ApiClient -from stackit.serviceaccount.api_response import ApiResponse -from stackit.serviceaccount.configuration import HostConfiguration -from stackit.serviceaccount.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.serviceaccount.api_response import ApiResponse as ApiResponse +from stackit.serviceaccount.configuration import HostConfiguration as HostConfiguration +from stackit.serviceaccount.exceptions import ApiAttributeError as ApiAttributeError +from stackit.serviceaccount.exceptions import ApiException as ApiException +from stackit.serviceaccount.exceptions import ApiKeyError as ApiKeyError +from stackit.serviceaccount.exceptions import ApiTypeError as ApiTypeError +from stackit.serviceaccount.exceptions import ApiValueError as ApiValueError +from stackit.serviceaccount.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.serviceaccount.models.access_token import AccessToken -from stackit.serviceaccount.models.access_token_metadata import AccessTokenMetadata -from stackit.serviceaccount.models.auth_error import AuthError -from stackit.serviceaccount.models.auth_error_error import AuthErrorError +from stackit.serviceaccount.models.access_token import AccessToken as AccessToken +from stackit.serviceaccount.models.access_token_metadata import ( + AccessTokenMetadata as AccessTokenMetadata, +) +from stackit.serviceaccount.models.auth_error import AuthError as AuthError +from stackit.serviceaccount.models.auth_error_error import ( + AuthErrorError as AuthErrorError, +) from stackit.serviceaccount.models.create_access_token_payload import ( - CreateAccessTokenPayload, + CreateAccessTokenPayload as CreateAccessTokenPayload, ) from stackit.serviceaccount.models.create_service_account_key_payload import ( - CreateServiceAccountKeyPayload, + CreateServiceAccountKeyPayload as CreateServiceAccountKeyPayload, ) from stackit.serviceaccount.models.create_service_account_key_response import ( - CreateServiceAccountKeyResponse, + CreateServiceAccountKeyResponse as CreateServiceAccountKeyResponse, ) from stackit.serviceaccount.models.create_service_account_key_response_credentials import ( - CreateServiceAccountKeyResponseCredentials, + CreateServiceAccountKeyResponseCredentials as CreateServiceAccountKeyResponseCredentials, ) from stackit.serviceaccount.models.create_service_account_payload import ( - CreateServiceAccountPayload, + CreateServiceAccountPayload as CreateServiceAccountPayload, ) from stackit.serviceaccount.models.create_short_lived_access_token_response import ( - CreateShortLivedAccessTokenResponse, + CreateShortLivedAccessTokenResponse as CreateShortLivedAccessTokenResponse, ) -from stackit.serviceaccount.models.error import Error +from stackit.serviceaccount.models.error import Error as Error from stackit.serviceaccount.models.get_service_account_key_response import ( - GetServiceAccountKeyResponse, + GetServiceAccountKeyResponse as GetServiceAccountKeyResponse, ) from stackit.serviceaccount.models.get_service_account_key_response_credentials import ( - GetServiceAccountKeyResponseCredentials, + GetServiceAccountKeyResponseCredentials as GetServiceAccountKeyResponseCredentials, ) -from stackit.serviceaccount.models.jwk import JWK -from stackit.serviceaccount.models.jwks import JWKS +from stackit.serviceaccount.models.jwk import JWK as JWK +from stackit.serviceaccount.models.jwks import JWKS as JWKS from stackit.serviceaccount.models.list_access_tokens_response import ( - ListAccessTokensResponse, + ListAccessTokensResponse as ListAccessTokensResponse, ) from stackit.serviceaccount.models.list_service_account_keys_response import ( - ListServiceAccountKeysResponse, + ListServiceAccountKeysResponse as ListServiceAccountKeysResponse, ) from stackit.serviceaccount.models.list_service_accounts_response import ( - ListServiceAccountsResponse, + ListServiceAccountsResponse as ListServiceAccountsResponse, ) from stackit.serviceaccount.models.partial_update_service_account_key_payload import ( - PartialUpdateServiceAccountKeyPayload, + PartialUpdateServiceAccountKeyPayload as PartialUpdateServiceAccountKeyPayload, ) from stackit.serviceaccount.models.partial_update_service_account_key_response import ( - PartialUpdateServiceAccountKeyResponse, + PartialUpdateServiceAccountKeyResponse as PartialUpdateServiceAccountKeyResponse, +) +from stackit.serviceaccount.models.service_account import ( + ServiceAccount as ServiceAccount, ) -from stackit.serviceaccount.models.service_account import ServiceAccount from stackit.serviceaccount.models.service_account_key_list_response import ( - ServiceAccountKeyListResponse, + ServiceAccountKeyListResponse as ServiceAccountKeyListResponse, ) diff --git a/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py b/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py index 290cbd9d..eef8af61 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py +++ b/services/serviceaccount/src/stackit/serviceaccount/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 @@ -126,7 +126,7 @@ def create_access_token( 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_access_token_serialize( project_id=project_id, @@ -201,7 +201,7 @@ def create_access_token_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_access_token_serialize( project_id=project_id, @@ -276,7 +276,7 @@ def create_access_token_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_access_token_serialize( project_id=project_id, @@ -317,7 +317,7 @@ def _create_access_token_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 @@ -407,7 +407,7 @@ def create_service_account( 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_service_account_serialize( project_id=project_id, @@ -477,7 +477,7 @@ def create_service_account_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_service_account_serialize( project_id=project_id, @@ -547,7 +547,7 @@ def create_service_account_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_service_account_serialize( project_id=project_id, @@ -586,7 +586,7 @@ def _create_service_account_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 @@ -677,7 +677,7 @@ def create_service_account_key( 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_service_account_key_serialize( project_id=project_id, @@ -751,7 +751,7 @@ def create_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -825,7 +825,7 @@ def create_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -866,7 +866,7 @@ def _create_service_account_key_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 @@ -972,7 +972,7 @@ def create_short_lived_access_token( 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_short_lived_access_token_serialize( grant_type=grant_type, @@ -1055,7 +1055,7 @@ def create_short_lived_access_token_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_short_lived_access_token_serialize( grant_type=grant_type, @@ -1138,7 +1138,7 @@ def create_short_lived_access_token_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_short_lived_access_token_serialize( grant_type=grant_type, @@ -1175,7 +1175,7 @@ def _create_short_lived_access_token_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 @@ -1266,7 +1266,7 @@ def delete_access_token( 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_access_token_serialize( project_id=project_id, @@ -1339,7 +1339,7 @@ def delete_access_token_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_access_token_serialize( project_id=project_id, @@ -1412,7 +1412,7 @@ def delete_access_token_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_access_token_serialize( project_id=project_id, @@ -1454,7 +1454,7 @@ def _delete_access_token_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 @@ -1534,7 +1534,7 @@ def delete_service_account( 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_service_account_serialize( project_id=project_id, @@ -1602,7 +1602,7 @@ def delete_service_account_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_service_account_serialize( project_id=project_id, @@ -1670,7 +1670,7 @@ def delete_service_account_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_service_account_serialize( project_id=project_id, @@ -1709,7 +1709,7 @@ def _delete_service_account_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 @@ -1790,7 +1790,7 @@ def delete_service_account_key( 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_service_account_key_serialize( project_id=project_id, @@ -1861,7 +1861,7 @@ def delete_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -1932,7 +1932,7 @@ def delete_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -1972,7 +1972,7 @@ def _delete_service_account_key_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 @@ -2049,7 +2049,7 @@ def get_jwks( 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_jwks_serialize( service_account_email=service_account_email, @@ -2109,7 +2109,7 @@ def get_jwks_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_jwks_serialize( service_account_email=service_account_email, @@ -2169,7 +2169,7 @@ def get_jwks_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_jwks_serialize( service_account_email=service_account_email, @@ -2202,7 +2202,7 @@ def _get_jwks_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 @@ -2284,7 +2284,7 @@ def get_service_account_key( 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_service_account_key_serialize( project_id=project_id, @@ -2359,7 +2359,7 @@ def get_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -2434,7 +2434,7 @@ def get_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -2476,7 +2476,7 @@ def _get_service_account_key_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 @@ -2560,7 +2560,7 @@ def list_access_tokens( 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_access_tokens_serialize( project_id=project_id, @@ -2628,7 +2628,7 @@ def list_access_tokens_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_access_tokens_serialize( project_id=project_id, @@ -2696,7 +2696,7 @@ def list_access_tokens_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_access_tokens_serialize( project_id=project_id, @@ -2735,7 +2735,7 @@ def _list_access_tokens_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 @@ -2813,7 +2813,7 @@ def list_service_account_keys( 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_service_account_keys_serialize( project_id=project_id, @@ -2880,7 +2880,7 @@ def list_service_account_keys_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_service_account_keys_serialize( project_id=project_id, @@ -2947,7 +2947,7 @@ def list_service_account_keys_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_service_account_keys_serialize( project_id=project_id, @@ -2985,7 +2985,7 @@ def _list_service_account_keys_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 @@ -3060,7 +3060,7 @@ def list_service_accounts( 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_service_accounts_serialize( project_id=project_id, @@ -3123,7 +3123,7 @@ def list_service_accounts_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_service_accounts_serialize( project_id=project_id, @@ -3186,7 +3186,7 @@ def list_service_accounts_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_service_accounts_serialize( project_id=project_id, @@ -3222,7 +3222,7 @@ def _list_service_accounts_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3306,7 +3306,7 @@ def partial_update_service_account_key( 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_service_account_key_serialize( project_id=project_id, @@ -3384,7 +3384,7 @@ def partial_update_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -3462,7 +3462,7 @@ def partial_update_service_account_key_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_service_account_key_serialize( project_id=project_id, @@ -3505,7 +3505,7 @@ def _partial_update_service_account_key_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/serviceaccount/src/stackit/serviceaccount/api_client.py b/services/serviceaccount/src/stackit/serviceaccount/api_client.py index e86d1fb7..36a68fd1 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/api_client.py +++ b/services/serviceaccount/src/stackit/serviceaccount/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/serviceaccount/src/stackit/serviceaccount/configuration.py b/services/serviceaccount/src/stackit/serviceaccount/configuration.py index baaf4134..06b6cf06 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/configuration.py +++ b/services/serviceaccount/src/stackit/serviceaccount/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ Service Account 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/serviceaccount/src/stackit/serviceaccount/exceptions.py b/services/serviceaccount/src/stackit/serviceaccount/exceptions.py index c7a6f6df..9288a897 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/exceptions.py +++ b/services/serviceaccount/src/stackit/serviceaccount/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/serviceaccount/src/stackit/serviceaccount/models/__init__.py b/services/serviceaccount/src/stackit/serviceaccount/models/__init__.py index 0b65f595..5fff0f6a 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/__init__.py +++ b/services/serviceaccount/src/stackit/serviceaccount/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/serviceaccount/src/stackit/serviceaccount/models/access_token.py b/services/serviceaccount/src/stackit/serviceaccount/models/access_token.py index dde28347..8aeee541 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/access_token.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/access_token.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 AccessToken(BaseModel): """ Contains token metadata and actual token. - """ + """ # noqa: E501 active: StrictBool = Field(description="Newly created access tokens are valid, and can be revoked if needed.") created_at: datetime = Field(description="Creation time of the access token.", alias="createdAt") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py b/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py index 2a9ec9a0..df2ffbfe 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.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 AccessTokenMetadata(BaseModel): """ Does not contain the actual token. - """ + """ # noqa: E501 active: StrictBool = Field( description="If true, access token can be used for authorized API calls, if false, the token is not usable anymore." diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/auth_error.py b/services/serviceaccount/src/stackit/serviceaccount/models/auth_error.py index c1304e79..5372d234 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/auth_error.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/auth_error.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class AuthError(BaseModel): """ AuthError - """ + """ # noqa: E501 error: AuthErrorError __properties: ClassVar[List[str]] = ["error"] diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/auth_error_error.py b/services/serviceaccount/src/stackit/serviceaccount/models/auth_error_error.py index a417bd0a..a698c142 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/auth_error_error.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/auth_error_error.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class AuthErrorError(BaseModel): """ AuthErrorError - """ + """ # noqa: E501 code: StrictInt message: StrictStr diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_access_token_payload.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_access_token_payload.py index b61b56c1..e635a10f 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_access_token_payload.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_access_token_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 CreateAccessTokenPayload(BaseModel): """ CreateAccessTokenPayload - """ + """ # noqa: E501 ttl_days: Annotated[int, Field(le=180, strict=True, ge=1)] = Field( description="The duration in days for how long the new Access Token should be valid.", alias="ttlDays" diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_payload.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_payload.py index def9ae38..e40ed290 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_payload.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_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 @@ -25,7 +25,7 @@ class CreateServiceAccountKeyPayload(BaseModel): """ CreateServiceAccountKeyPayload - """ + """ # noqa: E501 public_key: Optional[StrictStr] = Field( default=None, diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py index 74085417..5f618bb5 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_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 @@ -36,7 +36,7 @@ class CreateServiceAccountKeyResponse(BaseModel): """ CreateServiceAccountKeyResponse - """ + """ # noqa: E501 active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py index b6e1fdd0..2d9b3c78 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class CreateServiceAccountKeyResponseCredentials(BaseModel): """ CreateServiceAccountKeyResponseCredentials - """ + """ # noqa: E501 aud: StrictStr = Field(description="Audience - service account API URL") iss: StrictStr = Field(description="Service account email") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_payload.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_payload.py index a176038c..7cf2f5c4 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_payload.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_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, field_validator @@ -25,7 +25,7 @@ class CreateServiceAccountPayload(BaseModel): """ CreateServiceAccountPayload - """ + """ # noqa: E501 name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field( description="The requested name of the service account. The service will generate a unique email from this name." diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_short_lived_access_token_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_short_lived_access_token_response.py index abe1e10f..8afb1be2 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_short_lived_access_token_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_short_lived_access_token_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class CreateShortLivedAccessTokenResponse(BaseModel): """ CreateShortLivedAccessTokenResponse - """ + """ # noqa: E501 access_token: StrictStr = Field(description="The short lived token that can be used for API access") expires_in: StrictInt diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/error.py b/services/serviceaccount/src/stackit/serviceaccount/models/error.py index 0c0f495e..9c1bcb0f 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/error.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/error.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class Error(BaseModel): """ Contains error information. - """ + """ # noqa: E501 error: StrictStr message: StrictStr diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py index 87ba3c71..583cd87b 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_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 @@ -36,7 +36,7 @@ class GetServiceAccountKeyResponse(BaseModel): """ GetServiceAccountKeyResponse - """ + """ # noqa: E501 active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py index 79ed20b7..7748c5d0 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class GetServiceAccountKeyResponseCredentials(BaseModel): """ GetServiceAccountKeyResponseCredentials - """ + """ # noqa: E501 aud: StrictStr = Field(description="Audience - service account API URL") iss: StrictStr = Field(description="Service account email") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/jwk.py b/services/serviceaccount/src/stackit/serviceaccount/models/jwk.py index 100f4c72..5083215f 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/jwk.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/jwk.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 JWK(BaseModel): """ JSON Web Key according to https://datatracker.ietf.org/doc/html/rfc7517#section-4 - """ + """ # noqa: E501 alg: Optional[StrictStr] = None e: StrictStr diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/jwks.py b/services/serviceaccount/src/stackit/serviceaccount/models/jwks.py index 89200fcb..312fad5f 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/jwks.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/jwks.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 JWKS(BaseModel): """ JWKS - """ + """ # noqa: E501 keys: List[JWK] __properties: ClassVar[List[str]] = ["keys"] diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/list_access_tokens_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/list_access_tokens_response.py index 1e85d08f..8ebd0ec3 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/list_access_tokens_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/list_access_tokens_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 ListAccessTokensResponse(BaseModel): """ ListAccessTokensResponse - """ + """ # noqa: E501 items: Optional[List[AccessTokenMetadata]] = None __properties: ClassVar[List[str]] = ["items"] diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/list_service_account_keys_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/list_service_account_keys_response.py index 04c1bf2e..92730a02 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/list_service_account_keys_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/list_service_account_keys_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 ListServiceAccountKeysResponse(BaseModel): """ ListServiceAccountKeysResponse - """ + """ # noqa: E501 items: List[ServiceAccountKeyListResponse] __properties: ClassVar[List[str]] = ["items"] diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/list_service_accounts_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/list_service_accounts_response.py index 2504393f..78865960 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/list_service_accounts_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/list_service_accounts_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 ListServiceAccountsResponse(BaseModel): """ ListServiceAccountsResponse - """ + """ # noqa: E501 items: List[ServiceAccount] __properties: ClassVar[List[str]] = ["items"] diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_payload.py b/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_payload.py index 4fb1bf5a..c4c16a7f 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_payload.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_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 @@ -25,7 +25,7 @@ class PartialUpdateServiceAccountKeyPayload(BaseModel): """ PartialUpdateServiceAccountKeyPayload - """ + """ # noqa: E501 active: Optional[StrictBool] = Field( default=None, description="Active keys are valid, while inactive keys are temporarily deactivated." diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py index 02413fe7..4917402d 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_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 @@ -32,7 +32,7 @@ class PartialUpdateServiceAccountKeyResponse(BaseModel): """ PartialUpdateServiceAccountKeyResponse - """ + """ # noqa: E501 active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py b/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py index 7ac89689..7d781fca 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/service_account.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 ServiceAccount(BaseModel): """ ServiceAccount - """ + """ # noqa: E501 email: StrictStr = Field( description="Unique identifier of the service account in format of an email address generated by the service containing the prefix provided by the user during creation." diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py index 6b686fc0..0b5463ce 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_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 @@ -32,7 +32,7 @@ class ServiceAccountKeyListResponse(BaseModel): """ ServiceAccountKeyListResponse - """ + """ # noqa: E501 active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") diff --git a/services/serviceaccount/src/stackit/serviceaccount/rest.py b/services/serviceaccount/src/stackit/serviceaccount/rest.py index 01ecd4d5..36442489 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/rest.py +++ b/services/serviceaccount/src/stackit/serviceaccount/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: