diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b6e48119..beaa58f2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -37,7 +37,7 @@ jobs: python -m pip install --upgrade pip pip install \ isort~=5.13.2 \ - black~=24.3.0 + black~=24.4.0 - name: Check import style with isort run: | isort . --check --profile black --diff diff --git a/.github/workflows/python-test-publish.yml b/.github/workflows/python-test-publish.yml index 05195c38..cb520027 100644 --- a/.github/workflows/python-test-publish.yml +++ b/.github/workflows/python-test-publish.yml @@ -39,7 +39,7 @@ jobs: python -m pip install --upgrade pip pip install \ isort~=5.13.2 \ - black~=24.3.0 + black~=24.4.0 - name: Check import style with isort run: | isort . --check --profile black --diff diff --git a/aries_cloudcontroller/api/action_menu_api.py b/aries_cloudcontroller/api/action_menu_api.py index 574235ca..93abd4ff 100644 --- a/aries_cloudcontroller/api/action_menu_api.py +++ b/aries_cloudcontroller/api/action_menu_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.action_menu_fetch_result import ActionMenuFetchResult from aries_cloudcontroller.models.perform_request import PerformRequest @@ -67,26 +57,7 @@ async def close_active_menu( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._close_active_menu_serialize( @@ -97,7 +68,9 @@ async def close_active_menu( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -127,26 +100,7 @@ async def close_active_menu_with_http_info( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._close_active_menu_serialize( @@ -157,7 +111,9 @@ async def close_active_menu_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -187,26 +143,7 @@ async def close_active_menu_without_preload_content( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._close_active_menu_serialize( @@ -217,7 +154,9 @@ async def close_active_menu_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -230,7 +169,8 @@ def _close_active_menu_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -294,26 +234,7 @@ async def fetch_active_menu( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._fetch_active_menu_serialize( @@ -324,7 +245,9 @@ async def fetch_active_menu( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionMenuFetchResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ActionMenuFetchResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -354,26 +277,7 @@ async def fetch_active_menu_with_http_info( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._fetch_active_menu_serialize( @@ -384,7 +288,9 @@ async def fetch_active_menu_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionMenuFetchResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ActionMenuFetchResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -414,26 +320,7 @@ async def fetch_active_menu_without_preload_content( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._fetch_active_menu_serialize( @@ -444,7 +331,9 @@ async def fetch_active_menu_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionMenuFetchResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ActionMenuFetchResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -457,7 +346,8 @@ def _fetch_active_menu_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -524,26 +414,7 @@ async def perform_action( :type conn_id: str :param body: :type body: PerformRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._perform_action_serialize( @@ -555,7 +426,9 @@ async def perform_action( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -588,26 +461,7 @@ async def perform_action_with_http_info( :type conn_id: str :param body: :type body: PerformRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._perform_action_serialize( @@ -619,7 +473,9 @@ async def perform_action_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -652,26 +508,7 @@ async def perform_action_without_preload_content( :type conn_id: str :param body: :type body: PerformRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._perform_action_serialize( @@ -683,7 +520,9 @@ async def perform_action_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -697,7 +536,8 @@ def _perform_action_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -773,26 +613,7 @@ async def request_active_menu( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._request_active_menu_serialize( @@ -803,7 +624,9 @@ async def request_active_menu( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -833,26 +656,7 @@ async def request_active_menu_with_http_info( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._request_active_menu_serialize( @@ -863,7 +667,9 @@ async def request_active_menu_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -893,26 +699,7 @@ async def request_active_menu_without_preload_content( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._request_active_menu_serialize( @@ -923,7 +710,9 @@ async def request_active_menu_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -936,7 +725,8 @@ def _request_active_menu_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1003,26 +793,7 @@ async def send_menu( :type conn_id: str :param body: :type body: SendMenu - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_menu_serialize( @@ -1034,7 +805,9 @@ async def send_menu( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1067,26 +840,7 @@ async def send_menu_with_http_info( :type conn_id: str :param body: :type body: SendMenu - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_menu_serialize( @@ -1098,7 +852,9 @@ async def send_menu_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1131,26 +887,7 @@ async def send_menu_without_preload_content( :type conn_id: str :param body: :type body: SendMenu - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_menu_serialize( @@ -1162,7 +899,9 @@ async def send_menu_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1176,7 +915,8 @@ def _send_menu_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/basicmessage_api.py b/aries_cloudcontroller/api/basicmessage_api.py index bc677420..43fa9723 100644 --- a/aries_cloudcontroller/api/basicmessage_api.py +++ b/aries_cloudcontroller/api/basicmessage_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.send_message import SendMessage from aries_cloudcontroller.rest import RESTResponseType @@ -68,26 +58,7 @@ async def send_message( :type conn_id: str :param body: :type body: SendMessage - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_message_serialize( @@ -99,7 +70,9 @@ async def send_message( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -132,26 +105,7 @@ async def send_message_with_http_info( :type conn_id: str :param body: :type body: SendMessage - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_message_serialize( @@ -163,7 +117,9 @@ async def send_message_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -196,26 +152,7 @@ async def send_message_without_preload_content( :type conn_id: str :param body: :type body: SendMessage - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_message_serialize( @@ -227,7 +164,9 @@ async def send_message_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -241,7 +180,8 @@ def _send_message_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/connection_api.py b/aries_cloudcontroller/api/connection_api.py index 3f7f2aaf..6c72d62c 100644 --- a/aries_cloudcontroller/api/connection_api.py +++ b/aries_cloudcontroller/api/connection_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.conn_record import ConnRecord from aries_cloudcontroller.models.connection_list import ConnectionList @@ -99,26 +89,7 @@ async def accept_invitation( :type my_endpoint: str :param my_label: Label for connection :type my_label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_invitation_serialize( @@ -132,7 +103,9 @@ async def accept_invitation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -179,26 +152,7 @@ async def accept_invitation_with_http_info( :type my_endpoint: str :param my_label: Label for connection :type my_label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_invitation_serialize( @@ -212,7 +166,9 @@ async def accept_invitation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -259,26 +215,7 @@ async def accept_invitation_without_preload_content( :type my_endpoint: str :param my_label: Label for connection :type my_label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_invitation_serialize( @@ -292,7 +229,9 @@ async def accept_invitation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -308,7 +247,8 @@ def _accept_invitation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -325,12 +265,15 @@ def _accept_invitation_serialize( _path_params["conn_id"] = conn_id # process the query parameters if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) if my_endpoint is not None: + _query_params.append(("my_endpoint", my_endpoint)) if my_label is not None: + _query_params.append(("my_label", my_label)) # process the header parameters @@ -387,26 +330,7 @@ async def accept_request( :type conn_id: str :param my_endpoint: My URL endpoint :type my_endpoint: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_request_serialize( @@ -418,7 +342,9 @@ async def accept_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -454,26 +380,7 @@ async def accept_request_with_http_info( :type conn_id: str :param my_endpoint: My URL endpoint :type my_endpoint: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_request_serialize( @@ -485,7 +392,9 @@ async def accept_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -521,26 +430,7 @@ async def accept_request_without_preload_content( :type conn_id: str :param my_endpoint: My URL endpoint :type my_endpoint: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_request_serialize( @@ -552,7 +442,9 @@ async def accept_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -566,7 +458,8 @@ def _accept_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -583,6 +476,7 @@ def _accept_request_serialize( _path_params["conn_id"] = conn_id # process the query parameters if my_endpoint is not None: + _query_params.append(("my_endpoint", my_endpoint)) # process the header parameters @@ -654,26 +548,7 @@ async def create_invitation( :type public: bool :param body: :type body: CreateInvitationRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_invitation_serialize( @@ -688,7 +563,9 @@ async def create_invitation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "InvitationResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "InvitationResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -739,26 +616,7 @@ async def create_invitation_with_http_info( :type public: bool :param body: :type body: CreateInvitationRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_invitation_serialize( @@ -773,7 +631,9 @@ async def create_invitation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "InvitationResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "InvitationResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -824,26 +684,7 @@ async def create_invitation_without_preload_content( :type public: bool :param body: :type body: CreateInvitationRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_invitation_serialize( @@ -858,7 +699,9 @@ async def create_invitation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "InvitationResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "InvitationResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -875,7 +718,8 @@ def _create_invitation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -890,15 +734,19 @@ def _create_invitation_serialize( # process the path parameters # process the query parameters if alias is not None: + _query_params.append(("alias", alias)) if auto_accept is not None: + _query_params.append(("auto_accept", auto_accept)) if multi_use is not None: + _query_params.append(("multi_use", multi_use)) if public is not None: + _query_params.append(("public", public)) # process the header parameters @@ -961,26 +809,7 @@ async def create_static_connection( :param body: :type body: ConnectionStaticRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_static_connection_serialize( @@ -992,7 +821,7 @@ async def create_static_connection( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConnectionStaticResult" + "200": "ConnectionStaticResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1023,26 +852,7 @@ async def create_static_connection_with_http_info( :param body: :type body: ConnectionStaticRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_static_connection_serialize( @@ -1054,7 +864,7 @@ async def create_static_connection_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConnectionStaticResult" + "200": "ConnectionStaticResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1085,26 +895,7 @@ async def create_static_connection_without_preload_content( :param body: :type body: ConnectionStaticRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_static_connection_serialize( @@ -1116,7 +907,7 @@ async def create_static_connection_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConnectionStaticResult" + "200": "ConnectionStaticResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1130,7 +921,8 @@ def _create_static_connection_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1204,26 +996,7 @@ async def delete_connection( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_connection_serialize( @@ -1234,7 +1007,9 @@ async def delete_connection( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1264,26 +1039,7 @@ async def delete_connection_with_http_info( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_connection_serialize( @@ -1294,7 +1050,9 @@ async def delete_connection_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1324,26 +1082,7 @@ async def delete_connection_without_preload_content( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_connection_serialize( @@ -1354,7 +1093,9 @@ async def delete_connection_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1367,7 +1108,8 @@ def _delete_connection_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1431,26 +1173,7 @@ async def get_connection( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connection_serialize( @@ -1461,7 +1184,9 @@ async def get_connection( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1491,26 +1216,7 @@ async def get_connection_with_http_info( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connection_serialize( @@ -1521,7 +1227,9 @@ async def get_connection_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1551,26 +1259,7 @@ async def get_connection_without_preload_content( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connection_serialize( @@ -1581,7 +1270,9 @@ async def get_connection_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1594,7 +1285,8 @@ def _get_connection_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1658,26 +1350,7 @@ async def get_connection_endpoint( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connection_endpoint_serialize( @@ -1688,7 +1361,9 @@ async def get_connection_endpoint( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "EndpointsResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "EndpointsResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1718,26 +1393,7 @@ async def get_connection_endpoint_with_http_info( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connection_endpoint_serialize( @@ -1748,7 +1404,9 @@ async def get_connection_endpoint_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "EndpointsResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "EndpointsResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1778,26 +1436,7 @@ async def get_connection_endpoint_without_preload_content( :param conn_id: Connection identifier (required) :type conn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connection_endpoint_serialize( @@ -1808,7 +1447,9 @@ async def get_connection_endpoint_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "EndpointsResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "EndpointsResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1821,7 +1462,8 @@ def _get_connection_endpoint_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1929,26 +1571,7 @@ async def get_connections( :type their_public_did: str :param their_role: Their role in the connection protocol :type their_role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connections_serialize( @@ -1967,7 +1590,9 @@ async def get_connections( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2041,26 +1666,7 @@ async def get_connections_with_http_info( :type their_public_did: str :param their_role: Their role in the connection protocol :type their_role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connections_serialize( @@ -2079,7 +1685,9 @@ async def get_connections_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2153,26 +1761,7 @@ async def get_connections_without_preload_content( :type their_public_did: str :param their_role: Their role in the connection protocol :type their_role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_connections_serialize( @@ -2191,7 +1780,9 @@ async def get_connections_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2212,7 +1803,8 @@ def _get_connections_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2227,30 +1819,39 @@ def _get_connections_serialize( # process the path parameters # process the query parameters if alias is not None: + _query_params.append(("alias", alias)) if connection_protocol is not None: + _query_params.append(("connection_protocol", connection_protocol)) if invitation_key is not None: + _query_params.append(("invitation_key", invitation_key)) if invitation_msg_id is not None: + _query_params.append(("invitation_msg_id", invitation_msg_id)) if my_did is not None: + _query_params.append(("my_did", my_did)) if state is not None: + _query_params.append(("state", state)) if their_did is not None: + _query_params.append(("their_did", their_did)) if their_public_did is not None: + _query_params.append(("their_public_did", their_public_did)) if their_role is not None: + _query_params.append(("their_role", their_role)) # process the header parameters @@ -2306,26 +1907,7 @@ async def get_metadata( :type conn_id: str :param key: Key to retrieve. :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_metadata_serialize( @@ -2337,7 +1919,9 @@ async def get_metadata( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionMetadata"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionMetadata", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2372,26 +1956,7 @@ async def get_metadata_with_http_info( :type conn_id: str :param key: Key to retrieve. :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_metadata_serialize( @@ -2403,7 +1968,9 @@ async def get_metadata_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionMetadata"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionMetadata", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2438,26 +2005,7 @@ async def get_metadata_without_preload_content( :type conn_id: str :param key: Key to retrieve. :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_metadata_serialize( @@ -2469,7 +2017,9 @@ async def get_metadata_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionMetadata"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionMetadata", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2483,7 +2033,8 @@ def _get_metadata_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2500,6 +2051,7 @@ def _get_metadata_serialize( _path_params["conn_id"] = conn_id # process the query parameters if key is not None: + _query_params.append(("key", key)) # process the header parameters @@ -2565,26 +2117,7 @@ async def receive_invitation( :type mediation_id: str :param body: :type body: ReceiveInvitationRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_invitation_serialize( @@ -2598,7 +2131,9 @@ async def receive_invitation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2643,26 +2178,7 @@ async def receive_invitation_with_http_info( :type mediation_id: str :param body: :type body: ReceiveInvitationRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_invitation_serialize( @@ -2676,7 +2192,9 @@ async def receive_invitation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2721,26 +2239,7 @@ async def receive_invitation_without_preload_content( :type mediation_id: str :param body: :type body: ReceiveInvitationRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_invitation_serialize( @@ -2754,7 +2253,9 @@ async def receive_invitation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2770,7 +2271,8 @@ def _receive_invitation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2785,12 +2287,15 @@ def _receive_invitation_serialize( # process the path parameters # process the query parameters if alias is not None: + _query_params.append(("alias", alias)) if auto_accept is not None: + _query_params.append(("auto_accept", auto_accept)) if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) # process the header parameters @@ -2856,26 +2361,7 @@ async def set_metadata( :type conn_id: str :param body: :type body: ConnectionMetadataSetRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_metadata_serialize( @@ -2887,7 +2373,9 @@ async def set_metadata( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionMetadata"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionMetadata", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2920,26 +2408,7 @@ async def set_metadata_with_http_info( :type conn_id: str :param body: :type body: ConnectionMetadataSetRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_metadata_serialize( @@ -2951,7 +2420,9 @@ async def set_metadata_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionMetadata"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionMetadata", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2984,26 +2455,7 @@ async def set_metadata_without_preload_content( :type conn_id: str :param body: :type body: ConnectionMetadataSetRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_metadata_serialize( @@ -3015,7 +2467,9 @@ async def set_metadata_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnectionMetadata"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnectionMetadata", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3029,7 +2483,8 @@ def _set_metadata_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/credential_definition_api.py b/aries_cloudcontroller/api/credential_definition_api.py index 9497b146..63649144 100644 --- a/aries_cloudcontroller/api/credential_definition_api.py +++ b/aries_cloudcontroller/api/credential_definition_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.credential_definition_get_result import ( CredentialDefinitionGetResult, @@ -78,26 +68,7 @@ async def credential_definitions_cred_def_id_write_record_post( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._credential_definitions_cred_def_id_write_record_post_serialize( @@ -109,7 +80,7 @@ async def credential_definitions_cred_def_id_write_record_post( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionGetResult" + "200": "CredentialDefinitionGetResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -142,26 +113,7 @@ async def credential_definitions_cred_def_id_write_record_post_with_http_info( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._credential_definitions_cred_def_id_write_record_post_serialize( @@ -173,7 +125,7 @@ async def credential_definitions_cred_def_id_write_record_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionGetResult" + "200": "CredentialDefinitionGetResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -206,26 +158,7 @@ async def credential_definitions_cred_def_id_write_record_post_without_preload_c :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._credential_definitions_cred_def_id_write_record_post_serialize( @@ -237,7 +170,7 @@ async def credential_definitions_cred_def_id_write_record_post_without_preload_c ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionGetResult" + "200": "CredentialDefinitionGetResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -251,7 +184,8 @@ def _credential_definitions_cred_def_id_write_record_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -347,26 +281,7 @@ async def get_created_cred_defs( :type schema_name: str :param schema_version: Schema version :type schema_version: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_cred_defs_serialize( @@ -383,7 +298,7 @@ async def get_created_cred_defs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionsCreatedResult" + "200": "CredentialDefinitionsCreatedResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -446,26 +361,7 @@ async def get_created_cred_defs_with_http_info( :type schema_name: str :param schema_version: Schema version :type schema_version: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_cred_defs_serialize( @@ -482,7 +378,7 @@ async def get_created_cred_defs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionsCreatedResult" + "200": "CredentialDefinitionsCreatedResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -545,26 +441,7 @@ async def get_created_cred_defs_without_preload_content( :type schema_name: str :param schema_version: Schema version :type schema_version: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_cred_defs_serialize( @@ -581,7 +458,7 @@ async def get_created_cred_defs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionsCreatedResult" + "200": "CredentialDefinitionsCreatedResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -600,7 +477,8 @@ def _get_created_cred_defs_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -615,21 +493,27 @@ def _get_created_cred_defs_serialize( # process the path parameters # process the query parameters if cred_def_id is not None: + _query_params.append(("cred_def_id", cred_def_id)) if issuer_did is not None: + _query_params.append(("issuer_did", issuer_did)) if schema_id is not None: + _query_params.append(("schema_id", schema_id)) if schema_issuer_did is not None: + _query_params.append(("schema_issuer_did", schema_issuer_did)) if schema_name is not None: + _query_params.append(("schema_name", schema_name)) if schema_version is not None: + _query_params.append(("schema_version", schema_version)) # process the header parameters @@ -682,26 +566,7 @@ async def get_cred_def( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_cred_def_serialize( @@ -713,7 +578,7 @@ async def get_cred_def( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionGetResult" + "200": "CredentialDefinitionGetResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -746,26 +611,7 @@ async def get_cred_def_with_http_info( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_cred_def_serialize( @@ -777,7 +623,7 @@ async def get_cred_def_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionGetResult" + "200": "CredentialDefinitionGetResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -810,26 +656,7 @@ async def get_cred_def_without_preload_content( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_cred_def_serialize( @@ -841,7 +668,7 @@ async def get_cred_def_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialDefinitionGetResult" + "200": "CredentialDefinitionGetResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -855,7 +682,8 @@ def _get_cred_def_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -930,26 +758,7 @@ async def publish_cred_def( :type create_transaction_for_endorser: bool :param body: :type body: CredentialDefinitionSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_cred_def_serialize( @@ -963,7 +772,7 @@ async def publish_cred_def( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrCredentialDefinitionSendResult" + "200": "TxnOrCredentialDefinitionSendResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1005,26 +814,7 @@ async def publish_cred_def_with_http_info( :type create_transaction_for_endorser: bool :param body: :type body: CredentialDefinitionSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_cred_def_serialize( @@ -1038,7 +828,7 @@ async def publish_cred_def_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrCredentialDefinitionSendResult" + "200": "TxnOrCredentialDefinitionSendResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1080,26 +870,7 @@ async def publish_cred_def_without_preload_content( :type create_transaction_for_endorser: bool :param body: :type body: CredentialDefinitionSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_cred_def_serialize( @@ -1113,7 +884,7 @@ async def publish_cred_def_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrCredentialDefinitionSendResult" + "200": "TxnOrCredentialDefinitionSendResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1129,7 +900,8 @@ def _publish_cred_def_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1144,9 +916,11 @@ def _publish_cred_def_serialize( # process the path parameters # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) diff --git a/aries_cloudcontroller/api/credentials_api.py b/aries_cloudcontroller/api/credentials_api.py index 5cdfa1fd..32515fba 100644 --- a/aries_cloudcontroller/api/credentials_api.py +++ b/aries_cloudcontroller/api/credentials_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.attribute_mime_types_result import ( AttributeMimeTypesResult, @@ -75,26 +65,7 @@ async def delete_record( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -105,7 +76,9 @@ async def delete_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -135,26 +108,7 @@ async def delete_record_with_http_info( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -165,7 +119,9 @@ async def delete_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -195,26 +151,7 @@ async def delete_record_without_preload_content( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -225,7 +162,9 @@ async def delete_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -238,7 +177,8 @@ def _delete_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -302,26 +242,7 @@ async def delete_w3c_credential( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_w3c_credential_serialize( @@ -332,7 +253,9 @@ async def delete_w3c_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -362,26 +285,7 @@ async def delete_w3c_credential_with_http_info( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_w3c_credential_serialize( @@ -392,7 +296,9 @@ async def delete_w3c_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -422,26 +328,7 @@ async def delete_w3c_credential_without_preload_content( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_w3c_credential_serialize( @@ -452,7 +339,9 @@ async def delete_w3c_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -465,7 +354,8 @@ def _delete_w3c_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -529,26 +419,7 @@ async def get_credential_mime_types( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_credential_mime_types_serialize( @@ -560,7 +431,7 @@ async def get_credential_mime_types( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AttributeMimeTypesResult" + "200": "AttributeMimeTypesResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -591,26 +462,7 @@ async def get_credential_mime_types_with_http_info( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_credential_mime_types_serialize( @@ -622,7 +474,7 @@ async def get_credential_mime_types_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AttributeMimeTypesResult" + "200": "AttributeMimeTypesResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -653,26 +505,7 @@ async def get_credential_mime_types_without_preload_content( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_credential_mime_types_serialize( @@ -684,7 +517,7 @@ async def get_credential_mime_types_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AttributeMimeTypesResult" + "200": "AttributeMimeTypesResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -698,7 +531,8 @@ def _get_credential_mime_types_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -762,26 +596,7 @@ async def get_record( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -792,7 +607,9 @@ async def get_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "IndyCredInfo"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "IndyCredInfo", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -822,26 +639,7 @@ async def get_record_with_http_info( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -852,7 +650,9 @@ async def get_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "IndyCredInfo"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "IndyCredInfo", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -882,26 +682,7 @@ async def get_record_without_preload_content( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -912,7 +693,9 @@ async def get_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "IndyCredInfo"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "IndyCredInfo", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -925,7 +708,8 @@ def _get_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1004,26 +788,7 @@ async def get_records( :type start: str :param wql: (JSON) WQL query :type wql: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1036,7 +801,9 @@ async def get_records( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredInfoList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredInfoList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1081,26 +848,7 @@ async def get_records_with_http_info( :type start: str :param wql: (JSON) WQL query :type wql: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1113,7 +861,9 @@ async def get_records_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredInfoList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredInfoList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1158,26 +908,7 @@ async def get_records_without_preload_content( :type start: str :param wql: (JSON) WQL query :type wql: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1190,7 +921,9 @@ async def get_records_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredInfoList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredInfoList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1205,7 +938,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1220,12 +954,15 @@ def _get_records_serialize( # process the path parameters # process the query parameters if count is not None: + _query_params.append(("count", count)) if start is not None: + _query_params.append(("start", start)) if wql is not None: + _query_params.append(("wql", wql)) # process the header parameters @@ -1290,26 +1027,7 @@ async def get_revocation_status( :type var_from: str :param to: Latest epoch of revocation status interval of interest :type to: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_revocation_status_serialize( @@ -1322,7 +1040,9 @@ async def get_revocation_status( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredRevokedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredRevokedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1366,26 +1086,7 @@ async def get_revocation_status_with_http_info( :type var_from: str :param to: Latest epoch of revocation status interval of interest :type to: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_revocation_status_serialize( @@ -1398,7 +1099,9 @@ async def get_revocation_status_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredRevokedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredRevokedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1442,26 +1145,7 @@ async def get_revocation_status_without_preload_content( :type var_from: str :param to: Latest epoch of revocation status interval of interest :type to: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_revocation_status_serialize( @@ -1474,7 +1158,9 @@ async def get_revocation_status_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredRevokedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredRevokedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1489,7 +1175,8 @@ def _get_revocation_status_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1506,9 +1193,11 @@ def _get_revocation_status_serialize( _path_params["credential_id"] = credential_id # process the query parameters if var_from is not None: + _query_params.append(("from", var_from)) if to is not None: + _query_params.append(("to", to)) # process the header parameters @@ -1559,26 +1248,7 @@ async def get_w3c_credential( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_w3c_credential_serialize( @@ -1589,7 +1259,9 @@ async def get_w3c_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VCRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VCRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1619,26 +1291,7 @@ async def get_w3c_credential_with_http_info( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_w3c_credential_serialize( @@ -1649,7 +1302,9 @@ async def get_w3c_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VCRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VCRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1679,26 +1334,7 @@ async def get_w3c_credential_without_preload_content( :param credential_id: Credential identifier (required) :type credential_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_w3c_credential_serialize( @@ -1709,7 +1345,9 @@ async def get_w3c_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VCRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VCRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1722,7 +1360,8 @@ def _get_w3c_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1804,26 +1443,7 @@ async def get_w3c_credentials( :type wql: str :param body: :type body: W3CCredentialsListRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_w3c_credentials_serialize( @@ -1837,7 +1457,9 @@ async def get_w3c_credentials( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VCRecordList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VCRecordList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1885,26 +1507,7 @@ async def get_w3c_credentials_with_http_info( :type wql: str :param body: :type body: W3CCredentialsListRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_w3c_credentials_serialize( @@ -1918,7 +1521,9 @@ async def get_w3c_credentials_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VCRecordList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VCRecordList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1966,26 +1571,7 @@ async def get_w3c_credentials_without_preload_content( :type wql: str :param body: :type body: W3CCredentialsListRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_w3c_credentials_serialize( @@ -1999,7 +1585,9 @@ async def get_w3c_credentials_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VCRecordList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VCRecordList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2015,7 +1603,8 @@ def _get_w3c_credentials_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2030,12 +1619,15 @@ def _get_w3c_credentials_serialize( # process the path parameters # process the query parameters if count is not None: + _query_params.append(("count", count)) if start is not None: + _query_params.append(("start", start)) if wql is not None: + _query_params.append(("wql", wql)) # process the header parameters diff --git a/aries_cloudcontroller/api/default_api.py b/aries_cloudcontroller/api/default_api.py index 952d4233..b1873229 100644 --- a/aries_cloudcontroller/api/default_api.py +++ b/aries_cloudcontroller/api/default_api.py @@ -11,17 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.rest import RESTResponseType @@ -56,26 +51,7 @@ async def establish_inbound( """establish_inbound - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._establish_inbound_serialize( @@ -112,26 +88,7 @@ async def establish_inbound_with_http_info( """establish_inbound - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._establish_inbound_serialize( @@ -168,26 +125,7 @@ async def establish_inbound_without_preload_content( """establish_inbound - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._establish_inbound_serialize( @@ -209,7 +147,8 @@ def _establish_inbound_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -263,26 +202,7 @@ async def get_features( """get_features - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_features_serialize( @@ -319,26 +239,7 @@ async def get_features_with_http_info( """get_features - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_features_serialize( @@ -375,26 +276,7 @@ async def get_features_without_preload_content( """get_features - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_features_serialize( @@ -416,7 +298,8 @@ def _get_features_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/did_exchange_api.py b/aries_cloudcontroller/api/did_exchange_api.py index d8899b68..99ca8335 100644 --- a/aries_cloudcontroller/api/did_exchange_api.py +++ b/aries_cloudcontroller/api/did_exchange_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.conn_record import ConnRecord from aries_cloudcontroller.models.didx_reject_request import DIDXRejectRequest @@ -78,26 +68,7 @@ async def accept_invitation( :type my_endpoint: str :param my_label: Label for connection request :type my_label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_invitation_serialize( @@ -110,7 +81,9 @@ async def accept_invitation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -151,26 +124,7 @@ async def accept_invitation_with_http_info( :type my_endpoint: str :param my_label: Label for connection request :type my_label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_invitation_serialize( @@ -183,7 +137,9 @@ async def accept_invitation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -224,26 +180,7 @@ async def accept_invitation_without_preload_content( :type my_endpoint: str :param my_label: Label for connection request :type my_label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_invitation_serialize( @@ -256,7 +193,9 @@ async def accept_invitation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -271,7 +210,8 @@ def _accept_invitation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -288,9 +228,11 @@ def _accept_invitation_serialize( _path_params["conn_id"] = conn_id # process the query parameters if my_endpoint is not None: + _query_params.append(("my_endpoint", my_endpoint)) if my_label is not None: + _query_params.append(("my_label", my_label)) # process the header parameters @@ -359,26 +301,7 @@ async def accept_request( :type my_endpoint: str :param use_public_did: Use public DID for this connection :type use_public_did: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_request_serialize( @@ -392,7 +315,9 @@ async def accept_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -440,26 +365,7 @@ async def accept_request_with_http_info( :type my_endpoint: str :param use_public_did: Use public DID for this connection :type use_public_did: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_request_serialize( @@ -473,7 +379,9 @@ async def accept_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -521,26 +429,7 @@ async def accept_request_without_preload_content( :type my_endpoint: str :param use_public_did: Use public DID for this connection :type use_public_did: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_request_serialize( @@ -554,7 +443,9 @@ async def accept_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -570,7 +461,8 @@ def _accept_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -587,12 +479,15 @@ def _accept_request_serialize( _path_params["conn_id"] = conn_id # process the query parameters if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) if my_endpoint is not None: + _query_params.append(("my_endpoint", my_endpoint)) if use_public_did is not None: + _query_params.append(("use_public_did", use_public_did)) # process the header parameters @@ -693,26 +588,7 @@ async def create_request( :type my_label: str :param use_public_did: Use public DID for this connection :type use_public_did: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_request_serialize( @@ -730,7 +606,9 @@ async def create_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -810,26 +688,7 @@ async def create_request_with_http_info( :type my_label: str :param use_public_did: Use public DID for this connection :type use_public_did: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_request_serialize( @@ -847,7 +706,9 @@ async def create_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -927,26 +788,7 @@ async def create_request_without_preload_content( :type my_label: str :param use_public_did: Use public DID for this connection :type use_public_did: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_request_serialize( @@ -964,7 +806,9 @@ async def create_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -984,7 +828,8 @@ def _create_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -999,27 +844,35 @@ def _create_request_serialize( # process the path parameters # process the query parameters if their_public_did is not None: + _query_params.append(("their_public_did", their_public_did)) if alias is not None: + _query_params.append(("alias", alias)) if goal is not None: + _query_params.append(("goal", goal)) if goal_code is not None: + _query_params.append(("goal_code", goal_code)) if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) if my_endpoint is not None: + _query_params.append(("my_endpoint", my_endpoint)) if my_label is not None: + _query_params.append(("my_label", my_label)) if use_public_did is not None: + _query_params.append(("use_public_did", use_public_did)) # process the header parameters @@ -1073,26 +926,7 @@ async def didexchange_conn_id_reject_post( :type conn_id: str :param body: :type body: DIDXRejectRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._didexchange_conn_id_reject_post_serialize( @@ -1104,7 +938,9 @@ async def didexchange_conn_id_reject_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1137,26 +973,7 @@ async def didexchange_conn_id_reject_post_with_http_info( :type conn_id: str :param body: :type body: DIDXRejectRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._didexchange_conn_id_reject_post_serialize( @@ -1168,7 +985,9 @@ async def didexchange_conn_id_reject_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1201,26 +1020,7 @@ async def didexchange_conn_id_reject_post_without_preload_content( :type conn_id: str :param body: :type body: DIDXRejectRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._didexchange_conn_id_reject_post_serialize( @@ -1232,7 +1032,9 @@ async def didexchange_conn_id_reject_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1246,7 +1048,8 @@ def _didexchange_conn_id_reject_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1345,26 +1148,7 @@ async def receive_request( :type my_endpoint: str :param body: :type body: DIDXRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_request_serialize( @@ -1379,7 +1163,9 @@ async def receive_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1432,26 +1218,7 @@ async def receive_request_with_http_info( :type my_endpoint: str :param body: :type body: DIDXRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_request_serialize( @@ -1466,7 +1233,9 @@ async def receive_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1519,26 +1288,7 @@ async def receive_request_without_preload_content( :type my_endpoint: str :param body: :type body: DIDXRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_request_serialize( @@ -1553,7 +1303,9 @@ async def receive_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ConnRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConnRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1570,7 +1322,8 @@ def _receive_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1585,15 +1338,19 @@ def _receive_request_serialize( # process the path parameters # process the query parameters if alias is not None: + _query_params.append(("alias", alias)) if auto_accept is not None: + _query_params.append(("auto_accept", auto_accept)) if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) if my_endpoint is not None: + _query_params.append(("my_endpoint", my_endpoint)) # process the header parameters diff --git a/aries_cloudcontroller/api/discover_features_api.py b/aries_cloudcontroller/api/discover_features_api.py index 15d43aa0..66955fc5 100644 --- a/aries_cloudcontroller/api/discover_features_api.py +++ b/aries_cloudcontroller/api/discover_features_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.v10_discovery_exchange_list_result import ( V10DiscoveryExchangeListResult, @@ -81,26 +71,7 @@ async def discover_features_query_get( :type connection_id: str :param query: Protocol feature query :type query: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features_query_get_serialize( @@ -113,7 +84,9 @@ async def discover_features_query_get( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10DiscoveryRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10DiscoveryRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -156,26 +129,7 @@ async def discover_features_query_get_with_http_info( :type connection_id: str :param query: Protocol feature query :type query: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features_query_get_serialize( @@ -188,7 +142,9 @@ async def discover_features_query_get_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10DiscoveryRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10DiscoveryRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -231,26 +187,7 @@ async def discover_features_query_get_without_preload_content( :type connection_id: str :param query: Protocol feature query :type query: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features_query_get_serialize( @@ -263,7 +200,9 @@ async def discover_features_query_get_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10DiscoveryRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10DiscoveryRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -278,7 +217,8 @@ def _discover_features_query_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -293,12 +233,15 @@ def _discover_features_query_get_serialize( # process the path parameters # process the query parameters if comment is not None: + _query_params.append(("comment", comment)) if connection_id is not None: + _query_params.append(("connection_id", connection_id)) if query is not None: + _query_params.append(("query", query)) # process the header parameters @@ -351,26 +294,7 @@ async def discover_features_records_get( :param connection_id: Connection identifier :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features_records_get_serialize( @@ -382,7 +306,7 @@ async def discover_features_records_get( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10DiscoveryExchangeListResult" + "200": "V10DiscoveryExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -415,26 +339,7 @@ async def discover_features_records_get_with_http_info( :param connection_id: Connection identifier :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features_records_get_serialize( @@ -446,7 +351,7 @@ async def discover_features_records_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10DiscoveryExchangeListResult" + "200": "V10DiscoveryExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -479,26 +384,7 @@ async def discover_features_records_get_without_preload_content( :param connection_id: Connection identifier :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features_records_get_serialize( @@ -510,7 +396,7 @@ async def discover_features_records_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10DiscoveryExchangeListResult" + "200": "V10DiscoveryExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -524,7 +410,8 @@ def _discover_features_records_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -539,6 +426,7 @@ def _discover_features_records_get_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) # process the header parameters diff --git a/aries_cloudcontroller/api/discover_features_v20_api.py b/aries_cloudcontroller/api/discover_features_v20_api.py index ccf85435..176a5a54 100644 --- a/aries_cloudcontroller/api/discover_features_v20_api.py +++ b/aries_cloudcontroller/api/discover_features_v20_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.v20_discovery_exchange_list_result import ( V20DiscoveryExchangeListResult, @@ -85,26 +75,7 @@ async def discover_features20_queries_get( :type query_goal_code: str :param query_protocol: Protocol feature-type query :type query_protocol: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features20_queries_get_serialize( @@ -118,7 +89,7 @@ async def discover_features20_queries_get( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20DiscoveryExchangeResult" + "200": "V20DiscoveryExchangeResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -164,26 +135,7 @@ async def discover_features20_queries_get_with_http_info( :type query_goal_code: str :param query_protocol: Protocol feature-type query :type query_protocol: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features20_queries_get_serialize( @@ -197,7 +149,7 @@ async def discover_features20_queries_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20DiscoveryExchangeResult" + "200": "V20DiscoveryExchangeResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -243,26 +195,7 @@ async def discover_features20_queries_get_without_preload_content( :type query_goal_code: str :param query_protocol: Protocol feature-type query :type query_protocol: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features20_queries_get_serialize( @@ -276,7 +209,7 @@ async def discover_features20_queries_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20DiscoveryExchangeResult" + "200": "V20DiscoveryExchangeResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -292,7 +225,8 @@ def _discover_features20_queries_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -307,12 +241,15 @@ def _discover_features20_queries_get_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) if query_goal_code is not None: + _query_params.append(("query_goal_code", query_goal_code)) if query_protocol is not None: + _query_params.append(("query_protocol", query_protocol)) # process the header parameters @@ -365,26 +302,7 @@ async def discover_features20_records_get( :param connection_id: Connection identifier :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features20_records_get_serialize( @@ -396,7 +314,7 @@ async def discover_features20_records_get( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20DiscoveryExchangeListResult" + "200": "V20DiscoveryExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -429,26 +347,7 @@ async def discover_features20_records_get_with_http_info( :param connection_id: Connection identifier :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features20_records_get_serialize( @@ -460,7 +359,7 @@ async def discover_features20_records_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20DiscoveryExchangeListResult" + "200": "V20DiscoveryExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -493,26 +392,7 @@ async def discover_features20_records_get_without_preload_content( :param connection_id: Connection identifier :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._discover_features20_records_get_serialize( @@ -524,7 +404,7 @@ async def discover_features20_records_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20DiscoveryExchangeListResult" + "200": "V20DiscoveryExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -538,7 +418,8 @@ def _discover_features20_records_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -553,6 +434,7 @@ def _discover_features20_records_get_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) # process the header parameters diff --git a/aries_cloudcontroller/api/endorse_transaction_api.py b/aries_cloudcontroller/api/endorse_transaction_api.py index 5f0b544a..6ef8fa36 100644 --- a/aries_cloudcontroller/api/endorse_transaction_api.py +++ b/aries_cloudcontroller/api/endorse_transaction_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.endorser_info import EndorserInfo from aries_cloudcontroller.models.model_date import ModelDate @@ -69,26 +59,7 @@ async def cancel_transaction( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._cancel_transaction_serialize( @@ -99,7 +70,9 @@ async def cancel_transaction( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -129,26 +102,7 @@ async def cancel_transaction_with_http_info( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._cancel_transaction_serialize( @@ -159,7 +113,9 @@ async def cancel_transaction_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -189,26 +145,7 @@ async def cancel_transaction_without_preload_content( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._cancel_transaction_serialize( @@ -219,7 +156,9 @@ async def cancel_transaction_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -232,7 +171,8 @@ def _cancel_transaction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -305,26 +245,7 @@ async def create_request( :type endorser_write_txn: bool :param body: :type body: ModelDate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_request_serialize( @@ -337,7 +258,9 @@ async def create_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -376,26 +299,7 @@ async def create_request_with_http_info( :type endorser_write_txn: bool :param body: :type body: ModelDate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_request_serialize( @@ -408,7 +312,9 @@ async def create_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -447,26 +353,7 @@ async def create_request_without_preload_content( :type endorser_write_txn: bool :param body: :type body: ModelDate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_request_serialize( @@ -479,7 +366,9 @@ async def create_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -494,7 +383,8 @@ def _create_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -509,9 +399,11 @@ def _create_request_serialize( # process the path parameters # process the query parameters if tran_id is not None: + _query_params.append(("tran_id", tran_id)) if endorser_write_txn is not None: + _query_params.append(("endorser_write_txn", endorser_write_txn)) # process the header parameters @@ -579,26 +471,7 @@ async def endorse_transaction( :type tran_id: str :param endorser_did: Endorser DID :type endorser_did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._endorse_transaction_serialize( @@ -610,7 +483,9 @@ async def endorse_transaction( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -645,26 +520,7 @@ async def endorse_transaction_with_http_info( :type tran_id: str :param endorser_did: Endorser DID :type endorser_did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._endorse_transaction_serialize( @@ -676,7 +532,9 @@ async def endorse_transaction_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -711,26 +569,7 @@ async def endorse_transaction_without_preload_content( :type tran_id: str :param endorser_did: Endorser DID :type endorser_did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._endorse_transaction_serialize( @@ -742,7 +581,9 @@ async def endorse_transaction_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -756,7 +597,8 @@ def _endorse_transaction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -773,6 +615,7 @@ def _endorse_transaction_serialize( _path_params["tran_id"] = tran_id # process the query parameters if endorser_did is not None: + _query_params.append(("endorser_did", endorser_did)) # process the header parameters @@ -820,26 +663,7 @@ async def get_records( """Query transactions - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -849,7 +673,9 @@ async def get_records( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -876,26 +702,7 @@ async def get_records_with_http_info( """Query transactions - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -905,7 +712,9 @@ async def get_records_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -932,26 +741,7 @@ async def get_records_without_preload_content( """Query transactions - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -961,7 +751,9 @@ async def get_records_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -973,7 +765,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1035,26 +828,7 @@ async def get_transaction( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_transaction_serialize( @@ -1065,7 +839,9 @@ async def get_transaction( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1095,26 +871,7 @@ async def get_transaction_with_http_info( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_transaction_serialize( @@ -1125,7 +882,9 @@ async def get_transaction_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1155,26 +914,7 @@ async def get_transaction_without_preload_content( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_transaction_serialize( @@ -1185,7 +925,9 @@ async def get_transaction_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1198,7 +940,8 @@ def _get_transaction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1262,26 +1005,7 @@ async def refuse_transaction( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._refuse_transaction_serialize( @@ -1292,7 +1016,9 @@ async def refuse_transaction( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1322,26 +1048,7 @@ async def refuse_transaction_with_http_info( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._refuse_transaction_serialize( @@ -1352,7 +1059,9 @@ async def refuse_transaction_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1382,26 +1091,7 @@ async def refuse_transaction_without_preload_content( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._refuse_transaction_serialize( @@ -1412,7 +1102,9 @@ async def refuse_transaction_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1425,7 +1117,8 @@ def _refuse_transaction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1489,26 +1182,7 @@ async def resend_transaction_request( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._resend_transaction_request_serialize( @@ -1519,7 +1193,9 @@ async def resend_transaction_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1549,26 +1225,7 @@ async def resend_transaction_request_with_http_info( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._resend_transaction_request_serialize( @@ -1579,7 +1236,9 @@ async def resend_transaction_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1609,26 +1268,7 @@ async def resend_transaction_request_without_preload_content( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._resend_transaction_request_serialize( @@ -1639,7 +1279,9 @@ async def resend_transaction_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1652,7 +1294,8 @@ def _resend_transaction_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1724,26 +1367,7 @@ async def set_endorser_info( :type endorser_did: str :param endorser_name: Endorser Name :type endorser_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_endorser_info_serialize( @@ -1756,7 +1380,9 @@ async def set_endorser_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "EndorserInfo"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "EndorserInfo", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1794,26 +1420,7 @@ async def set_endorser_info_with_http_info( :type endorser_did: str :param endorser_name: Endorser Name :type endorser_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_endorser_info_serialize( @@ -1826,7 +1433,9 @@ async def set_endorser_info_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "EndorserInfo"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "EndorserInfo", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1864,26 +1473,7 @@ async def set_endorser_info_without_preload_content( :type endorser_did: str :param endorser_name: Endorser Name :type endorser_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_endorser_info_serialize( @@ -1896,7 +1486,9 @@ async def set_endorser_info_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "EndorserInfo"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "EndorserInfo", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1911,7 +1503,8 @@ def _set_endorser_info_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1928,9 +1521,11 @@ def _set_endorser_info_serialize( _path_params["conn_id"] = conn_id # process the query parameters if endorser_did is not None: + _query_params.append(("endorser_did", endorser_did)) if endorser_name is not None: + _query_params.append(("endorser_name", endorser_name)) # process the header parameters @@ -1986,26 +1581,7 @@ async def set_endorser_role( :type conn_id: str :param transaction_my_job: Transaction related jobs :type transaction_my_job: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_endorser_role_serialize( @@ -2017,7 +1593,9 @@ async def set_endorser_role( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionJobs"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionJobs", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2052,26 +1630,7 @@ async def set_endorser_role_with_http_info( :type conn_id: str :param transaction_my_job: Transaction related jobs :type transaction_my_job: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_endorser_role_serialize( @@ -2083,7 +1642,9 @@ async def set_endorser_role_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionJobs"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionJobs", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2118,26 +1679,7 @@ async def set_endorser_role_without_preload_content( :type conn_id: str :param transaction_my_job: Transaction related jobs :type transaction_my_job: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_endorser_role_serialize( @@ -2149,7 +1691,9 @@ async def set_endorser_role_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionJobs"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionJobs", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2163,7 +1707,8 @@ def _set_endorser_role_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2180,6 +1725,7 @@ def _set_endorser_role_serialize( _path_params["conn_id"] = conn_id # process the query parameters if transaction_my_job is not None: + _query_params.append(("transaction_my_job", transaction_my_job)) # process the header parameters @@ -2230,26 +1776,7 @@ async def write_transaction( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._write_transaction_serialize( @@ -2260,7 +1787,9 @@ async def write_transaction( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2290,26 +1819,7 @@ async def write_transaction_with_http_info( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._write_transaction_serialize( @@ -2320,7 +1830,9 @@ async def write_transaction_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2350,26 +1862,7 @@ async def write_transaction_without_preload_content( :param tran_id: Transaction identifier (required) :type tran_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._write_transaction_serialize( @@ -2380,7 +1873,9 @@ async def write_transaction_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TransactionRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TransactionRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2393,7 +1888,8 @@ def _write_transaction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/introduction_api.py b/aries_cloudcontroller/api/introduction_api.py index 374e3574..6e455880 100644 --- a/aries_cloudcontroller/api/introduction_api.py +++ b/aries_cloudcontroller/api/introduction_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.rest import RESTResponseType @@ -72,26 +62,7 @@ async def start_introduction( :type target_connection_id: str :param message: Message :type message: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._start_introduction_serialize( @@ -104,7 +75,9 @@ async def start_introduction( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -142,26 +115,7 @@ async def start_introduction_with_http_info( :type target_connection_id: str :param message: Message :type message: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._start_introduction_serialize( @@ -174,7 +128,9 @@ async def start_introduction_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -212,26 +168,7 @@ async def start_introduction_without_preload_content( :type target_connection_id: str :param message: Message :type message: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._start_introduction_serialize( @@ -244,7 +181,9 @@ async def start_introduction_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -259,7 +198,8 @@ def _start_introduction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -276,9 +216,11 @@ def _start_introduction_serialize( _path_params["conn_id"] = conn_id # process the query parameters if target_connection_id is not None: + _query_params.append(("target_connection_id", target_connection_id)) if message is not None: + _query_params.append(("message", message)) # process the header parameters diff --git a/aries_cloudcontroller/api/issue_credential_v10_api.py b/aries_cloudcontroller/api/issue_credential_v10_api.py index b0664985..e0cc0e26 100644 --- a/aries_cloudcontroller/api/issue_credential_v10_api.py +++ b/aries_cloudcontroller/api/issue_credential_v10_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.v10_credential_bound_offer_request import ( V10CredentialBoundOfferRequest, @@ -96,26 +86,7 @@ async def create_credential( :param body: :type body: V10CredentialCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_credential_serialize( @@ -126,7 +97,9 @@ async def create_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -156,26 +129,7 @@ async def create_credential_with_http_info( :param body: :type body: V10CredentialCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_credential_serialize( @@ -186,7 +140,9 @@ async def create_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -216,26 +172,7 @@ async def create_credential_without_preload_content( :param body: :type body: V10CredentialCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_credential_serialize( @@ -246,7 +183,9 @@ async def create_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -259,7 +198,8 @@ def _create_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -333,26 +273,7 @@ async def create_offer( :param body: :type body: V10CredentialConnFreeOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_offer_serialize( @@ -363,7 +284,9 @@ async def create_offer( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -393,26 +316,7 @@ async def create_offer_with_http_info( :param body: :type body: V10CredentialConnFreeOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_offer_serialize( @@ -423,7 +327,9 @@ async def create_offer_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -453,26 +359,7 @@ async def create_offer_without_preload_content( :param body: :type body: V10CredentialConnFreeOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_offer_serialize( @@ -483,7 +370,9 @@ async def create_offer_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -496,7 +385,8 @@ def _create_offer_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -572,26 +462,7 @@ async def delete_record( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -602,7 +473,9 @@ async def delete_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -634,26 +507,7 @@ async def delete_record_with_http_info( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -664,7 +518,9 @@ async def delete_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -696,26 +552,7 @@ async def delete_record_without_preload_content( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -726,7 +563,9 @@ async def delete_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -739,7 +578,8 @@ def _delete_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -805,26 +645,7 @@ async def get_record( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -835,7 +656,9 @@ async def get_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -867,26 +690,7 @@ async def get_record_with_http_info( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -897,7 +701,9 @@ async def get_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -929,26 +735,7 @@ async def get_record_without_preload_content( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -959,7 +746,9 @@ async def get_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -972,7 +761,8 @@ def _get_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1054,26 +844,7 @@ async def get_records( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1088,7 +859,7 @@ async def get_records( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10CredentialExchangeListResult" + "200": "V10CredentialExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1137,26 +908,7 @@ async def get_records_with_http_info( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1171,7 +923,7 @@ async def get_records_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10CredentialExchangeListResult" + "200": "V10CredentialExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1220,26 +972,7 @@ async def get_records_without_preload_content( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1254,7 +987,7 @@ async def get_records_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10CredentialExchangeListResult" + "200": "V10CredentialExchangeListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1271,7 +1004,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1286,15 +1020,19 @@ def _get_records_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) if role is not None: + _query_params.append(("role", role)) if state is not None: + _query_params.append(("state", state)) if thread_id is not None: + _query_params.append(("thread_id", thread_id)) # process the header parameters @@ -1350,26 +1088,7 @@ async def issue_credential( :type cred_ex_id: str :param body: :type body: V10CredentialIssueRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_serialize( @@ -1381,7 +1100,9 @@ async def issue_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1416,26 +1137,7 @@ async def issue_credential_with_http_info( :type cred_ex_id: str :param body: :type body: V10CredentialIssueRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_serialize( @@ -1447,7 +1149,9 @@ async def issue_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1482,26 +1186,7 @@ async def issue_credential_without_preload_content( :type cred_ex_id: str :param body: :type body: V10CredentialIssueRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_serialize( @@ -1513,7 +1198,9 @@ async def issue_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1527,7 +1214,8 @@ def _issue_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1603,26 +1291,7 @@ async def issue_credential_automated( :param body: :type body: V10CredentialProposalRequestMand - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_automated_serialize( @@ -1633,7 +1302,9 @@ async def issue_credential_automated( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1663,26 +1334,7 @@ async def issue_credential_automated_with_http_info( :param body: :type body: V10CredentialProposalRequestMand - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_automated_serialize( @@ -1693,7 +1345,9 @@ async def issue_credential_automated_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1723,26 +1377,7 @@ async def issue_credential_automated_without_preload_content( :param body: :type body: V10CredentialProposalRequestMand - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_automated_serialize( @@ -1753,7 +1388,9 @@ async def issue_credential_automated_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1766,7 +1403,8 @@ def _issue_credential_automated_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1845,26 +1483,7 @@ async def report_problem( :type cred_ex_id: str :param body: :type body: V10CredentialProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1876,7 +1495,9 @@ async def report_problem( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1911,26 +1532,7 @@ async def report_problem_with_http_info( :type cred_ex_id: str :param body: :type body: V10CredentialProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1942,7 +1544,9 @@ async def report_problem_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1977,26 +1581,7 @@ async def report_problem_without_preload_content( :type cred_ex_id: str :param body: :type body: V10CredentialProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -2008,7 +1593,9 @@ async def report_problem_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2022,7 +1609,8 @@ def _report_problem_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2103,26 +1691,7 @@ async def send_offer( :type cred_ex_id: str :param body: :type body: V10CredentialBoundOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_serialize( @@ -2134,7 +1703,9 @@ async def send_offer( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2169,26 +1740,7 @@ async def send_offer_with_http_info( :type cred_ex_id: str :param body: :type body: V10CredentialBoundOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_serialize( @@ -2200,7 +1752,9 @@ async def send_offer_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2235,26 +1789,7 @@ async def send_offer_without_preload_content( :type cred_ex_id: str :param body: :type body: V10CredentialBoundOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_serialize( @@ -2266,7 +1801,9 @@ async def send_offer_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2280,7 +1817,8 @@ def _send_offer_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2356,26 +1894,7 @@ async def send_offer_free( :param body: :type body: V10CredentialFreeOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_free_serialize( @@ -2386,7 +1905,9 @@ async def send_offer_free( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2416,26 +1937,7 @@ async def send_offer_free_with_http_info( :param body: :type body: V10CredentialFreeOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_free_serialize( @@ -2446,7 +1948,9 @@ async def send_offer_free_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2476,26 +1980,7 @@ async def send_offer_free_without_preload_content( :param body: :type body: V10CredentialFreeOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_free_serialize( @@ -2506,7 +1991,9 @@ async def send_offer_free_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2519,7 +2006,8 @@ def _send_offer_free_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2593,26 +2081,7 @@ async def send_proposal( :param body: :type body: V10CredentialProposalRequestOpt - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2623,7 +2092,9 @@ async def send_proposal( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2653,26 +2124,7 @@ async def send_proposal_with_http_info( :param body: :type body: V10CredentialProposalRequestOpt - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2683,7 +2135,9 @@ async def send_proposal_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2713,26 +2167,7 @@ async def send_proposal_without_preload_content( :param body: :type body: V10CredentialProposalRequestOpt - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2743,7 +2178,9 @@ async def send_proposal_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2756,7 +2193,8 @@ def _send_proposal_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2835,26 +2273,7 @@ async def send_request( :type cred_ex_id: str :param body: :type body: V10CredentialExchangeAutoRemoveRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2866,7 +2285,9 @@ async def send_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2901,26 +2322,7 @@ async def send_request_with_http_info( :type cred_ex_id: str :param body: :type body: V10CredentialExchangeAutoRemoveRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2932,7 +2334,9 @@ async def send_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2967,26 +2371,7 @@ async def send_request_without_preload_content( :type cred_ex_id: str :param body: :type body: V10CredentialExchangeAutoRemoveRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2998,7 +2383,9 @@ async def send_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3012,7 +2399,8 @@ def _send_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3093,26 +2481,7 @@ async def store_credential( :type cred_ex_id: str :param body: :type body: V10CredentialStoreRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._store_credential_serialize( @@ -3124,7 +2493,9 @@ async def store_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3159,26 +2530,7 @@ async def store_credential_with_http_info( :type cred_ex_id: str :param body: :type body: V10CredentialStoreRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._store_credential_serialize( @@ -3190,7 +2542,9 @@ async def store_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3225,26 +2579,7 @@ async def store_credential_without_preload_content( :type cred_ex_id: str :param body: :type body: V10CredentialStoreRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._store_credential_serialize( @@ -3256,7 +2591,9 @@ async def store_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V10CredentialExchange"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V10CredentialExchange", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3270,7 +2607,8 @@ def _store_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/issue_credential_v20_api.py b/aries_cloudcontroller/api/issue_credential_v20_api.py index 95df9dda..1456184d 100644 --- a/aries_cloudcontroller/api/issue_credential_v20_api.py +++ b/aries_cloudcontroller/api/issue_credential_v20_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.v20_cred_bound_offer_request import ( V20CredBoundOfferRequest, @@ -87,26 +77,7 @@ async def create_credential( :param body: :type body: V20IssueCredSchemaCore - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_credential_serialize( @@ -117,7 +88,9 @@ async def create_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -147,26 +120,7 @@ async def create_credential_with_http_info( :param body: :type body: V20IssueCredSchemaCore - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_credential_serialize( @@ -177,7 +131,9 @@ async def create_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -207,26 +163,7 @@ async def create_credential_without_preload_content( :param body: :type body: V20IssueCredSchemaCore - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_credential_serialize( @@ -237,7 +174,9 @@ async def create_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -250,7 +189,8 @@ def _create_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -326,26 +266,7 @@ async def delete_record( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -356,7 +277,9 @@ async def delete_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -388,26 +311,7 @@ async def delete_record_with_http_info( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -418,7 +322,9 @@ async def delete_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -450,26 +356,7 @@ async def delete_record_without_preload_content( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -480,7 +367,9 @@ async def delete_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -493,7 +382,8 @@ def _delete_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -559,26 +449,7 @@ async def get_record( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -589,7 +460,9 @@ async def get_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -621,26 +494,7 @@ async def get_record_with_http_info( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -651,7 +505,9 @@ async def get_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -683,26 +539,7 @@ async def get_record_without_preload_content( :param cred_ex_id: Credential exchange identifier (required) :type cred_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -713,7 +550,9 @@ async def get_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -726,7 +565,8 @@ def _get_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -808,26 +648,7 @@ async def get_records( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -842,7 +663,7 @@ async def get_records( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20CredExRecordListResult" + "200": "V20CredExRecordListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -891,26 +712,7 @@ async def get_records_with_http_info( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -925,7 +727,7 @@ async def get_records_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20CredExRecordListResult" + "200": "V20CredExRecordListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -974,26 +776,7 @@ async def get_records_without_preload_content( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1008,7 +791,7 @@ async def get_records_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V20CredExRecordListResult" + "200": "V20CredExRecordListResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1025,7 +808,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1040,15 +824,19 @@ def _get_records_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) if role is not None: + _query_params.append(("role", role)) if state is not None: + _query_params.append(("state", state)) if thread_id is not None: + _query_params.append(("thread_id", thread_id)) # process the header parameters @@ -1104,26 +892,7 @@ async def issue_credential( :type cred_ex_id: str :param body: :type body: V20CredIssueRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_serialize( @@ -1135,7 +904,9 @@ async def issue_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1170,26 +941,7 @@ async def issue_credential_with_http_info( :type cred_ex_id: str :param body: :type body: V20CredIssueRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_serialize( @@ -1201,7 +953,9 @@ async def issue_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1236,26 +990,7 @@ async def issue_credential_without_preload_content( :type cred_ex_id: str :param body: :type body: V20CredIssueRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_serialize( @@ -1267,7 +1002,9 @@ async def issue_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1281,7 +1018,8 @@ def _issue_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1357,26 +1095,7 @@ async def issue_credential20_create_offer_post( :param body: :type body: V20CredOfferConnFreeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential20_create_offer_post_serialize( @@ -1387,7 +1106,9 @@ async def issue_credential20_create_offer_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1417,26 +1138,7 @@ async def issue_credential20_create_offer_post_with_http_info( :param body: :type body: V20CredOfferConnFreeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential20_create_offer_post_serialize( @@ -1447,7 +1149,9 @@ async def issue_credential20_create_offer_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1477,26 +1181,7 @@ async def issue_credential20_create_offer_post_without_preload_content( :param body: :type body: V20CredOfferConnFreeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential20_create_offer_post_serialize( @@ -1507,7 +1192,9 @@ async def issue_credential20_create_offer_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1520,7 +1207,8 @@ def _issue_credential20_create_offer_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1594,26 +1282,7 @@ async def issue_credential_automated( :param body: :type body: V20CredExFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_automated_serialize( @@ -1624,7 +1293,9 @@ async def issue_credential_automated( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1654,26 +1325,7 @@ async def issue_credential_automated_with_http_info( :param body: :type body: V20CredExFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_automated_serialize( @@ -1684,7 +1336,9 @@ async def issue_credential_automated_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1714,26 +1368,7 @@ async def issue_credential_automated_without_preload_content( :param body: :type body: V20CredExFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._issue_credential_automated_serialize( @@ -1744,7 +1379,9 @@ async def issue_credential_automated_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1757,7 +1394,8 @@ def _issue_credential_automated_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1836,26 +1474,7 @@ async def report_problem( :type cred_ex_id: str :param body: :type body: V20CredIssueProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1867,7 +1486,9 @@ async def report_problem( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1902,26 +1523,7 @@ async def report_problem_with_http_info( :type cred_ex_id: str :param body: :type body: V20CredIssueProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1933,7 +1535,9 @@ async def report_problem_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1968,26 +1572,7 @@ async def report_problem_without_preload_content( :type cred_ex_id: str :param body: :type body: V20CredIssueProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1999,7 +1584,9 @@ async def report_problem_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2013,7 +1600,8 @@ def _report_problem_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2094,26 +1682,7 @@ async def send_offer( :type cred_ex_id: str :param body: :type body: V20CredBoundOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_serialize( @@ -2125,7 +1694,9 @@ async def send_offer( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2160,26 +1731,7 @@ async def send_offer_with_http_info( :type cred_ex_id: str :param body: :type body: V20CredBoundOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_serialize( @@ -2191,7 +1743,9 @@ async def send_offer_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2226,26 +1780,7 @@ async def send_offer_without_preload_content( :type cred_ex_id: str :param body: :type body: V20CredBoundOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_serialize( @@ -2257,7 +1792,9 @@ async def send_offer_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2271,7 +1808,8 @@ def _send_offer_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2347,26 +1885,7 @@ async def send_offer_free( :param body: :type body: V20CredOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_free_serialize( @@ -2377,7 +1896,9 @@ async def send_offer_free( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2407,26 +1928,7 @@ async def send_offer_free_with_http_info( :param body: :type body: V20CredOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_free_serialize( @@ -2437,7 +1939,9 @@ async def send_offer_free_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2467,26 +1971,7 @@ async def send_offer_free_without_preload_content( :param body: :type body: V20CredOfferRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_offer_free_serialize( @@ -2497,7 +1982,9 @@ async def send_offer_free_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2510,7 +1997,8 @@ def _send_offer_free_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2584,26 +2072,7 @@ async def send_proposal( :param body: :type body: V20CredExFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2614,7 +2083,9 @@ async def send_proposal( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2644,26 +2115,7 @@ async def send_proposal_with_http_info( :param body: :type body: V20CredExFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2674,7 +2126,9 @@ async def send_proposal_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2704,26 +2158,7 @@ async def send_proposal_without_preload_content( :param body: :type body: V20CredExFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2734,7 +2169,9 @@ async def send_proposal_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2747,7 +2184,8 @@ def _send_proposal_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2826,26 +2264,7 @@ async def send_request( :type cred_ex_id: str :param body: :type body: V20CredRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2857,7 +2276,9 @@ async def send_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2892,26 +2313,7 @@ async def send_request_with_http_info( :type cred_ex_id: str :param body: :type body: V20CredRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2923,7 +2325,9 @@ async def send_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2958,26 +2362,7 @@ async def send_request_without_preload_content( :type cred_ex_id: str :param body: :type body: V20CredRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2989,7 +2374,9 @@ async def send_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3003,7 +2390,8 @@ def _send_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3079,26 +2467,7 @@ async def send_request_free( :param body: :type body: V20CredRequestFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -3109,7 +2478,9 @@ async def send_request_free( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3139,26 +2510,7 @@ async def send_request_free_with_http_info( :param body: :type body: V20CredRequestFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -3169,7 +2521,9 @@ async def send_request_free_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3199,26 +2553,7 @@ async def send_request_free_without_preload_content( :param body: :type body: V20CredRequestFree - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -3229,7 +2564,9 @@ async def send_request_free_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3242,7 +2579,8 @@ def _send_request_free_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3321,26 +2659,7 @@ async def store_credential( :type cred_ex_id: str :param body: :type body: V20CredStoreRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._store_credential_serialize( @@ -3352,7 +2671,9 @@ async def store_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3387,26 +2708,7 @@ async def store_credential_with_http_info( :type cred_ex_id: str :param body: :type body: V20CredStoreRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._store_credential_serialize( @@ -3418,7 +2720,9 @@ async def store_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3453,26 +2757,7 @@ async def store_credential_without_preload_content( :type cred_ex_id: str :param body: :type body: V20CredStoreRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._store_credential_serialize( @@ -3484,7 +2769,9 @@ async def store_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20CredExRecordDetail"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20CredExRecordDetail", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3498,7 +2785,8 @@ def _store_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/jsonld_api.py b/aries_cloudcontroller/api/jsonld_api.py index 70b58f1f..91f73d81 100644 --- a/aries_cloudcontroller/api/jsonld_api.py +++ b/aries_cloudcontroller/api/jsonld_api.py @@ -11,19 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.sign_request import SignRequest from aries_cloudcontroller.models.sign_response import SignResponse @@ -65,26 +58,7 @@ async def sign( :param body: :type body: SignRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._sign_serialize( @@ -95,7 +69,9 @@ async def sign( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SignResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -125,26 +101,7 @@ async def sign_with_http_info( :param body: :type body: SignRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._sign_serialize( @@ -155,7 +112,9 @@ async def sign_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SignResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -185,26 +144,7 @@ async def sign_without_preload_content( :param body: :type body: SignRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._sign_serialize( @@ -215,7 +155,9 @@ async def sign_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SignResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -228,7 +170,8 @@ def _sign_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -302,26 +245,7 @@ async def verify( :param body: :type body: VerifyRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_serialize( @@ -332,7 +256,9 @@ async def verify( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -362,26 +288,7 @@ async def verify_with_http_info( :param body: :type body: VerifyRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_serialize( @@ -392,7 +299,9 @@ async def verify_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -422,26 +331,7 @@ async def verify_without_preload_content( :param body: :type body: VerifyRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_serialize( @@ -452,7 +342,9 @@ async def verify_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "VerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "VerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -465,7 +357,8 @@ def _verify_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/ledger_api.py b/aries_cloudcontroller/api/ledger_api.py index 06895ee4..11454c03 100644 --- a/aries_cloudcontroller/api/ledger_api.py +++ b/aries_cloudcontroller/api/ledger_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.configurable_write_ledgers import ( ConfigurableWriteLedgers, @@ -79,26 +69,7 @@ async def accept_taa( :param body: :type body: TAAAccept - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_taa_serialize( @@ -109,7 +80,9 @@ async def accept_taa( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -139,26 +112,7 @@ async def accept_taa_with_http_info( :param body: :type body: TAAAccept - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_taa_serialize( @@ -169,7 +123,9 @@ async def accept_taa_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -199,26 +155,7 @@ async def accept_taa_without_preload_content( :param body: :type body: TAAAccept - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._accept_taa_serialize( @@ -229,7 +166,9 @@ async def accept_taa_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -242,7 +181,8 @@ def _accept_taa_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -313,26 +253,7 @@ async def fetch_taa( """Fetch the current transaction author agreement, if any - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._fetch_taa_serialize( @@ -342,7 +263,9 @@ async def fetch_taa( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TAAResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TAAResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -369,26 +292,7 @@ async def fetch_taa_with_http_info( """Fetch the current transaction author agreement, if any - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._fetch_taa_serialize( @@ -398,7 +302,9 @@ async def fetch_taa_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TAAResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TAAResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -425,26 +331,7 @@ async def fetch_taa_without_preload_content( """Fetch the current transaction author agreement, if any - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._fetch_taa_serialize( @@ -454,7 +341,9 @@ async def fetch_taa_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TAAResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TAAResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -466,7 +355,8 @@ def _fetch_taa_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -534,26 +424,7 @@ async def get_did_endpoint( :type did: str :param endpoint_type: Endpoint type of interest (default 'Endpoint') :type endpoint_type: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_endpoint_serialize( @@ -566,7 +437,7 @@ async def get_did_endpoint( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDIDEndpointResponse" + "200": "GetDIDEndpointResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -603,26 +474,7 @@ async def get_did_endpoint_with_http_info( :type did: str :param endpoint_type: Endpoint type of interest (default 'Endpoint') :type endpoint_type: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_endpoint_serialize( @@ -635,7 +487,7 @@ async def get_did_endpoint_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDIDEndpointResponse" + "200": "GetDIDEndpointResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -672,26 +524,7 @@ async def get_did_endpoint_without_preload_content( :type did: str :param endpoint_type: Endpoint type of interest (default 'Endpoint') :type endpoint_type: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_endpoint_serialize( @@ -704,7 +537,7 @@ async def get_did_endpoint_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDIDEndpointResponse" + "200": "GetDIDEndpointResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -719,7 +552,8 @@ def _get_did_endpoint_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -734,9 +568,11 @@ def _get_did_endpoint_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) if endpoint_type is not None: + _query_params.append(("endpoint_type", endpoint_type)) # process the header parameters @@ -787,26 +623,7 @@ async def get_did_nym_role( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_nym_role_serialize( @@ -817,7 +634,9 @@ async def get_did_nym_role( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "GetNymRoleResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetNymRoleResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -847,26 +666,7 @@ async def get_did_nym_role_with_http_info( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_nym_role_serialize( @@ -877,7 +677,9 @@ async def get_did_nym_role_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "GetNymRoleResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetNymRoleResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -907,26 +709,7 @@ async def get_did_nym_role_without_preload_content( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_nym_role_serialize( @@ -937,7 +720,9 @@ async def get_did_nym_role_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "GetNymRoleResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetNymRoleResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -950,7 +735,8 @@ def _get_did_nym_role_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -965,6 +751,7 @@ def _get_did_nym_role_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) # process the header parameters @@ -1015,26 +802,7 @@ async def get_did_verkey( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_verkey_serialize( @@ -1045,7 +813,9 @@ async def get_did_verkey( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "GetDIDVerkeyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDIDVerkeyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1075,26 +845,7 @@ async def get_did_verkey_with_http_info( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_verkey_serialize( @@ -1105,7 +856,9 @@ async def get_did_verkey_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "GetDIDVerkeyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDIDVerkeyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1135,26 +888,7 @@ async def get_did_verkey_without_preload_content( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_verkey_serialize( @@ -1165,7 +899,9 @@ async def get_did_verkey_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "GetDIDVerkeyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetDIDVerkeyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1178,7 +914,8 @@ def _get_did_verkey_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1193,6 +930,7 @@ def _get_did_verkey_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) # process the header parameters @@ -1240,26 +978,7 @@ async def ledger_config_get( """Fetch the multiple ledger configuration currently in use - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_config_get_serialize( @@ -1269,7 +988,9 @@ async def ledger_config_get( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "LedgerConfigList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "LedgerConfigList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1296,26 +1017,7 @@ async def ledger_config_get_with_http_info( """Fetch the multiple ledger configuration currently in use - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_config_get_serialize( @@ -1325,7 +1027,9 @@ async def ledger_config_get_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "LedgerConfigList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "LedgerConfigList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1352,26 +1056,7 @@ async def ledger_config_get_without_preload_content( """Fetch the multiple ledger configuration currently in use - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_config_get_serialize( @@ -1381,7 +1066,9 @@ async def ledger_config_get_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "LedgerConfigList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "LedgerConfigList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1393,7 +1080,8 @@ def _ledger_config_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1452,26 +1140,7 @@ async def ledger_get_write_ledger_get( """Fetch the current write ledger - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_get_write_ledger_get_serialize( @@ -1481,7 +1150,9 @@ async def ledger_get_write_ledger_get( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WriteLedger"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WriteLedger", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1508,26 +1179,7 @@ async def ledger_get_write_ledger_get_with_http_info( """Fetch the current write ledger - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_get_write_ledger_get_serialize( @@ -1537,7 +1189,9 @@ async def ledger_get_write_ledger_get_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WriteLedger"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WriteLedger", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1564,26 +1218,7 @@ async def ledger_get_write_ledger_get_without_preload_content( """Fetch the current write ledger - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_get_write_ledger_get_serialize( @@ -1593,7 +1228,9 @@ async def ledger_get_write_ledger_get_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WriteLedger"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WriteLedger", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1605,7 +1242,8 @@ def _ledger_get_write_ledger_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1664,26 +1302,7 @@ async def ledger_get_write_ledgers_get( """Fetch list of available write ledgers - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_get_write_ledgers_get_serialize( @@ -1694,7 +1313,7 @@ async def ledger_get_write_ledgers_get( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfigurableWriteLedgers" + "200": "ConfigurableWriteLedgers", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1722,26 +1341,7 @@ async def ledger_get_write_ledgers_get_with_http_info( """Fetch list of available write ledgers - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_get_write_ledgers_get_serialize( @@ -1752,7 +1352,7 @@ async def ledger_get_write_ledgers_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfigurableWriteLedgers" + "200": "ConfigurableWriteLedgers", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1780,26 +1380,7 @@ async def ledger_get_write_ledgers_get_without_preload_content( """Fetch list of available write ledgers - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_get_write_ledgers_get_serialize( @@ -1810,7 +1391,7 @@ async def ledger_get_write_ledgers_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfigurableWriteLedgers" + "200": "ConfigurableWriteLedgers", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1823,7 +1404,8 @@ def _ledger_get_write_ledgers_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1885,26 +1467,7 @@ async def ledger_ledger_id_set_write_ledger_put( :param ledger_id: (required) :type ledger_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_ledger_id_set_write_ledger_put_serialize( @@ -1915,7 +1478,9 @@ async def ledger_ledger_id_set_write_ledger_put( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WriteLedger"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WriteLedger", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1945,26 +1510,7 @@ async def ledger_ledger_id_set_write_ledger_put_with_http_info( :param ledger_id: (required) :type ledger_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_ledger_id_set_write_ledger_put_serialize( @@ -1975,7 +1521,9 @@ async def ledger_ledger_id_set_write_ledger_put_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WriteLedger"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WriteLedger", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2005,26 +1553,7 @@ async def ledger_ledger_id_set_write_ledger_put_without_preload_content( :param ledger_id: (required) :type ledger_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._ledger_ledger_id_set_write_ledger_put_serialize( @@ -2035,7 +1564,9 @@ async def ledger_ledger_id_set_write_ledger_put_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WriteLedger"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WriteLedger", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2048,7 +1579,8 @@ def _ledger_ledger_id_set_write_ledger_put_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2132,26 +1664,7 @@ async def register_nym( :type create_transaction_for_endorser: bool :param role: Role :type role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._register_nym_serialize( @@ -2168,7 +1681,7 @@ async def register_nym( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrRegisterLedgerNymResponse" + "200": "TxnOrRegisterLedgerNymResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2219,26 +1732,7 @@ async def register_nym_with_http_info( :type create_transaction_for_endorser: bool :param role: Role :type role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._register_nym_serialize( @@ -2255,7 +1749,7 @@ async def register_nym_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrRegisterLedgerNymResponse" + "200": "TxnOrRegisterLedgerNymResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2306,26 +1800,7 @@ async def register_nym_without_preload_content( :type create_transaction_for_endorser: bool :param role: Role :type role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._register_nym_serialize( @@ -2342,7 +1817,7 @@ async def register_nym_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrRegisterLedgerNymResponse" + "200": "TxnOrRegisterLedgerNymResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2361,7 +1836,8 @@ def _register_nym_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2376,23 +1852,29 @@ def _register_nym_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) if verkey is not None: + _query_params.append(("verkey", verkey)) if alias is not None: + _query_params.append(("alias", alias)) if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) if role is not None: + _query_params.append(("role", role)) # process the header parameters @@ -2440,26 +1922,7 @@ async def rotate_public_did_keypair( """Rotate key pair for public DID. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._rotate_public_did_keypair_serialize( @@ -2469,7 +1932,9 @@ async def rotate_public_did_keypair( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2496,26 +1961,7 @@ async def rotate_public_did_keypair_with_http_info( """Rotate key pair for public DID. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._rotate_public_did_keypair_serialize( @@ -2525,7 +1971,9 @@ async def rotate_public_did_keypair_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2552,26 +2000,7 @@ async def rotate_public_did_keypair_without_preload_content( """Rotate key pair for public DID. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._rotate_public_did_keypair_serialize( @@ -2581,7 +2010,9 @@ async def rotate_public_did_keypair_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2593,7 +2024,8 @@ def _rotate_public_did_keypair_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/mediation_api.py b/aries_cloudcontroller/api/mediation_api.py index 0f3e8ac6..94da710c 100644 --- a/aries_cloudcontroller/api/mediation_api.py +++ b/aries_cloudcontroller/api/mediation_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional - -from pydantic import Field, StrictInt, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.keylist import Keylist from aries_cloudcontroller.models.keylist_query import KeylistQuery @@ -73,26 +63,7 @@ async def clear_default_mediator( """Clear default mediator - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._clear_default_mediator_serialize( @@ -102,7 +73,9 @@ async def clear_default_mediator( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -129,26 +102,7 @@ async def clear_default_mediator_with_http_info( """Clear default mediator - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._clear_default_mediator_serialize( @@ -158,7 +112,9 @@ async def clear_default_mediator_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -185,26 +141,7 @@ async def clear_default_mediator_without_preload_content( """Clear default mediator - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._clear_default_mediator_serialize( @@ -214,7 +151,9 @@ async def clear_default_mediator_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -226,7 +165,8 @@ def _clear_default_mediator_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -290,26 +230,7 @@ async def delete_record( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -320,7 +241,9 @@ async def delete_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -352,26 +275,7 @@ async def delete_record_with_http_info( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -382,7 +286,9 @@ async def delete_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -414,26 +320,7 @@ async def delete_record_without_preload_content( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -444,7 +331,9 @@ async def delete_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -457,7 +346,8 @@ def _delete_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -526,26 +416,7 @@ async def deny_mediation_request( :type mediation_id: str :param body: :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._deny_mediation_request_serialize( @@ -557,7 +428,9 @@ async def deny_mediation_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationDeny"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationDeny", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -592,26 +465,7 @@ async def deny_mediation_request_with_http_info( :type mediation_id: str :param body: :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._deny_mediation_request_serialize( @@ -623,7 +477,9 @@ async def deny_mediation_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationDeny"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationDeny", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -658,26 +514,7 @@ async def deny_mediation_request_without_preload_content( :type mediation_id: str :param body: :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._deny_mediation_request_serialize( @@ -689,7 +526,9 @@ async def deny_mediation_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationDeny"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationDeny", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -703,7 +542,8 @@ def _deny_mediation_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -776,26 +616,7 @@ async def get_default_mediator( """Get default mediator - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_default_mediator_serialize( @@ -805,7 +626,9 @@ async def get_default_mediator( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -832,26 +655,7 @@ async def get_default_mediator_with_http_info( """Get default mediator - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_default_mediator_serialize( @@ -861,7 +665,9 @@ async def get_default_mediator_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -888,26 +694,7 @@ async def get_default_mediator_without_preload_content( """Get default mediator - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_default_mediator_serialize( @@ -917,7 +704,9 @@ async def get_default_mediator_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -929,7 +718,8 @@ def _get_default_mediator_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -993,26 +783,7 @@ async def get_record( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -1023,7 +794,9 @@ async def get_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1055,26 +828,7 @@ async def get_record_with_http_info( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -1085,7 +839,9 @@ async def get_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1117,26 +873,7 @@ async def get_record_without_preload_content( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -1147,7 +884,9 @@ async def get_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1160,7 +899,8 @@ def _get_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1231,26 +971,7 @@ async def get_records( :type conn_id: str :param state: Mediation state (optional) :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1262,7 +983,9 @@ async def get_records( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1299,26 +1022,7 @@ async def get_records_with_http_info( :type conn_id: str :param state: Mediation state (optional) :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1330,7 +1034,9 @@ async def get_records_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1367,26 +1073,7 @@ async def get_records_without_preload_content( :type conn_id: str :param state: Mediation state (optional) :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1398,7 +1085,9 @@ async def get_records_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "MediationList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "MediationList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1412,7 +1101,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1427,9 +1117,11 @@ def _get_records_serialize( # process the path parameters # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if state is not None: + _query_params.append(("state", state)) # process the header parameters @@ -1482,26 +1174,7 @@ async def grant_mediation_request( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._grant_mediation_request_serialize( @@ -1512,7 +1185,9 @@ async def grant_mediation_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationGrant"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationGrant", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1544,26 +1219,7 @@ async def grant_mediation_request_with_http_info( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._grant_mediation_request_serialize( @@ -1574,7 +1230,9 @@ async def grant_mediation_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationGrant"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationGrant", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1606,26 +1264,7 @@ async def grant_mediation_request_without_preload_content( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._grant_mediation_request_serialize( @@ -1636,7 +1275,9 @@ async def grant_mediation_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationGrant"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationGrant", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1649,7 +1290,8 @@ def _grant_mediation_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1716,26 +1358,7 @@ async def mediation_update_keylist_conn_id_post( :type conn_id: str :param body: :type body: MediationIdMatchInfo - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._mediation_update_keylist_conn_id_post_serialize( @@ -1747,7 +1370,9 @@ async def mediation_update_keylist_conn_id_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "KeylistUpdate"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "KeylistUpdate", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1780,26 +1405,7 @@ async def mediation_update_keylist_conn_id_post_with_http_info( :type conn_id: str :param body: :type body: MediationIdMatchInfo - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._mediation_update_keylist_conn_id_post_serialize( @@ -1811,7 +1417,9 @@ async def mediation_update_keylist_conn_id_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "KeylistUpdate"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "KeylistUpdate", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1844,26 +1452,7 @@ async def mediation_update_keylist_conn_id_post_without_preload_content( :type conn_id: str :param body: :type body: MediationIdMatchInfo - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._mediation_update_keylist_conn_id_post_serialize( @@ -1875,7 +1464,9 @@ async def mediation_update_keylist_conn_id_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "KeylistUpdate"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "KeylistUpdate", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1889,7 +1480,8 @@ def _mediation_update_keylist_conn_id_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1968,26 +1560,7 @@ async def request_mediation( :type conn_id: str :param body: :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._request_mediation_serialize( @@ -1999,7 +1572,9 @@ async def request_mediation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2032,26 +1607,7 @@ async def request_mediation_with_http_info( :type conn_id: str :param body: :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._request_mediation_serialize( @@ -2063,7 +1619,9 @@ async def request_mediation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2096,26 +1654,7 @@ async def request_mediation_without_preload_content( :type conn_id: str :param body: :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._request_mediation_serialize( @@ -2127,7 +1666,9 @@ async def request_mediation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2141,7 +1682,8 @@ def _request_mediation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2227,26 +1769,7 @@ async def retrieve_keylists( :type conn_id: str :param role: Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent :type role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._retrieve_keylists_serialize( @@ -2258,7 +1781,9 @@ async def retrieve_keylists( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "Keylist"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "Keylist", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2298,26 +1823,7 @@ async def retrieve_keylists_with_http_info( :type conn_id: str :param role: Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent :type role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._retrieve_keylists_serialize( @@ -2329,7 +1835,9 @@ async def retrieve_keylists_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "Keylist"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "Keylist", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2369,26 +1877,7 @@ async def retrieve_keylists_without_preload_content( :type conn_id: str :param role: Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent :type role: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._retrieve_keylists_serialize( @@ -2400,7 +1889,9 @@ async def retrieve_keylists_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "Keylist"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "Keylist", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2414,7 +1905,8 @@ def _retrieve_keylists_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2429,9 +1921,11 @@ def _retrieve_keylists_serialize( # process the path parameters # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if role is not None: + _query_params.append(("role", role)) # process the header parameters @@ -2497,26 +1991,7 @@ async def send_keylist_query( :type paginate_offset: int :param body: :type body: KeylistQueryFilterRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_keylist_query_serialize( @@ -2530,7 +2005,9 @@ async def send_keylist_query( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "KeylistQuery"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "KeylistQuery", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2575,26 +2052,7 @@ async def send_keylist_query_with_http_info( :type paginate_offset: int :param body: :type body: KeylistQueryFilterRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_keylist_query_serialize( @@ -2608,7 +2066,9 @@ async def send_keylist_query_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "KeylistQuery"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "KeylistQuery", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2653,26 +2113,7 @@ async def send_keylist_query_without_preload_content( :type paginate_offset: int :param body: :type body: KeylistQueryFilterRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_keylist_query_serialize( @@ -2686,7 +2127,9 @@ async def send_keylist_query_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "KeylistQuery"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "KeylistQuery", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2702,7 +2145,8 @@ def _send_keylist_query_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2719,9 +2163,11 @@ def _send_keylist_query_serialize( _path_params["mediation_id"] = mediation_id # process the query parameters if paginate_limit is not None: + _query_params.append(("paginate_limit", paginate_limit)) if paginate_offset is not None: + _query_params.append(("paginate_offset", paginate_offset)) # process the header parameters @@ -2789,26 +2235,7 @@ async def send_keylist_update( :type mediation_id: str :param body: :type body: KeylistUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_keylist_update_serialize( @@ -2820,7 +2247,9 @@ async def send_keylist_update( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "KeylistUpdate"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "KeylistUpdate", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2855,26 +2284,7 @@ async def send_keylist_update_with_http_info( :type mediation_id: str :param body: :type body: KeylistUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_keylist_update_serialize( @@ -2886,7 +2296,9 @@ async def send_keylist_update_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "KeylistUpdate"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "KeylistUpdate", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2921,26 +2333,7 @@ async def send_keylist_update_without_preload_content( :type mediation_id: str :param body: :type body: KeylistUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_keylist_update_serialize( @@ -2952,7 +2345,9 @@ async def send_keylist_update_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "KeylistUpdate"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "KeylistUpdate", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2966,7 +2361,8 @@ def _send_keylist_update_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3044,26 +2440,7 @@ async def set_default_mediator( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_default_mediator_serialize( @@ -3074,7 +2451,9 @@ async def set_default_mediator( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3106,26 +2485,7 @@ async def set_default_mediator_with_http_info( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_default_mediator_serialize( @@ -3136,7 +2496,9 @@ async def set_default_mediator_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3168,26 +2530,7 @@ async def set_default_mediator_without_preload_content( :param mediation_id: Mediation record identifier (required) :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_default_mediator_serialize( @@ -3198,7 +2541,9 @@ async def set_default_mediator_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"201": "MediationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "201": "MediationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3211,7 +2556,8 @@ def _set_default_mediator_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/multitenancy_api.py b/aries_cloudcontroller/api/multitenancy_api.py index f8af6e1b..9eb623eb 100644 --- a/aries_cloudcontroller/api/multitenancy_api.py +++ b/aries_cloudcontroller/api/multitenancy_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.create_wallet_request import CreateWalletRequest from aries_cloudcontroller.models.create_wallet_response import CreateWalletResponse @@ -77,26 +67,7 @@ async def create_wallet( :param body: :type body: CreateWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_wallet_serialize( @@ -107,7 +78,9 @@ async def create_wallet( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CreateWalletResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CreateWalletResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -137,26 +110,7 @@ async def create_wallet_with_http_info( :param body: :type body: CreateWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_wallet_serialize( @@ -167,7 +121,9 @@ async def create_wallet_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CreateWalletResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CreateWalletResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -197,26 +153,7 @@ async def create_wallet_without_preload_content( :param body: :type body: CreateWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_wallet_serialize( @@ -227,7 +164,9 @@ async def create_wallet_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CreateWalletResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CreateWalletResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -240,7 +179,8 @@ def _create_wallet_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -317,26 +257,7 @@ async def delete_wallet( :type wallet_id: str :param body: :type body: RemoveWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_wallet_serialize( @@ -348,7 +269,9 @@ async def delete_wallet( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -381,26 +304,7 @@ async def delete_wallet_with_http_info( :type wallet_id: str :param body: :type body: RemoveWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_wallet_serialize( @@ -412,7 +316,9 @@ async def delete_wallet_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -445,26 +351,7 @@ async def delete_wallet_without_preload_content( :type wallet_id: str :param body: :type body: RemoveWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_wallet_serialize( @@ -476,7 +363,9 @@ async def delete_wallet_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -490,7 +379,8 @@ def _delete_wallet_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -569,26 +459,7 @@ async def get_auth_token( :type wallet_id: str :param body: :type body: CreateWalletTokenRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_auth_token_serialize( @@ -601,7 +472,7 @@ async def get_auth_token( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateWalletTokenResponse" + "200": "CreateWalletTokenResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -635,26 +506,7 @@ async def get_auth_token_with_http_info( :type wallet_id: str :param body: :type body: CreateWalletTokenRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_auth_token_serialize( @@ -667,7 +519,7 @@ async def get_auth_token_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateWalletTokenResponse" + "200": "CreateWalletTokenResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -701,26 +553,7 @@ async def get_auth_token_without_preload_content( :type wallet_id: str :param body: :type body: CreateWalletTokenRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_auth_token_serialize( @@ -733,7 +566,7 @@ async def get_auth_token_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateWalletTokenResponse" + "200": "CreateWalletTokenResponse", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -748,7 +581,8 @@ def _get_auth_token_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -824,26 +658,7 @@ async def get_wallet( :param wallet_id: Subwallet identifier (required) :type wallet_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallet_serialize( @@ -854,7 +669,9 @@ async def get_wallet( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -884,26 +701,7 @@ async def get_wallet_with_http_info( :param wallet_id: Subwallet identifier (required) :type wallet_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallet_serialize( @@ -914,7 +712,9 @@ async def get_wallet_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -944,26 +744,7 @@ async def get_wallet_without_preload_content( :param wallet_id: Subwallet identifier (required) :type wallet_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallet_serialize( @@ -974,7 +755,9 @@ async def get_wallet_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -987,7 +770,8 @@ def _get_wallet_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1053,26 +837,7 @@ async def get_wallets( :param wallet_name: Wallet name :type wallet_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallets_serialize( @@ -1083,7 +848,9 @@ async def get_wallets( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1115,26 +882,7 @@ async def get_wallets_with_http_info( :param wallet_name: Wallet name :type wallet_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallets_serialize( @@ -1145,7 +893,9 @@ async def get_wallets_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1177,26 +927,7 @@ async def get_wallets_without_preload_content( :param wallet_name: Wallet name :type wallet_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallets_serialize( @@ -1207,7 +938,9 @@ async def get_wallets_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1220,7 +953,8 @@ def _get_wallets_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1235,6 +969,7 @@ def _get_wallets_serialize( # process the path parameters # process the query parameters if wallet_name is not None: + _query_params.append(("wallet_name", wallet_name)) # process the header parameters @@ -1293,26 +1028,7 @@ async def get_wallets( :type wallet_name: str :param group_id: Group id (additional field from ACA-Py plugin) :type group_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallets_serialize( @@ -1324,7 +1040,9 @@ async def get_wallets( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletListWithGroups"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletListWithGroups", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1362,26 +1080,7 @@ async def get_wallets_with_http_info( :type wallet_name: str :param group_id: Group id (additional field from ACA-Py plugin) :type group_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallets_serialize( @@ -1393,7 +1092,9 @@ async def get_wallets_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletListWithGroups"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletListWithGroups", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1431,26 +1132,7 @@ async def get_wallets_without_preload_content( :type wallet_name: str :param group_id: Group id (additional field from ACA-Py plugin) :type group_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_wallets_serialize( @@ -1462,7 +1144,9 @@ async def get_wallets_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletListWithGroups"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletListWithGroups", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1476,7 +1160,8 @@ def _get_wallets_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1491,9 +1176,11 @@ def _get_wallets_serialize( # process the path parameters # process the query parameters if wallet_name is not None: + _query_params.append(("wallet_name", wallet_name)) if group_id is not None: + _query_params.append(("group_id", group_id)) # process the header parameters @@ -1547,26 +1234,7 @@ async def update_wallet( :type wallet_id: str :param body: :type body: UpdateWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._update_wallet_serialize( @@ -1578,7 +1246,9 @@ async def update_wallet( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1611,26 +1281,7 @@ async def update_wallet_with_http_info( :type wallet_id: str :param body: :type body: UpdateWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._update_wallet_serialize( @@ -1642,7 +1293,9 @@ async def update_wallet_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1675,26 +1328,7 @@ async def update_wallet_without_preload_content( :type wallet_id: str :param body: :type body: UpdateWalletRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._update_wallet_serialize( @@ -1706,7 +1340,9 @@ async def update_wallet_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "WalletRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "WalletRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1720,7 +1356,8 @@ def _update_wallet_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/out_of_band_api.py b/aries_cloudcontroller/api/out_of_band_api.py index 2cc7536e..1d7ed896 100644 --- a/aries_cloudcontroller/api/out_of_band_api.py +++ b/aries_cloudcontroller/api/out_of_band_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.invitation_create_request import ( InvitationCreateRequest, @@ -82,26 +72,7 @@ async def create_invitation( :type multi_use: bool :param body: :type body: InvitationCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_invitation_serialize( @@ -114,7 +85,9 @@ async def create_invitation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "InvitationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "InvitationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -156,26 +129,7 @@ async def create_invitation_with_http_info( :type multi_use: bool :param body: :type body: InvitationCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_invitation_serialize( @@ -188,7 +142,9 @@ async def create_invitation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "InvitationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "InvitationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -230,26 +186,7 @@ async def create_invitation_without_preload_content( :type multi_use: bool :param body: :type body: InvitationCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_invitation_serialize( @@ -262,7 +199,9 @@ async def create_invitation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "InvitationRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "InvitationRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -277,7 +216,8 @@ def _create_invitation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -292,9 +232,11 @@ def _create_invitation_serialize( # process the path parameters # process the query parameters if auto_accept is not None: + _query_params.append(("auto_accept", auto_accept)) if multi_use is not None: + _query_params.append(("multi_use", multi_use)) # process the header parameters @@ -380,26 +322,7 @@ async def receive_invitation( :type use_existing_connection: bool :param body: :type body: InvitationMessage - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_invitation_serialize( @@ -414,7 +337,9 @@ async def receive_invitation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "OobRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "OobRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -467,26 +392,7 @@ async def receive_invitation_with_http_info( :type use_existing_connection: bool :param body: :type body: InvitationMessage - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_invitation_serialize( @@ -501,7 +407,9 @@ async def receive_invitation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "OobRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "OobRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -554,26 +462,7 @@ async def receive_invitation_without_preload_content( :type use_existing_connection: bool :param body: :type body: InvitationMessage - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._receive_invitation_serialize( @@ -588,7 +477,9 @@ async def receive_invitation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "OobRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "OobRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -605,7 +496,8 @@ def _receive_invitation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -620,15 +512,19 @@ def _receive_invitation_serialize( # process the path parameters # process the query parameters if alias is not None: + _query_params.append(("alias", alias)) if auto_accept is not None: + _query_params.append(("auto_accept", auto_accept)) if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) if use_existing_connection is not None: + _query_params.append(("use_existing_connection", use_existing_connection)) # process the header parameters diff --git a/aries_cloudcontroller/api/present_proof_v10_api.py b/aries_cloudcontroller/api/present_proof_v10_api.py index 543f97f2..1baf69e7 100644 --- a/aries_cloudcontroller/api/present_proof_v10_api.py +++ b/aries_cloudcontroller/api/present_proof_v10_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, List, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.indy_cred_precis import IndyCredPrecis from aries_cloudcontroller.models.v10_presentation_create_request_request import ( @@ -89,26 +79,7 @@ async def create_proof_request( :param body: :type body: V10PresentationCreateRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_proof_request_serialize( @@ -120,7 +91,7 @@ async def create_proof_request( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -151,26 +122,7 @@ async def create_proof_request_with_http_info( :param body: :type body: V10PresentationCreateRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_proof_request_serialize( @@ -182,7 +134,7 @@ async def create_proof_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -213,26 +165,7 @@ async def create_proof_request_without_preload_content( :param body: :type body: V10PresentationCreateRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_proof_request_serialize( @@ -244,7 +177,7 @@ async def create_proof_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -258,7 +191,8 @@ def _create_proof_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -334,26 +268,7 @@ async def delete_record( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -364,7 +279,9 @@ async def delete_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -396,26 +313,7 @@ async def delete_record_with_http_info( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -426,7 +324,9 @@ async def delete_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -458,26 +358,7 @@ async def delete_record_without_preload_content( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -488,7 +369,9 @@ async def delete_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -501,7 +384,8 @@ def _delete_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -591,26 +475,7 @@ async def get_matching_credentials( :type referent: str :param start: Start index :type start: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_matching_credentials_serialize( @@ -625,7 +490,9 @@ async def get_matching_credentials( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "List[IndyCredPrecis]"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "List[IndyCredPrecis]", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -681,26 +548,7 @@ async def get_matching_credentials_with_http_info( :type referent: str :param start: Start index :type start: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_matching_credentials_serialize( @@ -715,7 +563,9 @@ async def get_matching_credentials_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "List[IndyCredPrecis]"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "List[IndyCredPrecis]", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -771,26 +621,7 @@ async def get_matching_credentials_without_preload_content( :type referent: str :param start: Start index :type start: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_matching_credentials_serialize( @@ -805,7 +636,9 @@ async def get_matching_credentials_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "List[IndyCredPrecis]"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "List[IndyCredPrecis]", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -822,7 +655,8 @@ def _get_matching_credentials_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -839,15 +673,19 @@ def _get_matching_credentials_serialize( _path_params["pres_ex_id"] = pres_ex_id # process the query parameters if count is not None: + _query_params.append(("count", count)) if extra_query is not None: + _query_params.append(("extra_query", extra_query)) if referent is not None: + _query_params.append(("referent", referent)) if start is not None: + _query_params.append(("start", start)) # process the header parameters @@ -900,26 +738,7 @@ async def get_record( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -931,7 +750,7 @@ async def get_record( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -964,26 +783,7 @@ async def get_record_with_http_info( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -995,7 +795,7 @@ async def get_record_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1028,26 +828,7 @@ async def get_record_without_preload_content( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -1059,7 +840,7 @@ async def get_record_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1073,7 +854,8 @@ def _get_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1155,26 +937,7 @@ async def get_records( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1189,7 +952,7 @@ async def get_records( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchangeList" + "200": "V10PresentationExchangeList", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1238,26 +1001,7 @@ async def get_records_with_http_info( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1272,7 +1016,7 @@ async def get_records_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchangeList" + "200": "V10PresentationExchangeList", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1321,26 +1065,7 @@ async def get_records_without_preload_content( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1355,7 +1080,7 @@ async def get_records_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchangeList" + "200": "V10PresentationExchangeList", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1372,7 +1097,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1387,15 +1113,19 @@ def _get_records_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) if role is not None: + _query_params.append(("role", role)) if state is not None: + _query_params.append(("state", state)) if thread_id is not None: + _query_params.append(("thread_id", thread_id)) # process the header parameters @@ -1451,26 +1181,7 @@ async def report_problem( :type pres_ex_id: str :param body: :type body: V10PresentationProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1482,7 +1193,9 @@ async def report_problem( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1517,26 +1230,7 @@ async def report_problem_with_http_info( :type pres_ex_id: str :param body: :type body: V10PresentationProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1548,7 +1242,9 @@ async def report_problem_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1583,26 +1279,7 @@ async def report_problem_without_preload_content( :type pres_ex_id: str :param body: :type body: V10PresentationProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1614,7 +1291,9 @@ async def report_problem_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1628,7 +1307,8 @@ def _report_problem_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1709,26 +1389,7 @@ async def send_presentation( :type pres_ex_id: str :param body: :type body: V10PresentationSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_presentation_serialize( @@ -1741,7 +1402,7 @@ async def send_presentation( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1777,26 +1438,7 @@ async def send_presentation_with_http_info( :type pres_ex_id: str :param body: :type body: V10PresentationSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_presentation_serialize( @@ -1809,7 +1451,7 @@ async def send_presentation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1845,26 +1487,7 @@ async def send_presentation_without_preload_content( :type pres_ex_id: str :param body: :type body: V10PresentationSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_presentation_serialize( @@ -1877,7 +1500,7 @@ async def send_presentation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1892,7 +1515,8 @@ def _send_presentation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1968,26 +1592,7 @@ async def send_proposal( :param body: :type body: V10PresentationProposalRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -1999,7 +1604,7 @@ async def send_proposal( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2030,26 +1635,7 @@ async def send_proposal_with_http_info( :param body: :type body: V10PresentationProposalRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2061,7 +1647,7 @@ async def send_proposal_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2092,26 +1678,7 @@ async def send_proposal_without_preload_content( :param body: :type body: V10PresentationProposalRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2123,7 +1690,7 @@ async def send_proposal_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2137,7 +1704,8 @@ def _send_proposal_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2216,26 +1784,7 @@ async def send_request( :type pres_ex_id: str :param body: :type body: V10PresentationSendRequestToProposal - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2248,7 +1797,7 @@ async def send_request( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2284,26 +1833,7 @@ async def send_request_with_http_info( :type pres_ex_id: str :param body: :type body: V10PresentationSendRequestToProposal - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2316,7 +1846,7 @@ async def send_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2352,26 +1882,7 @@ async def send_request_without_preload_content( :type pres_ex_id: str :param body: :type body: V10PresentationSendRequestToProposal - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2384,7 +1895,7 @@ async def send_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2399,7 +1910,8 @@ def _send_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2475,26 +1987,7 @@ async def send_request_free( :param body: :type body: V10PresentationSendRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -2506,7 +1999,7 @@ async def send_request_free( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2537,26 +2030,7 @@ async def send_request_free_with_http_info( :param body: :type body: V10PresentationSendRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -2568,7 +2042,7 @@ async def send_request_free_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2599,26 +2073,7 @@ async def send_request_free_without_preload_content( :param body: :type body: V10PresentationSendRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -2630,7 +2085,7 @@ async def send_request_free_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2644,7 +2099,8 @@ def _send_request_free_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2720,26 +2176,7 @@ async def verify_presentation( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_presentation_serialize( @@ -2751,7 +2188,7 @@ async def verify_presentation( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2784,26 +2221,7 @@ async def verify_presentation_with_http_info( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_presentation_serialize( @@ -2815,7 +2233,7 @@ async def verify_presentation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2848,26 +2266,7 @@ async def verify_presentation_without_preload_content( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_presentation_serialize( @@ -2879,7 +2278,7 @@ async def verify_presentation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "V10PresentationExchange" + "200": "V10PresentationExchange", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2893,7 +2292,8 @@ def _verify_presentation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/present_proof_v20_api.py b/aries_cloudcontroller/api/present_proof_v20_api.py index 509a28bb..02ca9e82 100644 --- a/aries_cloudcontroller/api/present_proof_v20_api.py +++ b/aries_cloudcontroller/api/present_proof_v20_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, List, Optional, Union - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.indy_cred_precis import IndyCredPrecis from aries_cloudcontroller.models.v20_pres_create_request_request import ( @@ -85,26 +75,7 @@ async def create_proof_request( :param body: :type body: V20PresCreateRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_proof_request_serialize( @@ -115,7 +86,9 @@ async def create_proof_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -145,26 +118,7 @@ async def create_proof_request_with_http_info( :param body: :type body: V20PresCreateRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_proof_request_serialize( @@ -175,7 +129,9 @@ async def create_proof_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -205,26 +161,7 @@ async def create_proof_request_without_preload_content( :param body: :type body: V20PresCreateRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_proof_request_serialize( @@ -235,7 +172,9 @@ async def create_proof_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -248,7 +187,8 @@ def _create_proof_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -324,26 +264,7 @@ async def delete_record( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -354,7 +275,9 @@ async def delete_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -386,26 +309,7 @@ async def delete_record_with_http_info( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -416,7 +320,9 @@ async def delete_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -448,26 +354,7 @@ async def delete_record_without_preload_content( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._delete_record_serialize( @@ -478,7 +365,9 @@ async def delete_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -491,7 +380,8 @@ def _delete_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -581,26 +471,7 @@ async def get_matching_credentials( :type referent: str :param start: Start index :type start: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_matching_credentials_serialize( @@ -615,7 +486,9 @@ async def get_matching_credentials( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "List[IndyCredPrecis]"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "List[IndyCredPrecis]", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -671,26 +544,7 @@ async def get_matching_credentials_with_http_info( :type referent: str :param start: Start index :type start: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_matching_credentials_serialize( @@ -705,7 +559,9 @@ async def get_matching_credentials_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "List[IndyCredPrecis]"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "List[IndyCredPrecis]", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -761,26 +617,7 @@ async def get_matching_credentials_without_preload_content( :type referent: str :param start: Start index :type start: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_matching_credentials_serialize( @@ -795,7 +632,9 @@ async def get_matching_credentials_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "List[IndyCredPrecis]"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "List[IndyCredPrecis]", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -812,7 +651,8 @@ def _get_matching_credentials_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -829,15 +669,19 @@ def _get_matching_credentials_serialize( _path_params["pres_ex_id"] = pres_ex_id # process the query parameters if count is not None: + _query_params.append(("count", count)) if extra_query is not None: + _query_params.append(("extra_query", extra_query)) if referent is not None: + _query_params.append(("referent", referent)) if start is not None: + _query_params.append(("start", start)) # process the header parameters @@ -890,26 +734,7 @@ async def get_record( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -920,7 +745,9 @@ async def get_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -952,26 +779,7 @@ async def get_record_with_http_info( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -982,7 +790,9 @@ async def get_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1014,26 +824,7 @@ async def get_record_without_preload_content( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_record_serialize( @@ -1044,7 +835,9 @@ async def get_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1057,7 +850,8 @@ def _get_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1139,26 +933,7 @@ async def get_records( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1172,7 +947,9 @@ async def get_records( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecordList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecordList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1220,26 +997,7 @@ async def get_records_with_http_info( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1253,7 +1011,9 @@ async def get_records_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecordList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecordList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1301,26 +1061,7 @@ async def get_records_without_preload_content( :type state: str :param thread_id: Thread identifier :type thread_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_records_serialize( @@ -1334,7 +1075,9 @@ async def get_records_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecordList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecordList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1350,7 +1093,8 @@ def _get_records_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1365,15 +1109,19 @@ def _get_records_serialize( # process the path parameters # process the query parameters if connection_id is not None: + _query_params.append(("connection_id", connection_id)) if role is not None: + _query_params.append(("role", role)) if state is not None: + _query_params.append(("state", state)) if thread_id is not None: + _query_params.append(("thread_id", thread_id)) # process the header parameters @@ -1429,26 +1177,7 @@ async def report_problem( :type pres_ex_id: str :param body: :type body: V20PresProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1460,7 +1189,9 @@ async def report_problem( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1495,26 +1226,7 @@ async def report_problem_with_http_info( :type pres_ex_id: str :param body: :type body: V20PresProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1526,7 +1238,9 @@ async def report_problem_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1561,26 +1275,7 @@ async def report_problem_without_preload_content( :type pres_ex_id: str :param body: :type body: V20PresProblemReportRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._report_problem_serialize( @@ -1592,7 +1287,9 @@ async def report_problem_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1606,7 +1303,8 @@ def _report_problem_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1687,26 +1385,7 @@ async def send_presentation( :type pres_ex_id: str :param body: :type body: V20PresSpecByFormatRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_presentation_serialize( @@ -1718,7 +1397,9 @@ async def send_presentation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1753,26 +1434,7 @@ async def send_presentation_with_http_info( :type pres_ex_id: str :param body: :type body: V20PresSpecByFormatRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_presentation_serialize( @@ -1784,7 +1446,9 @@ async def send_presentation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1819,26 +1483,7 @@ async def send_presentation_without_preload_content( :type pres_ex_id: str :param body: :type body: V20PresSpecByFormatRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_presentation_serialize( @@ -1850,7 +1495,9 @@ async def send_presentation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1864,7 +1511,8 @@ def _send_presentation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1940,26 +1588,7 @@ async def send_proposal( :param body: :type body: V20PresProposalRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -1970,7 +1599,9 @@ async def send_proposal( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2000,26 +1631,7 @@ async def send_proposal_with_http_info( :param body: :type body: V20PresProposalRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2030,7 +1642,9 @@ async def send_proposal_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2060,26 +1674,7 @@ async def send_proposal_without_preload_content( :param body: :type body: V20PresProposalRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_proposal_serialize( @@ -2090,7 +1685,9 @@ async def send_proposal_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2103,7 +1700,8 @@ def _send_proposal_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2182,26 +1780,7 @@ async def send_request( :type pres_ex_id: str :param body: :type body: V20PresentationSendRequestToProposal - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2213,7 +1792,9 @@ async def send_request( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2248,26 +1829,7 @@ async def send_request_with_http_info( :type pres_ex_id: str :param body: :type body: V20PresentationSendRequestToProposal - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2279,7 +1841,9 @@ async def send_request_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2314,26 +1878,7 @@ async def send_request_without_preload_content( :type pres_ex_id: str :param body: :type body: V20PresentationSendRequestToProposal - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_serialize( @@ -2345,7 +1890,9 @@ async def send_request_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2359,7 +1906,8 @@ def _send_request_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2435,26 +1983,7 @@ async def send_request_free( :param body: :type body: V20PresSendRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -2465,7 +1994,9 @@ async def send_request_free( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2495,26 +2026,7 @@ async def send_request_free_with_http_info( :param body: :type body: V20PresSendRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -2525,7 +2037,9 @@ async def send_request_free_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2555,26 +2069,7 @@ async def send_request_free_without_preload_content( :param body: :type body: V20PresSendRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_request_free_serialize( @@ -2585,7 +2080,9 @@ async def send_request_free_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2598,7 +2095,8 @@ def _send_request_free_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2674,26 +2172,7 @@ async def verify_presentation( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_presentation_serialize( @@ -2704,7 +2183,9 @@ async def verify_presentation( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2736,26 +2217,7 @@ async def verify_presentation_with_http_info( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_presentation_serialize( @@ -2766,7 +2228,9 @@ async def verify_presentation_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2798,26 +2262,7 @@ async def verify_presentation_without_preload_content( :param pres_ex_id: Presentation exchange identifier (required) :type pres_ex_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._verify_presentation_serialize( @@ -2828,7 +2273,9 @@ async def verify_presentation_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "V20PresExRecord"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "V20PresExRecord", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2841,7 +2288,8 @@ def _verify_presentation_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/resolver_api.py b/aries_cloudcontroller/api/resolver_api.py index 9b643d8b..f05f4aff 100644 --- a/aries_cloudcontroller/api/resolver_api.py +++ b/aries_cloudcontroller/api/resolver_api.py @@ -11,20 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.resolution_result import ResolutionResult from aries_cloudcontroller.rest import RESTResponseType @@ -63,26 +55,7 @@ async def get_did( :param did: DID (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_serialize( @@ -93,7 +66,9 @@ async def get_did( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ResolutionResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ResolutionResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -123,26 +98,7 @@ async def get_did_with_http_info( :param did: DID (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_serialize( @@ -153,7 +109,9 @@ async def get_did_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ResolutionResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ResolutionResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -183,26 +141,7 @@ async def get_did_without_preload_content( :param did: DID (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_serialize( @@ -213,7 +152,9 @@ async def get_did_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ResolutionResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ResolutionResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -226,7 +167,8 @@ def _get_did_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/revocation_api.py b/aries_cloudcontroller/api/revocation_api.py index 13882a52..38f06733 100644 --- a/aries_cloudcontroller/api/revocation_api.py +++ b/aries_cloudcontroller/api/revocation_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.clear_pending_revocations_request import ( ClearPendingRevocationsRequest, @@ -91,26 +81,7 @@ async def clear_pending_revocations( :param body: :type body: ClearPendingRevocationsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._clear_pending_revocations_serialize( @@ -121,7 +92,9 @@ async def clear_pending_revocations( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "PublishRevocations"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "PublishRevocations", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -151,26 +124,7 @@ async def clear_pending_revocations_with_http_info( :param body: :type body: ClearPendingRevocationsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._clear_pending_revocations_serialize( @@ -181,7 +135,9 @@ async def clear_pending_revocations_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "PublishRevocations"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "PublishRevocations", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -211,26 +167,7 @@ async def clear_pending_revocations_without_preload_content( :param body: :type body: ClearPendingRevocationsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._clear_pending_revocations_serialize( @@ -241,7 +178,9 @@ async def clear_pending_revocations_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "PublishRevocations"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "PublishRevocations", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -254,7 +193,8 @@ def _clear_pending_revocations_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -328,26 +268,7 @@ async def create_registry( :param body: :type body: RevRegCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_registry_serialize( @@ -358,7 +279,9 @@ async def create_registry( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -388,26 +311,7 @@ async def create_registry_with_http_info( :param body: :type body: RevRegCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_registry_serialize( @@ -418,7 +322,9 @@ async def create_registry_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -448,26 +354,7 @@ async def create_registry_without_preload_content( :param body: :type body: RevRegCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_registry_serialize( @@ -478,7 +365,9 @@ async def create_registry_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -491,7 +380,8 @@ def _create_registry_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -567,26 +457,7 @@ async def download_tails_file( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._download_tails_file_serialize( @@ -597,7 +468,9 @@ async def download_tails_file( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -629,26 +502,7 @@ async def download_tails_file_with_http_info( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._download_tails_file_serialize( @@ -659,7 +513,9 @@ async def download_tails_file_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -691,26 +547,7 @@ async def download_tails_file_without_preload_content( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._download_tails_file_serialize( @@ -721,7 +558,9 @@ async def download_tails_file_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -734,7 +573,8 @@ def _download_tails_file_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -800,26 +640,7 @@ async def get_active_registry_for_cred_def( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_active_registry_for_cred_def_serialize( @@ -830,7 +651,9 @@ async def get_active_registry_for_cred_def( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -862,26 +685,7 @@ async def get_active_registry_for_cred_def_with_http_info( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_active_registry_for_cred_def_serialize( @@ -892,7 +696,9 @@ async def get_active_registry_for_cred_def_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -924,26 +730,7 @@ async def get_active_registry_for_cred_def_without_preload_content( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_active_registry_for_cred_def_serialize( @@ -954,7 +741,9 @@ async def get_active_registry_for_cred_def_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -967,7 +756,8 @@ def _get_active_registry_for_cred_def_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1039,26 +829,7 @@ async def get_created_registries( :type cred_def_id: str :param state: Revocation registry state :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_registries_serialize( @@ -1070,7 +841,9 @@ async def get_created_registries( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegsCreated"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegsCreated", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1108,26 +881,7 @@ async def get_created_registries_with_http_info( :type cred_def_id: str :param state: Revocation registry state :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_registries_serialize( @@ -1139,7 +893,9 @@ async def get_created_registries_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegsCreated"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegsCreated", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1177,26 +933,7 @@ async def get_created_registries_without_preload_content( :type cred_def_id: str :param state: Revocation registry state :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_registries_serialize( @@ -1208,7 +945,9 @@ async def get_created_registries_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegsCreated"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegsCreated", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1222,7 +961,8 @@ def _get_created_registries_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1237,9 +977,11 @@ def _get_created_registries_serialize( # process the path parameters # process the query parameters if cred_def_id is not None: + _query_params.append(("cred_def_id", cred_def_id)) if state is not None: + _query_params.append(("state", state)) # process the header parameters @@ -1292,26 +1034,7 @@ async def get_registry( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_registry_serialize( @@ -1322,7 +1045,9 @@ async def get_registry( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1354,26 +1079,7 @@ async def get_registry_with_http_info( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_registry_serialize( @@ -1384,7 +1090,9 @@ async def get_registry_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1416,26 +1124,7 @@ async def get_registry_without_preload_content( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_registry_serialize( @@ -1446,7 +1135,9 @@ async def get_registry_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1459,7 +1150,8 @@ def _get_registry_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1525,26 +1217,7 @@ async def get_registry_issued_credentials_count( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_registry_issued_credentials_count_serialize( @@ -1555,7 +1228,9 @@ async def get_registry_issued_credentials_count( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegIssuedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegIssuedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1587,26 +1262,7 @@ async def get_registry_issued_credentials_count_with_http_info( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_registry_issued_credentials_count_serialize( @@ -1617,7 +1273,9 @@ async def get_registry_issued_credentials_count_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegIssuedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegIssuedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1649,26 +1307,7 @@ async def get_registry_issued_credentials_count_without_preload_content( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_registry_issued_credentials_count_serialize( @@ -1679,7 +1318,9 @@ async def get_registry_issued_credentials_count_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegIssuedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegIssuedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1692,7 +1333,8 @@ def _get_registry_issued_credentials_count_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1771,26 +1413,7 @@ async def get_revocation_status( :type cred_rev_id: str :param rev_reg_id: Revocation registry identifier :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_revocation_status_serialize( @@ -1803,7 +1426,9 @@ async def get_revocation_status( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredRevRecordResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredRevRecordResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1848,26 +1473,7 @@ async def get_revocation_status_with_http_info( :type cred_rev_id: str :param rev_reg_id: Revocation registry identifier :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_revocation_status_serialize( @@ -1880,7 +1486,9 @@ async def get_revocation_status_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredRevRecordResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredRevRecordResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1925,26 +1533,7 @@ async def get_revocation_status_without_preload_content( :type cred_rev_id: str :param rev_reg_id: Revocation registry identifier :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_revocation_status_serialize( @@ -1957,7 +1546,9 @@ async def get_revocation_status_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "CredRevRecordResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "CredRevRecordResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1972,7 +1563,8 @@ def _get_revocation_status_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1987,12 +1579,15 @@ def _get_revocation_status_serialize( # process the path parameters # process the query parameters if cred_ex_id is not None: + _query_params.append(("cred_ex_id", cred_ex_id)) if cred_rev_id is not None: + _query_params.append(("cred_rev_id", cred_rev_id)) if rev_reg_id is not None: + _query_params.append(("rev_reg_id", rev_reg_id)) # process the header parameters @@ -2056,26 +1651,7 @@ async def publish_rev_reg_def( :type conn_id: str :param create_transaction_for_endorser: Create Transaction For Endorser's signature :type create_transaction_for_endorser: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_rev_reg_def_serialize( @@ -2088,7 +1664,9 @@ async def publish_rev_reg_def( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TxnOrRevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TxnOrRevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2131,26 +1709,7 @@ async def publish_rev_reg_def_with_http_info( :type conn_id: str :param create_transaction_for_endorser: Create Transaction For Endorser's signature :type create_transaction_for_endorser: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_rev_reg_def_serialize( @@ -2163,7 +1722,9 @@ async def publish_rev_reg_def_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TxnOrRevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TxnOrRevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2206,26 +1767,7 @@ async def publish_rev_reg_def_without_preload_content( :type conn_id: str :param create_transaction_for_endorser: Create Transaction For Endorser's signature :type create_transaction_for_endorser: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_rev_reg_def_serialize( @@ -2238,7 +1780,9 @@ async def publish_rev_reg_def_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TxnOrRevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TxnOrRevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2253,7 +1797,8 @@ def _publish_rev_reg_def_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2270,9 +1815,11 @@ def _publish_rev_reg_def_serialize( _path_params["rev_reg_id"] = rev_reg_id # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) @@ -2338,26 +1885,7 @@ async def publish_rev_reg_entry( :type conn_id: str :param create_transaction_for_endorser: Create Transaction For Endorser's signature :type create_transaction_for_endorser: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_rev_reg_entry_serialize( @@ -2370,7 +1898,9 @@ async def publish_rev_reg_entry( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2413,26 +1943,7 @@ async def publish_rev_reg_entry_with_http_info( :type conn_id: str :param create_transaction_for_endorser: Create Transaction For Endorser's signature :type create_transaction_for_endorser: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_rev_reg_entry_serialize( @@ -2445,7 +1956,9 @@ async def publish_rev_reg_entry_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2488,26 +2001,7 @@ async def publish_rev_reg_entry_without_preload_content( :type conn_id: str :param create_transaction_for_endorser: Create Transaction For Endorser's signature :type create_transaction_for_endorser: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_rev_reg_entry_serialize( @@ -2520,7 +2014,9 @@ async def publish_rev_reg_entry_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2535,7 +2031,8 @@ def _publish_rev_reg_entry_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2552,9 +2049,11 @@ def _publish_rev_reg_entry_serialize( _path_params["rev_reg_id"] = rev_reg_id # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) @@ -2607,26 +2106,7 @@ async def publish_revocations( :param body: :type body: PublishRevocations - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_revocations_serialize( @@ -2638,7 +2118,7 @@ async def publish_revocations( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrPublishRevocationsResult" + "200": "TxnOrPublishRevocationsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2669,26 +2149,7 @@ async def publish_revocations_with_http_info( :param body: :type body: PublishRevocations - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_revocations_serialize( @@ -2700,7 +2161,7 @@ async def publish_revocations_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrPublishRevocationsResult" + "200": "TxnOrPublishRevocationsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2731,26 +2192,7 @@ async def publish_revocations_without_preload_content( :param body: :type body: PublishRevocations - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_revocations_serialize( @@ -2762,7 +2204,7 @@ async def publish_revocations_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TxnOrPublishRevocationsResult" + "200": "TxnOrPublishRevocationsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2776,7 +2218,8 @@ def _publish_revocations_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2852,26 +2295,7 @@ async def revocation_active_registry_cred_def_id_rotate_post( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_active_registry_cred_def_id_rotate_post_serialize( @@ -2882,7 +2306,9 @@ async def revocation_active_registry_cred_def_id_rotate_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegsCreated"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegsCreated", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2914,26 +2340,7 @@ async def revocation_active_registry_cred_def_id_rotate_post_with_http_info( :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_active_registry_cred_def_id_rotate_post_serialize( @@ -2944,7 +2351,9 @@ async def revocation_active_registry_cred_def_id_rotate_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegsCreated"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegsCreated", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2976,26 +2385,7 @@ async def revocation_active_registry_cred_def_id_rotate_post_without_preload_con :param cred_def_id: Credential definition identifier (required) :type cred_def_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_active_registry_cred_def_id_rotate_post_serialize( @@ -3006,7 +2396,9 @@ async def revocation_active_registry_cred_def_id_rotate_post_without_preload_con _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegsCreated"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegsCreated", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3019,7 +2411,8 @@ def _revocation_active_registry_cred_def_id_rotate_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3092,26 +2485,7 @@ async def revocation_registry_delete_tails_file_delete( :type cred_def_id: str :param rev_reg_id: Revocation registry identifier :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_delete_tails_file_delete_serialize( @@ -3123,7 +2497,9 @@ async def revocation_registry_delete_tails_file_delete( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TailsDeleteResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TailsDeleteResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3162,26 +2538,7 @@ async def revocation_registry_delete_tails_file_delete_with_http_info( :type cred_def_id: str :param rev_reg_id: Revocation registry identifier :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_delete_tails_file_delete_serialize( @@ -3193,7 +2550,9 @@ async def revocation_registry_delete_tails_file_delete_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TailsDeleteResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TailsDeleteResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3232,26 +2591,7 @@ async def revocation_registry_delete_tails_file_delete_without_preload_content( :type cred_def_id: str :param rev_reg_id: Revocation registry identifier :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_delete_tails_file_delete_serialize( @@ -3263,7 +2603,9 @@ async def revocation_registry_delete_tails_file_delete_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TailsDeleteResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TailsDeleteResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -3277,7 +2619,8 @@ def _revocation_registry_delete_tails_file_delete_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3292,9 +2635,11 @@ def _revocation_registry_delete_tails_file_delete_serialize( # process the path parameters # process the query parameters if cred_def_id is not None: + _query_params.append(("cred_def_id", cred_def_id)) if rev_reg_id is not None: + _query_params.append(("rev_reg_id", rev_reg_id)) # process the header parameters @@ -3353,26 +2698,7 @@ async def revocation_registry_rev_reg_id_fix_revocation_entry_state_put( :type rev_reg_id: str :param apply_ledger_update: Apply updated accumulator transaction to ledger (required) :type apply_ledger_update: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_fix_revocation_entry_state_put_serialize( @@ -3385,7 +2711,7 @@ async def revocation_registry_rev_reg_id_fix_revocation_entry_state_put( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevRegWalletUpdatedResult" + "200": "RevRegWalletUpdatedResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3424,26 +2750,7 @@ async def revocation_registry_rev_reg_id_fix_revocation_entry_state_put_with_htt :type rev_reg_id: str :param apply_ledger_update: Apply updated accumulator transaction to ledger (required) :type apply_ledger_update: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_fix_revocation_entry_state_put_serialize( @@ -3456,7 +2763,7 @@ async def revocation_registry_rev_reg_id_fix_revocation_entry_state_put_with_htt ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevRegWalletUpdatedResult" + "200": "RevRegWalletUpdatedResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3495,26 +2802,7 @@ async def revocation_registry_rev_reg_id_fix_revocation_entry_state_put_without_ :type rev_reg_id: str :param apply_ledger_update: Apply updated accumulator transaction to ledger (required) :type apply_ledger_update: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_fix_revocation_entry_state_put_serialize( @@ -3527,7 +2815,7 @@ async def revocation_registry_rev_reg_id_fix_revocation_entry_state_put_without_ ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevRegWalletUpdatedResult" + "200": "RevRegWalletUpdatedResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3542,7 +2830,8 @@ def _revocation_registry_rev_reg_id_fix_revocation_entry_state_put_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3559,6 +2848,7 @@ def _revocation_registry_rev_reg_id_fix_revocation_entry_state_put_serialize( _path_params["rev_reg_id"] = rev_reg_id # process the query parameters if apply_ledger_update is not None: + _query_params.append(("apply_ledger_update", apply_ledger_update)) # process the header parameters @@ -3611,26 +2901,7 @@ async def revocation_registry_rev_reg_id_issued_details_get( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_issued_details_get_serialize( @@ -3642,7 +2913,7 @@ async def revocation_registry_rev_reg_id_issued_details_get( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredRevRecordDetailsResult" + "200": "CredRevRecordDetailsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3675,26 +2946,7 @@ async def revocation_registry_rev_reg_id_issued_details_get_with_http_info( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_issued_details_get_serialize( @@ -3706,7 +2958,7 @@ async def revocation_registry_rev_reg_id_issued_details_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredRevRecordDetailsResult" + "200": "CredRevRecordDetailsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3739,26 +2991,7 @@ async def revocation_registry_rev_reg_id_issued_details_get_without_preload_cont :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_issued_details_get_serialize( @@ -3770,7 +3003,7 @@ async def revocation_registry_rev_reg_id_issued_details_get_without_preload_cont ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredRevRecordDetailsResult" + "200": "CredRevRecordDetailsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3784,7 +3017,8 @@ def _revocation_registry_rev_reg_id_issued_details_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -3850,26 +3084,7 @@ async def revocation_registry_rev_reg_id_issued_indy_recs_get( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_issued_indy_recs_get_serialize( @@ -3881,7 +3096,7 @@ async def revocation_registry_rev_reg_id_issued_indy_recs_get( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredRevIndyRecordsResult" + "200": "CredRevIndyRecordsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3914,26 +3129,7 @@ async def revocation_registry_rev_reg_id_issued_indy_recs_get_with_http_info( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_issued_indy_recs_get_serialize( @@ -3945,7 +3141,7 @@ async def revocation_registry_rev_reg_id_issued_indy_recs_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredRevIndyRecordsResult" + "200": "CredRevIndyRecordsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3978,26 +3174,7 @@ async def revocation_registry_rev_reg_id_issued_indy_recs_get_without_preload_co :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revocation_registry_rev_reg_id_issued_indy_recs_get_serialize( @@ -4009,7 +3186,7 @@ async def revocation_registry_rev_reg_id_issued_indy_recs_get_without_preload_co ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredRevIndyRecordsResult" + "200": "CredRevIndyRecordsResult", } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -4023,7 +3200,8 @@ def _revocation_registry_rev_reg_id_issued_indy_recs_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -4087,26 +3265,7 @@ async def revoke_credential( :param body: :type body: RevokeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revoke_credential_serialize( @@ -4117,7 +3276,9 @@ async def revoke_credential( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4147,26 +3308,7 @@ async def revoke_credential_with_http_info( :param body: :type body: RevokeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revoke_credential_serialize( @@ -4177,7 +3319,9 @@ async def revoke_credential_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4207,26 +3351,7 @@ async def revoke_credential_without_preload_content( :param body: :type body: RevokeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._revoke_credential_serialize( @@ -4237,7 +3362,9 @@ async def revoke_credential_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4250,7 +3377,8 @@ def _revoke_credential_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -4331,26 +3459,7 @@ async def set_registry_state( :type rev_reg_id: str :param state: Revocation registry state to set (required) :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_registry_state_serialize( @@ -4362,7 +3471,9 @@ async def set_registry_state( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4399,26 +3510,7 @@ async def set_registry_state_with_http_info( :type rev_reg_id: str :param state: Revocation registry state to set (required) :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_registry_state_serialize( @@ -4430,7 +3522,9 @@ async def set_registry_state_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4467,26 +3561,7 @@ async def set_registry_state_without_preload_content( :type rev_reg_id: str :param state: Revocation registry state to set (required) :type state: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_registry_state_serialize( @@ -4498,7 +3573,9 @@ async def set_registry_state_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4512,7 +3589,8 @@ def _set_registry_state_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -4529,6 +3607,7 @@ def _set_registry_state_serialize( _path_params["rev_reg_id"] = rev_reg_id # process the query parameters if state is not None: + _query_params.append(("state", state)) # process the header parameters @@ -4584,26 +3663,7 @@ async def update_registry( :type rev_reg_id: str :param body: :type body: RevRegUpdateTailsFileUri - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._update_registry_serialize( @@ -4615,7 +3675,9 @@ async def update_registry( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4650,26 +3712,7 @@ async def update_registry_with_http_info( :type rev_reg_id: str :param body: :type body: RevRegUpdateTailsFileUri - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._update_registry_serialize( @@ -4681,7 +3724,9 @@ async def update_registry_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4716,26 +3761,7 @@ async def update_registry_without_preload_content( :type rev_reg_id: str :param body: :type body: RevRegUpdateTailsFileUri - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._update_registry_serialize( @@ -4747,7 +3773,9 @@ async def update_registry_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "RevRegResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "RevRegResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4761,7 +3789,8 @@ def _update_registry_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -4839,26 +3868,7 @@ async def upload_tails_file( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._upload_tails_file_serialize( @@ -4869,7 +3879,9 @@ async def upload_tails_file( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4901,26 +3913,7 @@ async def upload_tails_file_with_http_info( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._upload_tails_file_serialize( @@ -4931,7 +3924,9 @@ async def upload_tails_file_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -4963,26 +3958,7 @@ async def upload_tails_file_without_preload_content( :param rev_reg_id: Revocation Registry identifier (required) :type rev_reg_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._upload_tails_file_serialize( @@ -4993,7 +3969,9 @@ async def upload_tails_file_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -5006,7 +3984,8 @@ def _upload_tails_file_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/schema_api.py b/aries_cloudcontroller/api/schema_api.py index a5c1ef90..21635bcc 100644 --- a/aries_cloudcontroller/api/schema_api.py +++ b/aries_cloudcontroller/api/schema_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.schema_get_result import SchemaGetResult from aries_cloudcontroller.models.schema_send_request import SchemaSendRequest @@ -88,26 +78,7 @@ async def get_created_schemas( :type schema_name: str :param schema_version: Schema version :type schema_version: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_schemas_serialize( @@ -121,7 +92,9 @@ async def get_created_schemas( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemasCreatedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemasCreatedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -171,26 +144,7 @@ async def get_created_schemas_with_http_info( :type schema_name: str :param schema_version: Schema version :type schema_version: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_schemas_serialize( @@ -204,7 +158,9 @@ async def get_created_schemas_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemasCreatedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemasCreatedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -254,26 +210,7 @@ async def get_created_schemas_without_preload_content( :type schema_name: str :param schema_version: Schema version :type schema_version: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_created_schemas_serialize( @@ -287,7 +224,9 @@ async def get_created_schemas_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemasCreatedResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemasCreatedResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -303,7 +242,8 @@ def _get_created_schemas_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -318,15 +258,19 @@ def _get_created_schemas_serialize( # process the path parameters # process the query parameters if schema_id is not None: + _query_params.append(("schema_id", schema_id)) if schema_issuer_did is not None: + _query_params.append(("schema_issuer_did", schema_issuer_did)) if schema_name is not None: + _query_params.append(("schema_name", schema_name)) if schema_version is not None: + _query_params.append(("schema_version", schema_version)) # process the header parameters @@ -377,26 +321,7 @@ async def get_schema( :param schema_id: Schema identifier (required) :type schema_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_schema_serialize( @@ -407,7 +332,9 @@ async def get_schema( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemaGetResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemaGetResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -437,26 +364,7 @@ async def get_schema_with_http_info( :param schema_id: Schema identifier (required) :type schema_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_schema_serialize( @@ -467,7 +375,9 @@ async def get_schema_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemaGetResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemaGetResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -497,26 +407,7 @@ async def get_schema_without_preload_content( :param schema_id: Schema identifier (required) :type schema_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_schema_serialize( @@ -527,7 +418,9 @@ async def get_schema_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemaGetResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemaGetResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -540,7 +433,8 @@ def _get_schema_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -615,26 +509,7 @@ async def publish_schema( :type create_transaction_for_endorser: bool :param body: :type body: SchemaSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_schema_serialize( @@ -647,7 +522,9 @@ async def publish_schema( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TxnOrSchemaSendResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TxnOrSchemaSendResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -688,26 +565,7 @@ async def publish_schema_with_http_info( :type create_transaction_for_endorser: bool :param body: :type body: SchemaSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_schema_serialize( @@ -720,7 +578,9 @@ async def publish_schema_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TxnOrSchemaSendResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TxnOrSchemaSendResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -761,26 +621,7 @@ async def publish_schema_without_preload_content( :type create_transaction_for_endorser: bool :param body: :type body: SchemaSendRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._publish_schema_serialize( @@ -793,7 +634,9 @@ async def publish_schema_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "TxnOrSchemaSendResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "TxnOrSchemaSendResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -808,7 +651,8 @@ def _publish_schema_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -823,9 +667,11 @@ def _publish_schema_serialize( # process the path parameters # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) @@ -890,26 +736,7 @@ async def write_record( :param schema_id: Schema identifier (required) :type schema_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._write_record_serialize( @@ -920,7 +747,9 @@ async def write_record( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemaGetResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemaGetResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -950,26 +779,7 @@ async def write_record_with_http_info( :param schema_id: Schema identifier (required) :type schema_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._write_record_serialize( @@ -980,7 +790,9 @@ async def write_record_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemaGetResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemaGetResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1010,26 +822,7 @@ async def write_record_without_preload_content( :param schema_id: Schema identifier (required) :type schema_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._write_record_serialize( @@ -1040,7 +833,9 @@ async def write_record_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SchemaGetResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SchemaGetResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1053,7 +848,8 @@ def _write_record_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/server_api.py b/aries_cloudcontroller/api/server_api.py index f7b416c8..fc0f7270 100644 --- a/aries_cloudcontroller/api/server_api.py +++ b/aries_cloudcontroller/api/server_api.py @@ -11,19 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Union - -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.admin_config import AdminConfig from aries_cloudcontroller.models.admin_modules import AdminModules @@ -63,26 +56,7 @@ async def check_liveliness( """Liveliness check - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._check_liveliness_serialize( @@ -92,7 +66,9 @@ async def check_liveliness( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatusLiveliness"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatusLiveliness", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -119,26 +95,7 @@ async def check_liveliness_with_http_info( """Liveliness check - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._check_liveliness_serialize( @@ -148,7 +105,9 @@ async def check_liveliness_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatusLiveliness"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatusLiveliness", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -175,26 +134,7 @@ async def check_liveliness_without_preload_content( """Liveliness check - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._check_liveliness_serialize( @@ -204,7 +144,9 @@ async def check_liveliness_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatusLiveliness"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatusLiveliness", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -216,7 +158,8 @@ def _check_liveliness_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -275,26 +218,7 @@ async def get_config( """Fetch the server configuration - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_config_serialize( @@ -304,7 +228,9 @@ async def get_config( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminConfig"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminConfig", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -331,26 +257,7 @@ async def get_config_with_http_info( """Fetch the server configuration - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_config_serialize( @@ -360,7 +267,9 @@ async def get_config_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminConfig"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminConfig", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -387,26 +296,7 @@ async def get_config_without_preload_content( """Fetch the server configuration - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_config_serialize( @@ -416,7 +306,9 @@ async def get_config_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminConfig"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminConfig", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -428,7 +320,8 @@ def _get_config_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -487,26 +380,7 @@ async def get_plugins( """Fetch the list of loaded plugins - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_plugins_serialize( @@ -516,7 +390,9 @@ async def get_plugins( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminModules"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminModules", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -543,26 +419,7 @@ async def get_plugins_with_http_info( """Fetch the list of loaded plugins - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_plugins_serialize( @@ -572,7 +429,9 @@ async def get_plugins_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminModules"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminModules", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -599,26 +458,7 @@ async def get_plugins_without_preload_content( """Fetch the list of loaded plugins - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_plugins_serialize( @@ -628,7 +468,9 @@ async def get_plugins_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminModules"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminModules", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -640,7 +482,8 @@ def _get_plugins_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -699,26 +542,7 @@ async def get_ready_state( """Readiness check - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_ready_state_serialize( @@ -728,7 +552,9 @@ async def get_ready_state( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatusReadiness"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatusReadiness", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -755,26 +581,7 @@ async def get_ready_state_with_http_info( """Readiness check - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_ready_state_serialize( @@ -784,7 +591,9 @@ async def get_ready_state_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatusReadiness"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatusReadiness", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -811,26 +620,7 @@ async def get_ready_state_without_preload_content( """Readiness check - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_ready_state_serialize( @@ -840,7 +630,9 @@ async def get_ready_state_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatusReadiness"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatusReadiness", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -852,7 +644,8 @@ def _get_ready_state_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -911,26 +704,7 @@ async def get_status( """Fetch the server status - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_status_serialize( @@ -940,7 +714,9 @@ async def get_status( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatus"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatus", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -967,26 +743,7 @@ async def get_status_with_http_info( """Fetch the server status - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_status_serialize( @@ -996,7 +753,9 @@ async def get_status_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatus"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatus", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1023,26 +782,7 @@ async def get_status_without_preload_content( """Fetch the server status - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_status_serialize( @@ -1052,7 +792,9 @@ async def get_status_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "AdminStatus"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "AdminStatus", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1064,7 +806,8 @@ def _get_status_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1123,26 +866,7 @@ async def reset_statistics( """Reset statistics - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._reset_statistics_serialize( @@ -1152,7 +876,9 @@ async def reset_statistics( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1179,26 +905,7 @@ async def reset_statistics_with_http_info( """Reset statistics - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._reset_statistics_serialize( @@ -1208,7 +915,9 @@ async def reset_statistics_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1235,26 +944,7 @@ async def reset_statistics_without_preload_content( """Reset statistics - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._reset_statistics_serialize( @@ -1264,7 +954,9 @@ async def reset_statistics_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1276,7 +968,8 @@ def _reset_statistics_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1335,26 +1028,7 @@ async def shutdown_server( """Shut down server - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._shutdown_server_serialize( @@ -1364,7 +1038,9 @@ async def shutdown_server( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1391,26 +1067,7 @@ async def shutdown_server_with_http_info( """Shut down server - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._shutdown_server_serialize( @@ -1420,7 +1077,9 @@ async def shutdown_server_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1447,26 +1106,7 @@ async def shutdown_server_without_preload_content( """Shut down server - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._shutdown_server_serialize( @@ -1476,7 +1116,9 @@ async def shutdown_server_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1488,7 +1130,8 @@ def _shutdown_server_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/settings_api.py b/aries_cloudcontroller/api/settings_api.py index 7f7921c6..6c563ffd 100644 --- a/aries_cloudcontroller/api/settings_api.py +++ b/aries_cloudcontroller/api/settings_api.py @@ -11,19 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from typing_extensions import Annotated -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.profile_settings import ProfileSettings from aries_cloudcontroller.models.update_profile_settings import UpdateProfileSettings @@ -60,26 +53,7 @@ async def settings_get( """Get the configurable settings associated with the profile. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._settings_get_serialize( @@ -89,7 +63,9 @@ async def settings_get( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ProfileSettings"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProfileSettings", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -116,26 +92,7 @@ async def settings_get_with_http_info( """Get the configurable settings associated with the profile. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._settings_get_serialize( @@ -145,7 +102,9 @@ async def settings_get_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ProfileSettings"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProfileSettings", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -172,26 +131,7 @@ async def settings_get_without_preload_content( """Get the configurable settings associated with the profile. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._settings_get_serialize( @@ -201,7 +141,9 @@ async def settings_get_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ProfileSettings"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProfileSettings", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -213,7 +155,8 @@ def _settings_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -275,26 +218,7 @@ async def settings_put( :param body: :type body: UpdateProfileSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._settings_put_serialize( @@ -305,7 +229,9 @@ async def settings_put( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ProfileSettings"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProfileSettings", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -335,26 +261,7 @@ async def settings_put_with_http_info( :param body: :type body: UpdateProfileSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._settings_put_serialize( @@ -365,7 +272,9 @@ async def settings_put_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ProfileSettings"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProfileSettings", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -395,26 +304,7 @@ async def settings_put_without_preload_content( :param body: :type body: UpdateProfileSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._settings_put_serialize( @@ -425,7 +315,9 @@ async def settings_put_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "ProfileSettings"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "ProfileSettings", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -438,7 +330,8 @@ def _settings_put_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/trustping_api.py b/aries_cloudcontroller/api/trustping_api.py index 44b7b8d9..c327a1e5 100644 --- a/aries_cloudcontroller/api/trustping_api.py +++ b/aries_cloudcontroller/api/trustping_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Optional - -from pydantic import Field, StrictStr from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.ping_request import PingRequest from aries_cloudcontroller.models.ping_request_response import PingRequestResponse @@ -69,26 +59,7 @@ async def send_ping( :type conn_id: str :param body: :type body: PingRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_ping_serialize( @@ -100,7 +71,9 @@ async def send_ping( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "PingRequestResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "PingRequestResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -133,26 +106,7 @@ async def send_ping_with_http_info( :type conn_id: str :param body: :type body: PingRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_ping_serialize( @@ -164,7 +118,9 @@ async def send_ping_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "PingRequestResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "PingRequestResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -197,26 +153,7 @@ async def send_ping_without_preload_content( :type conn_id: str :param body: :type body: PingRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._send_ping_serialize( @@ -228,7 +165,9 @@ async def send_ping_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "PingRequestResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "PingRequestResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -242,7 +181,8 @@ def _send_ping_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api/wallet_api.py b/aries_cloudcontroller/api/wallet_api.py index 5793df04..dc18a265 100644 --- a/aries_cloudcontroller/api/wallet_api.py +++ b/aries_cloudcontroller/api/wallet_api.py @@ -11,22 +11,12 @@ Do not edit the class manually. """ # noqa: E501 - from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from typing import Any, Dict, Optional, Union - -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from aries_cloudcontroller.api_client import ApiClient +from aries_cloudcontroller.api_client import ApiClient, RequestSerialized from aries_cloudcontroller.api_response import ApiResponse from aries_cloudcontroller.models.did_create import DIDCreate from aries_cloudcontroller.models.did_endpoint import DIDEndpoint @@ -75,26 +65,7 @@ async def create_did( :param body: :type body: DIDCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_did_serialize( @@ -105,7 +76,9 @@ async def create_did( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -135,26 +108,7 @@ async def create_did_with_http_info( :param body: :type body: DIDCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_did_serialize( @@ -165,7 +119,9 @@ async def create_did_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -195,26 +151,7 @@ async def create_did_without_preload_content( :param body: :type body: DIDCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._create_did_serialize( @@ -225,7 +162,9 @@ async def create_did_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -238,7 +177,8 @@ def _create_did_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -312,26 +252,7 @@ async def get_did_endpoint( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_endpoint_serialize( @@ -342,7 +263,9 @@ async def get_did_endpoint( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDEndpoint"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDEndpoint", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -372,26 +295,7 @@ async def get_did_endpoint_with_http_info( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_endpoint_serialize( @@ -402,7 +306,9 @@ async def get_did_endpoint_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDEndpoint"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDEndpoint", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -432,26 +338,7 @@ async def get_did_endpoint_without_preload_content( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_did_endpoint_serialize( @@ -462,7 +349,9 @@ async def get_did_endpoint_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDEndpoint"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDEndpoint", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -475,7 +364,8 @@ def _get_did_endpoint_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -490,6 +380,7 @@ def _get_did_endpoint_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) # process the header parameters @@ -570,26 +461,7 @@ async def get_dids( :type posture: str :param verkey: Verification key of interest :type verkey: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_dids_serialize( @@ -604,7 +476,9 @@ async def get_dids( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -664,26 +538,7 @@ async def get_dids_with_http_info( :type posture: str :param verkey: Verification key of interest :type verkey: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_dids_serialize( @@ -698,7 +553,9 @@ async def get_dids_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -758,26 +615,7 @@ async def get_dids_without_preload_content( :type posture: str :param verkey: Verification key of interest :type verkey: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_dids_serialize( @@ -792,7 +630,9 @@ async def get_dids_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDList"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDList", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -809,7 +649,8 @@ def _get_dids_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -824,18 +665,23 @@ def _get_dids_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) if key_type is not None: + _query_params.append(("key_type", key_type)) if method is not None: + _query_params.append(("method", method)) if posture is not None: + _query_params.append(("posture", posture)) if verkey is not None: + _query_params.append(("verkey", verkey)) # process the header parameters @@ -883,26 +729,7 @@ async def get_public_did( """Fetch the current public DID - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_public_did_serialize( @@ -912,7 +739,9 @@ async def get_public_did( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -939,26 +768,7 @@ async def get_public_did_with_http_info( """Fetch the current public DID - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_public_did_serialize( @@ -968,7 +778,9 @@ async def get_public_did_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -995,26 +807,7 @@ async def get_public_did_without_preload_content( """Fetch the current public DID - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._get_public_did_serialize( @@ -1024,7 +817,9 @@ async def get_public_did_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1036,7 +831,8 @@ def _get_public_did_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1098,26 +894,7 @@ async def rotate_keypair( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._rotate_keypair_serialize( @@ -1128,7 +905,9 @@ async def rotate_keypair( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1158,26 +937,7 @@ async def rotate_keypair_with_http_info( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._rotate_keypair_serialize( @@ -1188,7 +948,9 @@ async def rotate_keypair_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1218,26 +980,7 @@ async def rotate_keypair_without_preload_content( :param did: DID of interest (required) :type did: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._rotate_keypair_serialize( @@ -1248,7 +991,9 @@ async def rotate_keypair_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1261,7 +1006,8 @@ def _rotate_keypair_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1276,6 +1022,7 @@ def _rotate_keypair_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) # process the header parameters @@ -1337,26 +1084,7 @@ async def set_did_endpoint( :type create_transaction_for_endorser: bool :param body: :type body: DIDEndpointWithType - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_did_endpoint_serialize( @@ -1369,7 +1097,9 @@ async def set_did_endpoint( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1410,26 +1140,7 @@ async def set_did_endpoint_with_http_info( :type create_transaction_for_endorser: bool :param body: :type body: DIDEndpointWithType - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_did_endpoint_serialize( @@ -1442,7 +1153,9 @@ async def set_did_endpoint_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1483,26 +1196,7 @@ async def set_did_endpoint_without_preload_content( :type create_transaction_for_endorser: bool :param body: :type body: DIDEndpointWithType - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_did_endpoint_serialize( @@ -1515,7 +1209,9 @@ async def set_did_endpoint_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1530,7 +1226,8 @@ def _set_did_endpoint_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1545,9 +1242,11 @@ def _set_did_endpoint_serialize( # process the path parameters # process the query parameters if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) @@ -1628,26 +1327,7 @@ async def set_public_did( :type create_transaction_for_endorser: bool :param mediation_id: Mediation identifier :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_public_did_serialize( @@ -1661,7 +1341,9 @@ async def set_public_did( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1707,26 +1389,7 @@ async def set_public_did_with_http_info( :type create_transaction_for_endorser: bool :param mediation_id: Mediation identifier :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_public_did_serialize( @@ -1740,7 +1403,9 @@ async def set_public_did_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1786,26 +1451,7 @@ async def set_public_did_without_preload_content( :type create_transaction_for_endorser: bool :param mediation_id: Mediation identifier :type mediation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._set_public_did_serialize( @@ -1819,7 +1465,9 @@ async def set_public_did_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "DIDResult"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "DIDResult", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1835,7 +1483,8 @@ def _set_public_did_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -1850,17 +1499,21 @@ def _set_public_did_serialize( # process the path parameters # process the query parameters if did is not None: + _query_params.append(("did", did)) if conn_id is not None: + _query_params.append(("conn_id", conn_id)) if create_transaction_for_endorser is not None: + _query_params.append( ("create_transaction_for_endorser", create_transaction_for_endorser) ) if mediation_id is not None: + _query_params.append(("mediation_id", mediation_id)) # process the header parameters @@ -1911,26 +1564,7 @@ async def wallet_jwt_sign_post( :param body: :type body: JWSCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_jwt_sign_post_serialize( @@ -1941,7 +1575,9 @@ async def wallet_jwt_sign_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -1971,26 +1607,7 @@ async def wallet_jwt_sign_post_with_http_info( :param body: :type body: JWSCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_jwt_sign_post_serialize( @@ -2001,7 +1618,9 @@ async def wallet_jwt_sign_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2031,26 +1650,7 @@ async def wallet_jwt_sign_post_without_preload_content( :param body: :type body: JWSCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_jwt_sign_post_serialize( @@ -2061,7 +1661,9 @@ async def wallet_jwt_sign_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2074,7 +1676,8 @@ def _wallet_jwt_sign_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2148,26 +1751,7 @@ async def wallet_jwt_verify_post( :param body: :type body: JWSVerify - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_jwt_verify_post_serialize( @@ -2178,7 +1762,9 @@ async def wallet_jwt_verify_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "JWSVerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "JWSVerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2208,26 +1794,7 @@ async def wallet_jwt_verify_post_with_http_info( :param body: :type body: JWSVerify - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_jwt_verify_post_serialize( @@ -2238,7 +1805,9 @@ async def wallet_jwt_verify_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "JWSVerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "JWSVerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2268,26 +1837,7 @@ async def wallet_jwt_verify_post_without_preload_content( :param body: :type body: JWSVerify - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_jwt_verify_post_serialize( @@ -2298,7 +1848,9 @@ async def wallet_jwt_verify_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "JWSVerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "JWSVerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2311,7 +1863,8 @@ def _wallet_jwt_verify_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2385,26 +1938,7 @@ async def wallet_sd_jwt_sign_post( :param body: :type body: SDJWSCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_sd_jwt_sign_post_serialize( @@ -2415,7 +1949,9 @@ async def wallet_sd_jwt_sign_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2445,26 +1981,7 @@ async def wallet_sd_jwt_sign_post_with_http_info( :param body: :type body: SDJWSCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_sd_jwt_sign_post_serialize( @@ -2475,7 +1992,9 @@ async def wallet_sd_jwt_sign_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2505,26 +2024,7 @@ async def wallet_sd_jwt_sign_post_without_preload_content( :param body: :type body: SDJWSCreate - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_sd_jwt_sign_post_serialize( @@ -2535,7 +2035,9 @@ async def wallet_sd_jwt_sign_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "object"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2548,7 +2050,8 @@ def _wallet_sd_jwt_sign_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} @@ -2622,26 +2125,7 @@ async def wallet_sd_jwt_verify_post( :param body: :type body: SDJWSVerify - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_sd_jwt_verify_post_serialize( @@ -2652,7 +2136,9 @@ async def wallet_sd_jwt_verify_post( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SDJWSVerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SDJWSVerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2682,26 +2168,7 @@ async def wallet_sd_jwt_verify_post_with_http_info( :param body: :type body: SDJWSVerify - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_sd_jwt_verify_post_serialize( @@ -2712,7 +2179,9 @@ async def wallet_sd_jwt_verify_post_with_http_info( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SDJWSVerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SDJWSVerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2742,26 +2211,7 @@ async def wallet_sd_jwt_verify_post_without_preload_content( :param body: :type body: SDJWSVerify - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. + ... """ # noqa: E501 _param = self._wallet_sd_jwt_verify_post_serialize( @@ -2772,7 +2222,9 @@ async def wallet_sd_jwt_verify_post_without_preload_content( _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = {"200": "SDJWSVerifyResponse"} + _response_types_map: Dict[str, Optional[str]] = { + "200": "SDJWSVerifyResponse", + } response_data = await self.api_client.call_api( *_param, _request_timeout=_request_timeout ) @@ -2785,7 +2237,8 @@ def _wallet_sd_jwt_verify_post_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = {} diff --git a/aries_cloudcontroller/api_client.py b/aries_cloudcontroller/api_client.py index 0dafda12..2d594c0b 100644 --- a/aries_cloudcontroller/api_client.py +++ b/aries_cloudcontroller/api_client.py @@ -18,7 +18,8 @@ import os import re import tempfile -from typing import List, Optional, Tuple +from enum import Enum +from typing import Dict, List, Optional, Tuple from urllib.parse import quote from dateutil.parser import parse @@ -26,16 +27,11 @@ import aries_cloudcontroller.models from aries_cloudcontroller import rest from aries_cloudcontroller.api_response import ApiResponse +from aries_cloudcontroller.api_response import T as ApiResponseT from aries_cloudcontroller.configuration import Configuration -from aries_cloudcontroller.exceptions import ( - ApiException, - ApiValueError, - BadRequestException, - ForbiddenException, - NotFoundException, - ServiceException, - UnauthorizedException, -) +from aries_cloudcontroller.exceptions import ApiException, ApiValueError + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] class ApiClient: @@ -145,7 +141,7 @@ def param_serialize( collection_formats=None, _host=None, _request_auth=None, - ) -> Tuple: + ) -> RequestSerialized: """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -222,9 +218,7 @@ def param_serialize( # query parameters if query_params: - query_params = self.sanitize_for_serialization( - query_params, query_params=True - ) + query_params = self.sanitize_for_serialization(query_params) url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query @@ -263,21 +257,24 @@ async def call_api( ) except ApiException as e: - if e.body: - e.body = e.body.decode("utf-8") raise e return response_data def response_deserialize( - self, response_data=None, response_types_map=None - ) -> ApiResponse: + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]] = None, + ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. :param response_types_map: dict of response types. :return: ApiResponse """ + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + response_type = response_types_map.get(str(response_data.status), None) if ( not response_type @@ -289,39 +286,29 @@ def response_deserialize( str(response_data.status)[0] + "XX", None ) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader("content-type") - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader("content-type") + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code=response_data.status, @@ -330,7 +317,7 @@ def response_deserialize( raw_data=response_data.data, ) - def sanitize_for_serialization(self, obj, query_params=False): + def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. @@ -342,31 +329,20 @@ def sanitize_for_serialization(self, obj, query_params=False): If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. - :param query_params: If these are query params or not :return: The serialized form of data. """ - if query_params and isinstance(obj, bool): - # Custom conversion: convert boolean query parameters to their string equivalents - return str(obj).lower() - if obj is None: return None elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj, query_params=query_params) - for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj, query_params=query_params) - for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - if isinstance(obj, dict): + elif isinstance(obj, dict): obj_dict = obj else: # Convert model obj to dict except @@ -377,8 +353,7 @@ def sanitize_for_serialization(self, obj, query_params=False): obj_dict = obj.to_dict() return { - key: self.sanitize_for_serialization(val, query_params=query_params) - for key, val in obj_dict.items() + key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() } def deserialize(self, response_text, response_type): @@ -412,11 +387,15 @@ def __deserialize(self, data, klass): if isinstance(klass, str): if klass.startswith("List["): - sub_kls = re.match(r"List\[(.*)]", klass).group(1) + m = re.match(r"List\[(.*)]", klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith("Dict["): - sub_kls = re.match(r"Dict\[([^,]*), (.*)]", klass).group(2) + m = re.match(r"Dict\[([^,]*), (.*)]", klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class @@ -433,6 +412,8 @@ def __deserialize(self, data, klass): return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) @@ -443,7 +424,7 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -472,7 +453,7 @@ def parameters_to_url_query(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: URL query string (e.g. a=Hello%20World&b=123) """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -486,7 +467,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, value) for value in v) + new_params.extend((k, str(value)) for value in v) else: if collection_format == "ssv": delimiter = " " @@ -502,7 +483,7 @@ def parameters_to_url_query(self, params, collection_formats): else: new_params.append((k, quote(str(v)))) - return "&".join(["=".join(item) for item in new_params]) + return "&".join(["=".join(map(str, item)) for item in new_params]) def files_parameters(self, files=None): """Builds form parameters. @@ -637,9 +618,9 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -702,6 +683,20 @@ def __deserialize_datetime(self, string): reason=("Failed to parse `{0}` as datetime object".format(string)), ) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) + ) + def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/aries_cloudcontroller/api_response.py b/aries_cloudcontroller/api_response.py index a11e8575..ca801da0 100644 --- a/aries_cloudcontroller/api_response.py +++ b/aries_cloudcontroller/api_response.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import Dict, Generic, Optional, TypeVar +from typing import Generic, Mapping, Optional, TypeVar -from pydantic import BaseModel, Field, StrictBytes, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBytes, StrictInt T = TypeVar("T") @@ -15,9 +15,7 @@ class ApiResponse(BaseModel, Generic[T]): """ status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field( - None, description="HTTP headers" - ) + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") diff --git a/aries_cloudcontroller/configuration.py b/aries_cloudcontroller/configuration.py index 4dc53299..10bbf133 100644 --- a/aries_cloudcontroller/configuration.py +++ b/aries_cloudcontroller/configuration.py @@ -16,6 +16,8 @@ import http.client as httplib import logging import sys +from logging import FileHandler +from typing import Optional import urllib3 @@ -147,7 +149,7 @@ def __init__( self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None @@ -184,7 +186,7 @@ def __init__( Default values is 100, None means no-limit. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ self.proxy_headers = None diff --git a/aries_cloudcontroller/exceptions.py b/aries_cloudcontroller/exceptions.py index 426d9102..3e6149a6 100644 --- a/aries_cloudcontroller/exceptions.py +++ b/aries_cloudcontroller/exceptions.py @@ -11,6 +11,10 @@ Do not edit the class manually. """ # noqa: E501 +from typing import Any, Optional + +from typing_extensions import Self + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -101,17 +105,57 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode("utf-8") + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode("utf-8") + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(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) def __str__(self): """Custom error messages for exception""" @@ -119,35 +163,30 @@ def __str__(self): if self.headers: error_message += "HTTP response headers: {0}\n".format(self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message class BadRequestException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) + pass class NotFoundException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/aries_cloudcontroller/models/action_menu_fetch_result.py b/aries_cloudcontroller/models/action_menu_fetch_result.py index 1df92d94..6ab18621 100644 --- a/aries_cloudcontroller/models/action_menu_fetch_result.py +++ b/aries_cloudcontroller/models/action_menu_fetch_result.py @@ -16,25 +16,21 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.menu import Menu from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ActionMenuFetchResult(BaseModel): """ ActionMenuFetchResult """ # noqa: E501 - result: Optional[Menu] = None + result: Optional[Menu] = Field(default=None, description="Action menu") __properties: ClassVar[List[str]] = ["result"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ActionMenuFetchResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ActionMenuFetchResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "result": ( - Menu.from_dict(obj.get("result")) + Menu.from_dict(obj["result"]) if obj.get("result") is not None else None ) diff --git a/aries_cloudcontroller/models/admin_config.py b/aries_cloudcontroller/models/admin_config.py index 8d25a6ee..7d785798 100644 --- a/aries_cloudcontroller/models/admin_config.py +++ b/aries_cloudcontroller/models/admin_config.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AdminConfig(BaseModel): """ AdminConfig """ # noqa: E501 - config: Optional[Union[str, Any]] = Field( + config: Optional[Dict[str, Any]] = Field( default=None, description="Configuration settings" ) __properties: ClassVar[List[str]] = ["config"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AdminConfig from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AdminConfig from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/admin_modules.py b/aries_cloudcontroller/models/admin_modules.py index d1502b98..8d350026 100644 --- a/aries_cloudcontroller/models/admin_modules.py +++ b/aries_cloudcontroller/models/admin_modules.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AdminModules(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AdminModules from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AdminModules from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/admin_status.py b/aries_cloudcontroller/models/admin_status.py index 95f3ead5..6c020be9 100644 --- a/aries_cloudcontroller/models/admin_status.py +++ b/aries_cloudcontroller/models/admin_status.py @@ -16,30 +16,24 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AdminStatus(BaseModel): """ AdminStatus """ # noqa: E501 - conductor: Optional[Union[str, Any]] = Field( + conductor: Optional[Dict[str, Any]] = Field( default=None, description="Conductor statistics" ) label: Optional[StrictStr] = Field(default=None, description="Default label") - timing: Optional[Union[str, Any]] = Field( - default=None, description="Timing results" - ) + timing: Optional[Dict[str, Any]] = Field(default=None, description="Timing results") version: Optional[StrictStr] = Field(default=None, description="Version code") __properties: ClassVar[List[str]] = ["conductor", "label", "timing", "version"] @@ -54,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AdminStatus from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,9 +62,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if label (nullable) is None @@ -81,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AdminStatus from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/admin_status_liveliness.py b/aries_cloudcontroller/models/admin_status_liveliness.py index 952eca44..bccc04d7 100644 --- a/aries_cloudcontroller/models/admin_status_liveliness.py +++ b/aries_cloudcontroller/models/admin_status_liveliness.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AdminStatusLiveliness(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AdminStatusLiveliness from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AdminStatusLiveliness from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/admin_status_readiness.py b/aries_cloudcontroller/models/admin_status_readiness.py index d948424c..1f7392df 100644 --- a/aries_cloudcontroller/models/admin_status_readiness.py +++ b/aries_cloudcontroller/models/admin_status_readiness.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AdminStatusReadiness(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AdminStatusReadiness from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AdminStatusReadiness from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/aml_record.py b/aries_cloudcontroller/models/aml_record.py index 53f1f901..2cba9771 100644 --- a/aries_cloudcontroller/models/aml_record.py +++ b/aries_cloudcontroller/models/aml_record.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AMLRecord(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AMLRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AMLRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/attach_decorator.py b/aries_cloudcontroller/models/attach_decorator.py index 68e4f74d..43c7e03e 100644 --- a/aries_cloudcontroller/models/attach_decorator.py +++ b/aries_cloudcontroller/models/attach_decorator.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.attach_decorator_data import AttachDecoratorData from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttachDecorator(BaseModel): """ @@ -90,7 +85,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttachDecorator from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -104,9 +99,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data @@ -115,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttachDecorator from a dict""" if obj is None: return None @@ -128,7 +125,7 @@ def from_dict(cls, obj: Dict) -> Self: "@id": obj.get("@id"), "byte_count": obj.get("byte_count"), "data": ( - AttachDecoratorData.from_dict(obj.get("data")) + AttachDecoratorData.from_dict(obj["data"]) if obj.get("data") is not None else None ), diff --git a/aries_cloudcontroller/models/attach_decorator_data.py b/aries_cloudcontroller/models/attach_decorator_data.py index f51d781a..3ab18433 100644 --- a/aries_cloudcontroller/models/attach_decorator_data.py +++ b/aries_cloudcontroller/models/attach_decorator_data.py @@ -17,21 +17,16 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.attach_decorator_data_jws import ( AttachDecoratorDataJWS, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttachDecoratorData(BaseModel): """ @@ -44,7 +39,9 @@ class AttachDecoratorData(BaseModel): var_json: Optional[Union[Dict[str, Any], List[Dict[str, Any]]]] = Field( default=None, description="JSON-serialized data", alias="json" ) - jws: Optional[AttachDecoratorDataJWS] = None + jws: Optional[AttachDecoratorDataJWS] = Field( + default=None, description="Detached Java Web Signature" + ) links: Optional[List[StrictStr]] = Field( default=None, description="List of hypertext links to data" ) @@ -88,7 +85,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttachDecoratorData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -102,9 +99,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of jws @@ -113,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttachDecoratorData from a dict""" if obj is None: return None @@ -126,7 +125,7 @@ def from_dict(cls, obj: Dict) -> Self: "base64": obj.get("base64"), "json": obj.get("json"), "jws": ( - AttachDecoratorDataJWS.from_dict(obj.get("jws")) + AttachDecoratorDataJWS.from_dict(obj["jws"]) if obj.get("jws") is not None else None ), diff --git a/aries_cloudcontroller/models/attach_decorator_data1_jws.py b/aries_cloudcontroller/models/attach_decorator_data1_jws.py index 1b52e814..ff43787d 100644 --- a/aries_cloudcontroller/models/attach_decorator_data1_jws.py +++ b/aries_cloudcontroller/models/attach_decorator_data1_jws.py @@ -17,21 +17,16 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.attach_decorator_data_jws_header import ( AttachDecoratorDataJWSHeader, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttachDecoratorData1JWS(BaseModel): """ @@ -73,7 +68,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttachDecoratorData1JWS from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,9 +82,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of header @@ -98,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttachDecoratorData1JWS from a dict""" if obj is None: return None @@ -109,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "header": ( - AttachDecoratorDataJWSHeader.from_dict(obj.get("header")) + AttachDecoratorDataJWSHeader.from_dict(obj["header"]) if obj.get("header") is not None else None ), diff --git a/aries_cloudcontroller/models/attach_decorator_data_jws.py b/aries_cloudcontroller/models/attach_decorator_data_jws.py index a6a3055c..a635bf96 100644 --- a/aries_cloudcontroller/models/attach_decorator_data_jws.py +++ b/aries_cloudcontroller/models/attach_decorator_data_jws.py @@ -17,10 +17,10 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.attach_decorator_data1_jws import ( AttachDecoratorData1JWS, @@ -30,11 +30,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttachDecoratorDataJWS(BaseModel): """ @@ -89,7 +84,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttachDecoratorDataJWS from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -103,9 +98,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of header @@ -121,7 +118,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttachDecoratorDataJWS from a dict""" if obj is None: return None @@ -132,7 +129,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "header": ( - AttachDecoratorDataJWSHeader.from_dict(obj.get("header")) + AttachDecoratorDataJWSHeader.from_dict(obj["header"]) if obj.get("header") is not None else None ), @@ -141,7 +138,7 @@ def from_dict(cls, obj: Dict) -> Self: "signatures": ( [ AttachDecoratorData1JWS.from_dict(_item) - for _item in obj.get("signatures") + for _item in obj["signatures"] ] if obj.get("signatures") is not None else None diff --git a/aries_cloudcontroller/models/attach_decorator_data_jws_header.py b/aries_cloudcontroller/models/attach_decorator_data_jws_header.py index 2c83201a..05d3bd6c 100644 --- a/aries_cloudcontroller/models/attach_decorator_data_jws_header.py +++ b/aries_cloudcontroller/models/attach_decorator_data_jws_header.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttachDecoratorDataJWSHeader(BaseModel): """ @@ -63,7 +58,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttachDecoratorDataJWSHeader from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,15 +72,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttachDecoratorDataJWSHeader from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/attachment_def.py b/aries_cloudcontroller/models/attachment_def.py index 7d107c96..6c314ca2 100644 --- a/aries_cloudcontroller/models/attachment_def.py +++ b/aries_cloudcontroller/models/attachment_def.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttachmentDef(BaseModel): """ @@ -43,7 +39,7 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in ("credential-offer", "present-proof"): + if value not in set(["credential-offer", "present-proof"]): raise ValueError( "must be one of enum values ('credential-offer', 'present-proof')" ) @@ -60,7 +56,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttachmentDef from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +70,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttachmentDef from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/attribute_mime_types_result.py b/aries_cloudcontroller/models/attribute_mime_types_result.py index 551c63c7..756e03f5 100644 --- a/aries_cloudcontroller/models/attribute_mime_types_result.py +++ b/aries_cloudcontroller/models/attribute_mime_types_result.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class AttributeMimeTypesResult(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AttributeMimeTypesResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,9 +57,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if results (nullable) is None @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AttributeMimeTypesResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/claim_format.py b/aries_cloudcontroller/models/claim_format.py index 4c506ff6..ff8458a9 100644 --- a/aries_cloudcontroller/models/claim_format.py +++ b/aries_cloudcontroller/models/claim_format.py @@ -16,29 +16,25 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ClaimFormat(BaseModel): """ ClaimFormat """ # noqa: E501 - jwt: Optional[Union[str, Any]] = None - jwt_vc: Optional[Union[str, Any]] = None - jwt_vp: Optional[Union[str, Any]] = None - ldp: Optional[Union[str, Any]] = None - ldp_vc: Optional[Union[str, Any]] = None - ldp_vp: Optional[Union[str, Any]] = None + jwt: Optional[Dict[str, Any]] = None + jwt_vc: Optional[Dict[str, Any]] = None + jwt_vp: Optional[Dict[str, Any]] = None + ldp: Optional[Dict[str, Any]] = None + ldp_vc: Optional[Dict[str, Any]] = None + ldp_vp: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = [ "jwt", "jwt_vc", @@ -59,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ClaimFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ClaimFormat from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/clear_pending_revocations_request.py b/aries_cloudcontroller/models/clear_pending_revocations_request.py index 4b68c0e1..0392ba87 100644 --- a/aries_cloudcontroller/models/clear_pending_revocations_request.py +++ b/aries_cloudcontroller/models/clear_pending_revocations_request.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ClearPendingRevocationsRequest(BaseModel): """ @@ -51,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ClearPendingRevocationsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ClearPendingRevocationsRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/configurable_write_ledgers.py b/aries_cloudcontroller/models/configurable_write_ledgers.py index f7c86626..65b6dd18 100644 --- a/aries_cloudcontroller/models/configurable_write_ledgers.py +++ b/aries_cloudcontroller/models/configurable_write_ledgers.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConfigurableWriteLedgers(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConfigurableWriteLedgers from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConfigurableWriteLedgers from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/conn_record.py b/aries_cloudcontroller/models/conn_record.py index b7824cf7..b64b2928 100644 --- a/aries_cloudcontroller/models/conn_record.py +++ b/aries_cloudcontroller/models/conn_record.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnRecord(BaseModel): """ @@ -116,7 +111,7 @@ def accept_validate_enum(cls, value): if value is None: return value - if value not in ("manual", "auto"): + if value not in set(["manual", "auto"]): raise ValueError("must be one of enum values ('manual', 'auto')") return value @@ -126,7 +121,7 @@ def connection_protocol_validate_enum(cls, value): if value is None: return value - if value not in ("connections/1.0", "didexchange/1.0"): + if value not in set(["connections/1.0", "didexchange/1.0"]): raise ValueError( "must be one of enum values ('connections/1.0', 'didexchange/1.0')" ) @@ -168,7 +163,7 @@ def invitation_mode_validate_enum(cls, value): if value is None: return value - if value not in ("once", "multi", "static"): + if value not in set(["once", "multi", "static"]): raise ValueError("must be one of enum values ('once', 'multi', 'static')") return value @@ -208,7 +203,7 @@ def their_role_validate_enum(cls, value): if value is None: return value - if value not in ("invitee", "requester", "inviter", "responder"): + if value not in set(["invitee", "requester", "inviter", "responder"]): raise ValueError( "must be one of enum values ('invitee', 'requester', 'inviter', 'responder')" ) @@ -240,7 +235,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -255,17 +250,21 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "rfc23_state", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "rfc23_state", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/connection_invitation.py b/aries_cloudcontroller/models/connection_invitation.py index 4b3d2bdb..471a97b9 100644 --- a/aries_cloudcontroller/models/connection_invitation.py +++ b/aries_cloudcontroller/models/connection_invitation.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnectionInvitation(BaseModel): """ @@ -100,7 +95,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnectionInvitation from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,11 +110,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if image_url (nullable) is None @@ -130,7 +129,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnectionInvitation from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/connection_list.py b/aries_cloudcontroller/models/connection_list.py index 6235f69e..c2d38b8b 100644 --- a/aries_cloudcontroller/models/connection_list.py +++ b/aries_cloudcontroller/models/connection_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.conn_record import ConnRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnectionList(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnectionList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnectionList from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [ConnRecord.from_dict(_item) for _item in obj.get("results")] + [ConnRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/connection_metadata.py b/aries_cloudcontroller/models/connection_metadata.py index a8b01d17..1985514d 100644 --- a/aries_cloudcontroller/models/connection_metadata.py +++ b/aries_cloudcontroller/models/connection_metadata.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnectionMetadata(BaseModel): """ ConnectionMetadata """ # noqa: E501 - results: Optional[Union[str, Any]] = Field( + results: Optional[Dict[str, Any]] = Field( default=None, description="Dictionary of metadata associated with connection." ) __properties: ClassVar[List[str]] = ["results"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnectionMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnectionMetadata from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/connection_metadata_set_request.py b/aries_cloudcontroller/models/connection_metadata_set_request.py index 8f56b996..194b5197 100644 --- a/aries_cloudcontroller/models/connection_metadata_set_request.py +++ b/aries_cloudcontroller/models/connection_metadata_set_request.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnectionMetadataSetRequest(BaseModel): """ ConnectionMetadataSetRequest """ # noqa: E501 - metadata: Union[str, Any] = Field( + metadata: Dict[str, Any] = Field( description="Dictionary of metadata to set for connection." ) __properties: ClassVar[List[str]] = ["metadata"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnectionMetadataSetRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnectionMetadataSetRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/connection_static_request.py b/aries_cloudcontroller/models/connection_static_request.py index a8af47c5..53dd4c73 100644 --- a/aries_cloudcontroller/models/connection_static_request.py +++ b/aries_cloudcontroller/models/connection_static_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnectionStaticRequest(BaseModel): """ @@ -126,7 +121,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnectionStaticRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -140,15 +135,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnectionStaticRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/connection_static_result.py b/aries_cloudcontroller/models/connection_static_result.py index 23cf1a39..087817f6 100644 --- a/aries_cloudcontroller/models/connection_static_result.py +++ b/aries_cloudcontroller/models/connection_static_result.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.conn_record import ConnRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ConnectionStaticResult(BaseModel): """ @@ -128,7 +123,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ConnectionStaticResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -142,9 +137,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of record @@ -153,7 +150,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ConnectionStaticResult from a dict""" if obj is None: return None @@ -167,7 +164,7 @@ def from_dict(cls, obj: Dict) -> Self: "my_endpoint": obj.get("my_endpoint"), "my_verkey": obj.get("my_verkey"), "record": ( - ConnRecord.from_dict(obj.get("record")) + ConnRecord.from_dict(obj["record"]) if obj.get("record") is not None else None ), diff --git a/aries_cloudcontroller/models/constraints.py b/aries_cloudcontroller/models/constraints.py index 85ed8b47..d437c156 100644 --- a/aries_cloudcontroller/models/constraints.py +++ b/aries_cloudcontroller/models/constraints.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.models.dif_field import DIFField from aries_cloudcontroller.models.dif_holder import DIFHolder from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Constraints(BaseModel): """ @@ -62,7 +58,7 @@ def status_active_validate_enum(cls, value): if value is None: return value - if value not in ("required", "allowed", "disallowed"): + if value not in set(["required", "allowed", "disallowed"]): raise ValueError( "must be one of enum values ('required', 'allowed', 'disallowed')" ) @@ -74,7 +70,7 @@ def status_revoked_validate_enum(cls, value): if value is None: return value - if value not in ("required", "allowed", "disallowed"): + if value not in set(["required", "allowed", "disallowed"]): raise ValueError( "must be one of enum values ('required', 'allowed', 'disallowed')" ) @@ -86,7 +82,7 @@ def status_suspended_validate_enum(cls, value): if value is None: return value - if value not in ("required", "allowed", "disallowed"): + if value not in set(["required", "allowed", "disallowed"]): raise ValueError( "must be one of enum values ('required', 'allowed', 'disallowed')" ) @@ -98,7 +94,7 @@ def subject_is_issuer_validate_enum(cls, value): if value is None: return value - if value not in ("required", "preferred"): + if value not in set(["required", "preferred"]): raise ValueError("must be one of enum values ('required', 'preferred')") return value @@ -113,7 +109,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Constraints from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -127,9 +123,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -149,7 +147,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Constraints from a dict""" if obj is None: return None @@ -160,12 +158,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "fields": ( - [DIFField.from_dict(_item) for _item in obj.get("fields")] + [DIFField.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None ), "is_holder": ( - [DIFHolder.from_dict(_item) for _item in obj.get("is_holder")] + [DIFHolder.from_dict(_item) for _item in obj["is_holder"]] if obj.get("is_holder") is not None else None ), diff --git a/aries_cloudcontroller/models/create_invitation_request.py b/aries_cloudcontroller/models/create_invitation_request.py index 9c527d8e..7ce5bbf8 100644 --- a/aries_cloudcontroller/models/create_invitation_request.py +++ b/aries_cloudcontroller/models/create_invitation_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CreateInvitationRequest(BaseModel): """ @@ -38,7 +33,7 @@ class CreateInvitationRequest(BaseModel): mediation_id: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Identifier for active mediation record to be used" ) - metadata: Optional[Union[str, Any]] = Field( + metadata: Optional[Dict[str, Any]] = Field( default=None, description="Optional metadata to attach to the connection created with the invitation", ) @@ -89,7 +84,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateInvitationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -103,15 +98,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateInvitationRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/create_wallet_request.py b/aries_cloudcontroller/models/create_wallet_request.py index 57c442f3..5bef5888 100644 --- a/aries_cloudcontroller/models/create_wallet_request.py +++ b/aries_cloudcontroller/models/create_wallet_request.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CreateWalletRequest(BaseModel): """ CreateWalletRequest """ # noqa: E501 - extra_settings: Optional[Union[str, Any]] = Field( + extra_settings: Optional[Dict[str, Any]] = Field( default=None, description="Agent config key-value pairs" ) image_url: Optional[StrictStr] = Field( @@ -83,7 +79,7 @@ def key_management_mode_validate_enum(cls, value): if value is None: return value - if value not in ("managed"): + if value not in set(["managed"]): raise ValueError("must be one of enum values ('managed')") return value @@ -93,7 +89,7 @@ def wallet_dispatch_type_validate_enum(cls, value): if value is None: return value - if value not in ("default", "both", "base"): + if value not in set(["default", "both", "base"]): raise ValueError("must be one of enum values ('default', 'both', 'base')") return value @@ -103,7 +99,7 @@ def wallet_key_derivation_validate_enum(cls, value): if value is None: return value - if value not in ("ARGON2I_MOD", "ARGON2I_INT", "RAW"): + if value not in set(["ARGON2I_MOD", "ARGON2I_INT", "RAW"]): raise ValueError( "must be one of enum values ('ARGON2I_MOD', 'ARGON2I_INT', 'RAW')" ) @@ -115,7 +111,7 @@ def wallet_type_validate_enum(cls, value): if value is None: return value - if value not in ("askar", "in_memory", "indy"): + if value not in set(["askar", "in_memory", "indy"]): raise ValueError( "must be one of enum values ('askar', 'in_memory', 'indy')" ) @@ -132,7 +128,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateWalletRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -146,15 +142,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateWalletRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/create_wallet_response.py b/aries_cloudcontroller/models/create_wallet_response.py index d574116e..9d14b495 100644 --- a/aries_cloudcontroller/models/create_wallet_response.py +++ b/aries_cloudcontroller/models/create_wallet_response.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CreateWalletResponse(BaseModel): """ @@ -41,7 +36,7 @@ class CreateWalletResponse(BaseModel): key_management_mode: StrictStr = Field( description="Mode regarding management of wallet key" ) - settings: Optional[Union[str, Any]] = Field( + settings: Optional[Dict[str, Any]] = Field( default=None, description="Settings for this wallet." ) state: Optional[StrictStr] = Field(default=None, description="Current record state") @@ -80,7 +75,7 @@ def created_at_validate_regular_expression(cls, value): @field_validator("key_management_mode") def key_management_mode_validate_enum(cls, value): """Validates the enum""" - if value not in ("managed", "unmanaged"): + if value not in set(["managed", "unmanaged"]): raise ValueError("must be one of enum values ('managed', 'unmanaged')") return value @@ -110,7 +105,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateWalletResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -124,15 +119,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateWalletResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/create_wallet_token_request.py b/aries_cloudcontroller/models/create_wallet_token_request.py index 0c7231bd..8034a3fe 100644 --- a/aries_cloudcontroller/models/create_wallet_token_request.py +++ b/aries_cloudcontroller/models/create_wallet_token_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CreateWalletTokenRequest(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateWalletTokenRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateWalletTokenRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/create_wallet_token_response.py b/aries_cloudcontroller/models/create_wallet_token_response.py index b49e53af..b41cfaea 100644 --- a/aries_cloudcontroller/models/create_wallet_token_response.py +++ b/aries_cloudcontroller/models/create_wallet_token_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CreateWalletTokenResponse(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateWalletTokenResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateWalletTokenResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/cred_attr_spec.py b/aries_cloudcontroller/models/cred_attr_spec.py index 3914cd9b..0c0d47ff 100644 --- a/aries_cloudcontroller/models/cred_attr_spec.py +++ b/aries_cloudcontroller/models/cred_attr_spec.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredAttrSpec(BaseModel): """ @@ -55,7 +51,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredAttrSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,9 +65,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if mime_type (nullable) is None @@ -82,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredAttrSpec from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/cred_def_value.py b/aries_cloudcontroller/models/cred_def_value.py index 1ce863c3..da1920d5 100644 --- a/aries_cloudcontroller/models/cred_def_value.py +++ b/aries_cloudcontroller/models/cred_def_value.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.cred_def_value_primary import CredDefValuePrimary from aries_cloudcontroller.models.cred_def_value_revocation import ( @@ -26,19 +27,18 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredDefValue(BaseModel): """ CredDefValue """ # noqa: E501 - primary: Optional[CredDefValuePrimary] = None - revocation: Optional[CredDefValueRevocation] = None + primary: Optional[CredDefValuePrimary] = Field( + default=None, description="Primary value for credential definition" + ) + revocation: Optional[CredDefValueRevocation] = Field( + default=None, description="Revocation value for credential definition" + ) __properties: ClassVar[List[str]] = ["primary", "revocation"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -52,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredDefValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,9 +66,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of primary @@ -80,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredDefValue from a dict""" if obj is None: return None @@ -91,12 +93,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "primary": ( - CredDefValuePrimary.from_dict(obj.get("primary")) + CredDefValuePrimary.from_dict(obj["primary"]) if obj.get("primary") is not None else None ), "revocation": ( - CredDefValueRevocation.from_dict(obj.get("revocation")) + CredDefValueRevocation.from_dict(obj["revocation"]) if obj.get("revocation") is not None else None ), diff --git a/aries_cloudcontroller/models/cred_def_value_primary.py b/aries_cloudcontroller/models/cred_def_value_primary.py index 32496448..3d73c28a 100644 --- a/aries_cloudcontroller/models/cred_def_value_primary.py +++ b/aries_cloudcontroller/models/cred_def_value_primary.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.generated import Generated from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredDefValuePrimary(BaseModel): """ @@ -94,7 +89,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredDefValuePrimary from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -108,9 +103,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of r @@ -119,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredDefValuePrimary from a dict""" if obj is None: return None @@ -131,9 +128,7 @@ def from_dict(cls, obj: Dict) -> Self: { "n": obj.get("n"), "r": ( - Generated.from_dict(obj.get("r")) - if obj.get("r") is not None - else None + Generated.from_dict(obj["r"]) if obj.get("r") is not None else None ), "rctxt": obj.get("rctxt"), "s": obj.get("s"), diff --git a/aries_cloudcontroller/models/cred_def_value_revocation.py b/aries_cloudcontroller/models/cred_def_value_revocation.py index 0fa33499..2bf6f79b 100644 --- a/aries_cloudcontroller/models/cred_def_value_revocation.py +++ b/aries_cloudcontroller/models/cred_def_value_revocation.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredDefValueRevocation(BaseModel): """ @@ -69,7 +65,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredDefValueRevocation from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,15 +79,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredDefValueRevocation from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/cred_info_list.py b/aries_cloudcontroller/models/cred_info_list.py index 04c1fd1a..99902ae7 100644 --- a/aries_cloudcontroller/models/cred_info_list.py +++ b/aries_cloudcontroller/models/cred_info_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.indy_cred_info import IndyCredInfo from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredInfoList(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredInfoList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredInfoList from a dict""" if obj is None: return None @@ -88,7 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [IndyCredInfo.from_dict(_item) for _item in obj.get("results")] + [IndyCredInfo.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/cred_rev_indy_records_result.py b/aries_cloudcontroller/models/cred_rev_indy_records_result.py index f248ba73..981880ff 100644 --- a/aries_cloudcontroller/models/cred_rev_indy_records_result.py +++ b/aries_cloudcontroller/models/cred_rev_indy_records_result.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredRevIndyRecordsResult(BaseModel): """ CredRevIndyRecordsResult """ # noqa: E501 - rev_reg_delta: Optional[Union[str, Any]] = Field( + rev_reg_delta: Optional[Dict[str, Any]] = Field( default=None, description="Indy revocation registry delta" ) __properties: ClassVar[List[str]] = ["rev_reg_delta"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredRevIndyRecordsResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredRevIndyRecordsResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/cred_rev_record_details_result.py b/aries_cloudcontroller/models/cred_rev_record_details_result.py index 1262ac9f..a7395297 100644 --- a/aries_cloudcontroller/models/cred_rev_record_details_result.py +++ b/aries_cloudcontroller/models/cred_rev_record_details_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.issuer_cred_rev_record import IssuerCredRevRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredRevRecordDetailsResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredRevRecordDetailsResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredRevRecordDetailsResult from a dict""" if obj is None: return None @@ -88,10 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [ - IssuerCredRevRecord.from_dict(_item) - for _item in obj.get("results") - ] + [IssuerCredRevRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/cred_rev_record_result.py b/aries_cloudcontroller/models/cred_rev_record_result.py index fb382a3a..daff66ac 100644 --- a/aries_cloudcontroller/models/cred_rev_record_result.py +++ b/aries_cloudcontroller/models/cred_rev_record_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.issuer_cred_rev_record import IssuerCredRevRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredRevRecordResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredRevRecordResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredRevRecordResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "result": ( - IssuerCredRevRecord.from_dict(obj.get("result")) + IssuerCredRevRecord.from_dict(obj["result"]) if obj.get("result") is not None else None ) diff --git a/aries_cloudcontroller/models/cred_revoked_result.py b/aries_cloudcontroller/models/cred_revoked_result.py index b5dad699..cbb355f1 100644 --- a/aries_cloudcontroller/models/cred_revoked_result.py +++ b/aries_cloudcontroller/models/cred_revoked_result.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredRevokedResult(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredRevokedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredRevokedResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/credential.py b/aries_cloudcontroller/models/credential.py index caf3fb07..d5833004 100644 --- a/aries_cloudcontroller/models/credential.py +++ b/aries_cloudcontroller/models/credential.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.linked_data_proof import LinkedDataProof from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Credential(BaseModel): """ @@ -39,7 +34,7 @@ class Credential(BaseModel): context: List[Union[str, Dict]] = Field( description="The JSON-LD context of the credential", alias="@context" ) - credential_subject: Union[str, Any] = Field(alias="credentialSubject") + credential_subject: Dict[str, Any] = Field(alias="credentialSubject") expiration_date: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="The expiration date", alias="expirationDate" ) @@ -50,7 +45,9 @@ class Credential(BaseModel): issuer: Union[str, Dict[str, Any]] = Field( description="The JSON-LD Verifiable Credential Issuer. Either string of object with id field." ) - proof: Optional[LinkedDataProof] = None + proof: Optional[LinkedDataProof] = Field( + default=None, description="The proof of the credential" + ) type: List[StrictStr] = Field(description="The JSON-LD type of the credential") __properties: ClassVar[List[str]] = [ "@context", @@ -113,7 +110,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Credential from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -127,9 +124,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of proof @@ -138,7 +137,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Credential from a dict""" if obj is None: return None @@ -155,7 +154,7 @@ def from_dict(cls, obj: Dict) -> Self: "issuanceDate": obj.get("issuanceDate"), "issuer": obj.get("issuer"), "proof": ( - LinkedDataProof.from_dict(obj.get("proof")) + LinkedDataProof.from_dict(obj["proof"]) if obj.get("proof") is not None else None ), diff --git a/aries_cloudcontroller/models/credential_definition.py b/aries_cloudcontroller/models/credential_definition.py index 8e3b4e27..56fe14a2 100644 --- a/aries_cloudcontroller/models/credential_definition.py +++ b/aries_cloudcontroller/models/credential_definition.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Literal, Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.cred_def_value import CredDefValue from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialDefinition(BaseModel): """ @@ -50,7 +45,9 @@ class CredentialDefinition(BaseModel): type: Optional[Literal["CL"]] = Field( default=None, description="Signature type: CL for Camenisch-Lysyanskaya" ) - value: Optional[CredDefValue] = None + value: Optional[CredDefValue] = Field( + default=None, description="Credential definition primary and revocation values" + ) ver: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Node protocol version" ) @@ -99,7 +96,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -113,9 +110,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of value @@ -124,7 +123,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialDefinition from a dict""" if obj is None: return None @@ -139,7 +138,7 @@ def from_dict(cls, obj: Dict) -> Self: "tag": obj.get("tag"), "type": obj.get("type"), "value": ( - CredDefValue.from_dict(obj.get("value")) + CredDefValue.from_dict(obj["value"]) if obj.get("value") is not None else None ), diff --git a/aries_cloudcontroller/models/credential_definition_get_result.py b/aries_cloudcontroller/models/credential_definition_get_result.py index 8f766867..dc9e7c4d 100644 --- a/aries_cloudcontroller/models/credential_definition_get_result.py +++ b/aries_cloudcontroller/models/credential_definition_get_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.credential_definition import CredentialDefinition from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialDefinitionGetResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialDefinitionGetResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_definition @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialDefinitionGetResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "credential_definition": ( - CredentialDefinition.from_dict(obj.get("credential_definition")) + CredentialDefinition.from_dict(obj["credential_definition"]) if obj.get("credential_definition") is not None else None ) diff --git a/aries_cloudcontroller/models/credential_definition_send_request.py b/aries_cloudcontroller/models/credential_definition_send_request.py index 8dd522db..03324fa1 100644 --- a/aries_cloudcontroller/models/credential_definition_send_request.py +++ b/aries_cloudcontroller/models/credential_definition_send_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialDefinitionSendRequest(BaseModel): """ @@ -80,7 +75,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialDefinitionSendRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -94,15 +89,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialDefinitionSendRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/credential_definition_send_result.py b/aries_cloudcontroller/models/credential_definition_send_result.py index 38103c96..7b604c00 100644 --- a/aries_cloudcontroller/models/credential_definition_send_result.py +++ b/aries_cloudcontroller/models/credential_definition_send_result.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialDefinitionSendResult(BaseModel): """ @@ -66,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialDefinitionSendResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,15 +75,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialDefinitionSendResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/credential_definitions_created_result.py b/aries_cloudcontroller/models/credential_definitions_created_result.py index d76029c4..e0e18b3a 100644 --- a/aries_cloudcontroller/models/credential_definitions_created_result.py +++ b/aries_cloudcontroller/models/credential_definitions_created_result.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialDefinitionsCreatedResult(BaseModel): """ @@ -48,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialDefinitionsCreatedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialDefinitionsCreatedResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/credential_offer.py b/aries_cloudcontroller/models/credential_offer.py index 1d2f0368..5757d8b6 100644 --- a/aries_cloudcontroller/models/credential_offer.py +++ b/aries_cloudcontroller/models/credential_offer.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialOffer(BaseModel): """ @@ -65,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialOffer from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,11 +76,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -105,7 +105,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialOffer from a dict""" if obj is None: return None @@ -119,15 +119,12 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "credential_preview": ( - CredentialPreview.from_dict(obj.get("credential_preview")) + CredentialPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "offers~attach": ( - [ - AttachDecorator.from_dict(_item) - for _item in obj.get("offers~attach") - ] + [AttachDecorator.from_dict(_item) for _item in obj["offers~attach"]] if obj.get("offers~attach") is not None else None ), diff --git a/aries_cloudcontroller/models/credential_preview.py b/aries_cloudcontroller/models/credential_preview.py index 37c0e494..a53d3d51 100644 --- a/aries_cloudcontroller/models/credential_preview.py +++ b/aries_cloudcontroller/models/credential_preview.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.cred_attr_spec import CredAttrSpec from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialPreview(BaseModel): """ @@ -51,7 +47,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialPreview from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,9 +61,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) @@ -80,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialPreview from a dict""" if obj is None: return None @@ -92,7 +90,7 @@ def from_dict(cls, obj: Dict) -> Self: { "@type": obj.get("@type"), "attributes": ( - [CredAttrSpec.from_dict(_item) for _item in obj.get("attributes")] + [CredAttrSpec.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None ), diff --git a/aries_cloudcontroller/models/credential_proposal.py b/aries_cloudcontroller/models/credential_proposal.py index 820a8635..feb97913 100644 --- a/aries_cloudcontroller/models/credential_proposal.py +++ b/aries_cloudcontroller/models/credential_proposal.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialProposal(BaseModel): """ @@ -146,7 +141,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -161,11 +156,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_proposal @@ -179,7 +178,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialProposal from a dict""" if obj is None: return None @@ -194,7 +193,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "cred_def_id": obj.get("cred_def_id"), "credential_proposal": ( - CredentialPreview.from_dict(obj.get("credential_proposal")) + CredentialPreview.from_dict(obj["credential_proposal"]) if obj.get("credential_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/credential_status_options.py b/aries_cloudcontroller/models/credential_status_options.py index f08cf6c3..18077af8 100644 --- a/aries_cloudcontroller/models/credential_status_options.py +++ b/aries_cloudcontroller/models/credential_status_options.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class CredentialStatusOptions(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CredentialStatusOptions from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CredentialStatusOptions from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/did.py b/aries_cloudcontroller/models/did.py index 3965d80c..143220d0 100644 --- a/aries_cloudcontroller/models/did.py +++ b/aries_cloudcontroller/models/did.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Literal, Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG from aries_cloudcontroller.util.regex_patterns import BBS_PATTERN, ED25519_PATTERN -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DID(BaseModel): """ @@ -81,7 +76,7 @@ def key_type_validate_enum(cls, value): if value is None: return value - if value not in ("ed25519", "bls12381g2"): + if value not in set(["ed25519", "bls12381g2"]): raise ValueError("must be one of enum values ('ed25519', 'bls12381g2')") return value @@ -91,7 +86,7 @@ def posture_validate_enum(cls, value): if value is None: return value - if value not in ("public", "posted", "wallet_only"): + if value not in set(["public", "posted", "wallet_only"]): raise ValueError( "must be one of enum values ('public', 'posted', 'wallet_only')" ) @@ -120,7 +115,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DID from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -134,15 +129,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DID from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/did_create.py b/aries_cloudcontroller/models/did_create.py index 54236e3d..94dc7a60 100644 --- a/aries_cloudcontroller/models/did_create.py +++ b/aries_cloudcontroller/models/did_create.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.did_create_options import DIDCreateOptions from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDCreate(BaseModel): """ @@ -38,7 +34,10 @@ class DIDCreate(BaseModel): default=None, description="Method for the requested DID.Supported methods are 'key', 'sov', and any other registered method.", ) - options: Optional[DIDCreateOptions] = None + options: Optional[DIDCreateOptions] = Field( + default=None, + description="To define a key type and/or a did depending on chosen DID method.", + ) seed: Optional[StrictStr] = Field( default=None, description="Optional seed to use for DID, Must be enabled in configuration before use.", @@ -56,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDCreate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,9 +69,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of options @@ -81,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDCreate from a dict""" if obj is None: return None @@ -93,7 +94,7 @@ def from_dict(cls, obj: Dict) -> Self: { "method": obj.get("method"), "options": ( - DIDCreateOptions.from_dict(obj.get("options")) + DIDCreateOptions.from_dict(obj["options"]) if obj.get("options") is not None else None ), diff --git a/aries_cloudcontroller/models/did_create_options.py b/aries_cloudcontroller/models/did_create_options.py index 2749521c..e991b0b7 100644 --- a/aries_cloudcontroller/models/did_create_options.py +++ b/aries_cloudcontroller/models/did_create_options.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDCreateOptions(BaseModel): """ @@ -62,7 +57,7 @@ def did_validate_regular_expression(cls, value): @field_validator("key_type") def key_type_validate_enum(cls, value): """Validates the enum""" - if value not in ("ed25519", "bls12381g2"): + if value not in set(["ed25519", "bls12381g2"]): raise ValueError("must be one of enum values ('ed25519', 'bls12381g2')") return value @@ -77,7 +72,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDCreateOptions from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -91,15 +86,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDCreateOptions from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/did_endpoint.py b/aries_cloudcontroller/models/did_endpoint.py index b9fab7f9..f187500c 100644 --- a/aries_cloudcontroller/models/did_endpoint.py +++ b/aries_cloudcontroller/models/did_endpoint.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDEndpoint(BaseModel): """ @@ -79,7 +74,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDEndpoint from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -93,15 +88,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDEndpoint from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/did_endpoint_with_type.py b/aries_cloudcontroller/models/did_endpoint_with_type.py index e8592e34..04024676 100644 --- a/aries_cloudcontroller/models/did_endpoint_with_type.py +++ b/aries_cloudcontroller/models/did_endpoint_with_type.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDEndpointWithType(BaseModel): """ @@ -78,7 +73,7 @@ def endpoint_type_validate_enum(cls, value): if value is None: return value - if value not in ("Endpoint", "Profile", "LinkedDomains"): + if value not in set(["Endpoint", "Profile", "LinkedDomains"]): raise ValueError( "must be one of enum values ('Endpoint', 'Profile', 'LinkedDomains')" ) @@ -95,7 +90,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDEndpointWithType from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -109,15 +104,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDEndpointWithType from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/did_list.py b/aries_cloudcontroller/models/did_list.py index 385dbc11..d1c89d69 100644 --- a/aries_cloudcontroller/models/did_list.py +++ b/aries_cloudcontroller/models/did_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.did import DID from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDList(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDList from a dict""" if obj is None: return None @@ -88,7 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [DID.from_dict(_item) for _item in obj.get("results")] + [DID.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/did_result.py b/aries_cloudcontroller/models/did_result.py index 439a7edc..74c6916a 100644 --- a/aries_cloudcontroller/models/did_result.py +++ b/aries_cloudcontroller/models/did_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.did import DID from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "result": ( - DID.from_dict(obj.get("result")) + DID.from_dict(obj["result"]) if obj.get("result") is not None else None ) diff --git a/aries_cloudcontroller/models/didx_reject_request.py b/aries_cloudcontroller/models/didx_reject_request.py index 6c5d90d6..370de6b2 100644 --- a/aries_cloudcontroller/models/didx_reject_request.py +++ b/aries_cloudcontroller/models/didx_reject_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDXRejectRequest(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDXRejectRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDXRejectRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/didx_request.py b/aries_cloudcontroller/models/didx_request.py index eb1057f7..1a795d96 100644 --- a/aries_cloudcontroller/models/didx_request.py +++ b/aries_cloudcontroller/models/didx_request.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIDXRequest(BaseModel): """ @@ -46,7 +41,9 @@ class DIDXRequest(BaseModel): default=None, description="DID of exchange" ) did_docattach: Optional[AttachDecorator] = Field( - default=None, alias="did_doc~attach" + default=None, + description="As signed attachment, DID Doc associated with DID", + alias="did_doc~attach", ) goal: Optional[StrictStr] = Field( default=None, @@ -93,7 +90,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIDXRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -108,11 +105,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of did_docattach @@ -121,7 +122,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIDXRequest from a dict""" if obj is None: return None @@ -135,7 +136,7 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "did": obj.get("did"), "did_doc~attach": ( - AttachDecorator.from_dict(obj.get("did_doc~attach")) + AttachDecorator.from_dict(obj["did_doc~attach"]) if obj.get("did_doc~attach") is not None else None ), diff --git a/aries_cloudcontroller/models/dif_field.py b/aries_cloudcontroller/models/dif_field.py index ee701c83..aa85959e 100644 --- a/aries_cloudcontroller/models/dif_field.py +++ b/aries_cloudcontroller/models/dif_field.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.models.filter import Filter from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIFField(BaseModel): """ @@ -47,7 +43,7 @@ def predicate_validate_enum(cls, value): if value is None: return value - if value not in ("required", "preferred"): + if value not in set(["required", "preferred"]): raise ValueError("must be one of enum values ('required', 'preferred')") return value @@ -62,7 +58,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIFField from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,9 +72,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of filter @@ -87,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIFField from a dict""" if obj is None: return None @@ -98,7 +96,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "filter": ( - Filter.from_dict(obj.get("filter")) + Filter.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/dif_holder.py b/aries_cloudcontroller/models/dif_holder.py index 4303750e..4a5de9e6 100644 --- a/aries_cloudcontroller/models/dif_holder.py +++ b/aries_cloudcontroller/models/dif_holder.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIFHolder(BaseModel): """ @@ -44,7 +39,7 @@ def directive_validate_enum(cls, value): if value is None: return value - if value not in ("required", "preferred"): + if value not in set(["required", "preferred"]): raise ValueError("must be one of enum values ('required', 'preferred')") return value @@ -59,7 +54,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIFHolder from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,15 +68,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIFHolder from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/dif_options.py b/aries_cloudcontroller/models/dif_options.py index 35ea41c1..5ca822e2 100644 --- a/aries_cloudcontroller/models/dif_options.py +++ b/aries_cloudcontroller/models/dif_options.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIFOptions(BaseModel): """ @@ -69,7 +64,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIFOptions from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,15 +78,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIFOptions from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/dif_pres_spec.py b/aries_cloudcontroller/models/dif_pres_spec.py index 44d8416e..c367a984 100644 --- a/aries_cloudcontroller/models/dif_pres_spec.py +++ b/aries_cloudcontroller/models/dif_pres_spec.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.presentation_definition import PresentationDefinition from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIFPresSpec(BaseModel): """ @@ -39,11 +35,11 @@ class DIFPresSpec(BaseModel): description="Issuer identifier to sign the presentation, if different from current public DID", ) presentation_definition: Optional[PresentationDefinition] = None - record_ids: Optional[Union[str, Any]] = Field( + record_ids: Optional[Dict[str, Any]] = Field( default=None, description="Mapping of input_descriptor id to list of stored W3C credential record_id", ) - reveal_doc: Optional[Union[str, Any]] = Field( + reveal_doc: Optional[Dict[str, Any]] = Field( default=None, description="reveal doc [JSON-LD frame] dict used to derive the credential when selective disclosure is required", ) @@ -65,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIFPresSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation_definition @@ -90,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIFPresSpec from a dict""" if obj is None: return None @@ -102,7 +100,7 @@ def from_dict(cls, obj: Dict) -> Self: { "issuer_id": obj.get("issuer_id"), "presentation_definition": ( - PresentationDefinition.from_dict(obj.get("presentation_definition")) + PresentationDefinition.from_dict(obj["presentation_definition"]) if obj.get("presentation_definition") is not None else None ), diff --git a/aries_cloudcontroller/models/dif_proof_proposal.py b/aries_cloudcontroller/models/dif_proof_proposal.py index c1055a98..3dcdb5f7 100644 --- a/aries_cloudcontroller/models/dif_proof_proposal.py +++ b/aries_cloudcontroller/models/dif_proof_proposal.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.dif_options import DIFOptions from aries_cloudcontroller.models.input_descriptors import InputDescriptors from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIFProofProposal(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIFProofProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in input_descriptors (list) @@ -82,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIFProofProposal from a dict""" if obj is None: return None @@ -95,13 +93,13 @@ def from_dict(cls, obj: Dict) -> Self: "input_descriptors": ( [ InputDescriptors.from_dict(_item) - for _item in obj.get("input_descriptors") + for _item in obj["input_descriptors"] ] if obj.get("input_descriptors") is not None else None ), "options": ( - DIFOptions.from_dict(obj.get("options")) + DIFOptions.from_dict(obj["options"]) if obj.get("options") is not None else None ), diff --git a/aries_cloudcontroller/models/dif_proof_request.py b/aries_cloudcontroller/models/dif_proof_request.py index f8916051..b796a05e 100644 --- a/aries_cloudcontroller/models/dif_proof_request.py +++ b/aries_cloudcontroller/models/dif_proof_request.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.dif_options import DIFOptions from aries_cloudcontroller.models.presentation_definition import PresentationDefinition from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class DIFProofRequest(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DIFProofRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of options @@ -78,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DIFProofRequest from a dict""" if obj is None: return None @@ -89,12 +87,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "options": ( - DIFOptions.from_dict(obj.get("options")) + DIFOptions.from_dict(obj["options"]) if obj.get("options") is not None else None ), "presentation_definition": ( - PresentationDefinition.from_dict(obj.get("presentation_definition")) + PresentationDefinition.from_dict(obj["presentation_definition"]) if obj.get("presentation_definition") is not None else None ), diff --git a/aries_cloudcontroller/models/disclose.py b/aries_cloudcontroller/models/disclose.py index a29145ef..9a27b779 100644 --- a/aries_cloudcontroller/models/disclose.py +++ b/aries_cloudcontroller/models/disclose.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.protocol_descriptor import ProtocolDescriptor from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Disclose(BaseModel): """ @@ -56,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Disclose from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,11 +67,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in protocols (list) @@ -88,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Disclose from a dict""" if obj is None: return None @@ -101,10 +101,7 @@ def from_dict(cls, obj: Dict) -> Self: "@id": obj.get("@id"), "@type": obj.get("@type"), "protocols": ( - [ - ProtocolDescriptor.from_dict(_item) - for _item in obj.get("protocols") - ] + [ProtocolDescriptor.from_dict(_item) for _item in obj["protocols"]] if obj.get("protocols") is not None else None ), diff --git a/aries_cloudcontroller/models/disclosures.py b/aries_cloudcontroller/models/disclosures.py index e3a53258..9c528e61 100644 --- a/aries_cloudcontroller/models/disclosures.py +++ b/aries_cloudcontroller/models/disclosures.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Disclosures(BaseModel): """ @@ -39,7 +35,7 @@ class Disclosures(BaseModel): type: Optional[StrictStr] = Field( default=None, description="Message type", alias="@type" ) - disclosures: List[Union[str, Any]] = Field( + disclosures: List[Dict[str, Any]] = Field( description="List of protocol or goal_code descriptors" ) __properties: ClassVar[List[str]] = ["@id", "@type", "disclosures"] @@ -55,7 +51,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Disclosures from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,17 +66,21 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Disclosures from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/doc.py b/aries_cloudcontroller/models/doc.py index 05078dba..32777aa3 100644 --- a/aries_cloudcontroller/models/doc.py +++ b/aries_cloudcontroller/models/doc.py @@ -16,26 +16,22 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.signature_options import SignatureOptions from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Doc(BaseModel): """ Doc """ # noqa: E501 - credential: Union[str, Any] = Field(description="Credential to sign") - options: SignatureOptions + credential: Dict[str, Any] = Field(description="Credential to sign") + options: SignatureOptions = Field(description="Signature options") __properties: ClassVar[List[str]] = ["credential", "options"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Doc from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,9 +59,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of options @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Doc from a dict""" if obj is None: return None @@ -86,7 +84,7 @@ def from_dict(cls, obj: Dict) -> Self: { "credential": obj.get("credential"), "options": ( - SignatureOptions.from_dict(obj.get("options")) + SignatureOptions.from_dict(obj["options"]) if obj.get("options") is not None else None ), diff --git a/aries_cloudcontroller/models/endorser_info.py b/aries_cloudcontroller/models/endorser_info.py index 2352a806..2545fdc1 100644 --- a/aries_cloudcontroller/models/endorser_info.py +++ b/aries_cloudcontroller/models/endorser_info.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class EndorserInfo(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndorserInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndorserInfo from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/endpoints_result.py b/aries_cloudcontroller/models/endpoints_result.py index 3d18f784..c2934c24 100644 --- a/aries_cloudcontroller/models/endpoints_result.py +++ b/aries_cloudcontroller/models/endpoints_result.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class EndpointsResult(BaseModel): """ @@ -84,7 +79,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointsResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -98,15 +93,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointsResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/filter.py b/aries_cloudcontroller/models/filter.py index b0db51e7..39f207cb 100644 --- a/aries_cloudcontroller/models/filter.py +++ b/aries_cloudcontroller/models/filter.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Filter(BaseModel): """ @@ -83,7 +79,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Filter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -97,15 +93,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Filter from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/generated.py b/aries_cloudcontroller/models/generated.py index 020fb452..3ab0d526 100644 --- a/aries_cloudcontroller/models/generated.py +++ b/aries_cloudcontroller/models/generated.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Generated(BaseModel): """ @@ -81,7 +76,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Generated from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -95,15 +90,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Generated from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/get_did_endpoint_response.py b/aries_cloudcontroller/models/get_did_endpoint_response.py index b9bd91ff..58057ddd 100644 --- a/aries_cloudcontroller/models/get_did_endpoint_response.py +++ b/aries_cloudcontroller/models/get_did_endpoint_response.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class GetDIDEndpointResponse(BaseModel): """ @@ -66,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetDIDEndpointResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if endpoint (nullable) is None @@ -93,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetDIDEndpointResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/get_did_verkey_response.py b/aries_cloudcontroller/models/get_did_verkey_response.py index bfa7b223..b477f314 100644 --- a/aries_cloudcontroller/models/get_did_verkey_response.py +++ b/aries_cloudcontroller/models/get_did_verkey_response.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class GetDIDVerkeyResponse(BaseModel): """ @@ -66,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetDIDVerkeyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if verkey (nullable) is None @@ -93,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetDIDVerkeyResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/get_nym_role_response.py b/aries_cloudcontroller/models/get_nym_role_response.py index f0293906..69a6e45f 100644 --- a/aries_cloudcontroller/models/get_nym_role_response.py +++ b/aries_cloudcontroller/models/get_nym_role_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class GetNymRoleResponse(BaseModel): """ @@ -42,13 +38,8 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ( - "STEWARD", - "TRUSTEE", - "ENDORSER", - "NETWORK_MONITOR", - "USER", - "ROLE_REMOVE", + if value not in set( + ["STEWARD", "TRUSTEE", "ENDORSER", "NETWORK_MONITOR", "USER", "ROLE_REMOVE"] ): raise ValueError( "must be one of enum values ('STEWARD', 'TRUSTEE', 'ENDORSER', 'NETWORK_MONITOR', 'USER', 'ROLE_REMOVE')" @@ -66,7 +57,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetNymRoleResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,15 +71,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetNymRoleResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_attr_value.py b/aries_cloudcontroller/models/indy_attr_value.py index 58d107f1..04477a5a 100644 --- a/aries_cloudcontroller/models/indy_attr_value.py +++ b/aries_cloudcontroller/models/indy_attr_value.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyAttrValue(BaseModel): """ @@ -59,7 +54,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyAttrValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,15 +68,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyAttrValue from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_cred_abstract.py b/aries_cloudcontroller/models/indy_cred_abstract.py index 7a0c7f9f..065f977a 100644 --- a/aries_cloudcontroller/models/indy_cred_abstract.py +++ b/aries_cloudcontroller/models/indy_cred_abstract.py @@ -17,21 +17,16 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_key_correctness_proof import ( IndyKeyCorrectnessProof, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyCredAbstract(BaseModel): """ @@ -41,7 +36,9 @@ class IndyCredAbstract(BaseModel): cred_def_id: Annotated[str, Field(strict=True)] = Field( description="Credential definition identifier" ) - key_correctness_proof: IndyKeyCorrectnessProof + key_correctness_proof: IndyKeyCorrectnessProof = Field( + description="Key correctness proof" + ) nonce: Annotated[str, Field(strict=True)] = Field( description="Nonce in credential abstract" ) @@ -97,7 +94,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyCredAbstract from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -111,9 +108,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_correctness_proof @@ -122,7 +121,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyCredAbstract from a dict""" if obj is None: return None @@ -134,7 +133,7 @@ def from_dict(cls, obj: Dict) -> Self: { "cred_def_id": obj.get("cred_def_id"), "key_correctness_proof": ( - IndyKeyCorrectnessProof.from_dict(obj.get("key_correctness_proof")) + IndyKeyCorrectnessProof.from_dict(obj["key_correctness_proof"]) if obj.get("key_correctness_proof") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_cred_info.py b/aries_cloudcontroller/models/indy_cred_info.py index e028f0a4..8bbceb11 100644 --- a/aries_cloudcontroller/models/indy_cred_info.py +++ b/aries_cloudcontroller/models/indy_cred_info.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyCredInfo(BaseModel): """ @@ -126,7 +121,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyCredInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -140,9 +135,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if cred_rev_id (nullable) is None @@ -158,7 +155,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyCredInfo from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_cred_precis.py b/aries_cloudcontroller/models/indy_cred_precis.py index 617e7845..4d344518 100644 --- a/aries_cloudcontroller/models/indy_cred_precis.py +++ b/aries_cloudcontroller/models/indy_cred_precis.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_cred_info import IndyCredInfo from aries_cloudcontroller.models.indy_non_revocation_interval import ( @@ -26,19 +27,18 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyCredPrecis(BaseModel): """ IndyCredPrecis """ # noqa: E501 - cred_info: Optional[IndyCredInfo] = None - interval: Optional[IndyNonRevocationInterval] = None + cred_info: Optional[IndyCredInfo] = Field( + default=None, description="Credential info" + ) + interval: Optional[IndyNonRevocationInterval] = Field( + default=None, description="Non-revocation interval from presentation request" + ) presentation_referents: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = [ "cred_info", @@ -57,7 +57,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyCredPrecis from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,9 +71,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of cred_info @@ -85,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyCredPrecis from a dict""" if obj is None: return None @@ -96,12 +98,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "cred_info": ( - IndyCredInfo.from_dict(obj.get("cred_info")) + IndyCredInfo.from_dict(obj["cred_info"]) if obj.get("cred_info") is not None else None ), "interval": ( - IndyNonRevocationInterval.from_dict(obj.get("interval")) + IndyNonRevocationInterval.from_dict(obj["interval"]) if obj.get("interval") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_cred_request.py b/aries_cloudcontroller/models/indy_cred_request.py index a2abce46..ea913389 100644 --- a/aries_cloudcontroller/models/indy_cred_request.py +++ b/aries_cloudcontroller/models/indy_cred_request.py @@ -17,26 +17,21 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyCredRequest(BaseModel): """ IndyCredRequest """ # noqa: E501 - blinded_ms: Union[str, Any] = Field(description="Blinded master secret") - blinded_ms_correctness_proof: Union[str, Any] = Field( + blinded_ms: Dict[str, Any] = Field(description="Blinded master secret") + blinded_ms_correctness_proof: Dict[str, Any] = Field( description="Blinded master secret correctness proof" ) cred_def_id: Annotated[str, Field(strict=True)] = Field( @@ -96,7 +91,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyCredRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -110,15 +105,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyCredRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_credential.py b/aries_cloudcontroller/models/indy_credential.py index 60b2a15f..352f8227 100644 --- a/aries_cloudcontroller/models/indy_credential.py +++ b/aries_cloudcontroller/models/indy_credential.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_attr_value import IndyAttrValue from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyCredential(BaseModel): """ @@ -39,7 +34,7 @@ class IndyCredential(BaseModel): cred_def_id: Annotated[str, Field(strict=True)] = Field( description="Credential definition identifier" ) - rev_reg: Optional[Union[str, Any]] = Field( + rev_reg: Optional[Dict[str, Any]] = Field( default=None, description="Revocation registry state" ) rev_reg_id: Optional[Annotated[str, Field(strict=True)]] = Field( @@ -48,12 +43,12 @@ class IndyCredential(BaseModel): schema_id: Annotated[str, Field(strict=True)] = Field( description="Schema identifier" ) - signature: Union[str, Any] = Field(description="Credential signature") - signature_correctness_proof: Union[str, Any] = Field( + signature: Dict[str, Any] = Field(description="Credential signature") + signature_correctness_proof: Dict[str, Any] = Field( description="Credential signature correctness proof" ) values: Dict[str, IndyAttrValue] = Field(description="Credential attributes") - witness: Optional[Union[str, Any]] = Field( + witness: Optional[Dict[str, Any]] = Field( default=None, description="Witness for revocation proof" ) __properties: ClassVar[List[str]] = [ @@ -117,7 +112,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyCredential from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -131,9 +126,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in values (dict) @@ -161,7 +158,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyCredential from a dict""" if obj is None: return None @@ -180,7 +177,7 @@ def from_dict(cls, obj: Dict) -> Self: "values": ( dict( (_k, IndyAttrValue.from_dict(_v)) - for _k, _v in obj.get("values").items() + for _k, _v in obj["values"].items() ) if obj.get("values") is not None else None diff --git a/aries_cloudcontroller/models/indy_eq_proof.py b/aries_cloudcontroller/models/indy_eq_proof.py index 9009adff..ef85d265 100644 --- a/aries_cloudcontroller/models/indy_eq_proof.py +++ b/aries_cloudcontroller/models/indy_eq_proof.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyEQProof(BaseModel): """ @@ -101,7 +96,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyEQProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,15 +110,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyEQProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_ge_proof.py b/aries_cloudcontroller/models/indy_ge_proof.py index 925dba70..0f712c27 100644 --- a/aries_cloudcontroller/models/indy_ge_proof.py +++ b/aries_cloudcontroller/models/indy_ge_proof.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_ge_proof_pred import IndyGEProofPred from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyGEProof(BaseModel): """ @@ -75,7 +70,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyGEProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,9 +84,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of predicate @@ -100,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyGEProof from a dict""" if obj is None: return None @@ -113,7 +110,7 @@ def from_dict(cls, obj: Dict) -> Self: "alpha": obj.get("alpha"), "mj": obj.get("mj"), "predicate": ( - IndyGEProofPred.from_dict(obj.get("predicate")) + IndyGEProofPred.from_dict(obj["predicate"]) if obj.get("predicate") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_ge_proof_pred.py b/aries_cloudcontroller/models/indy_ge_proof_pred.py index 6513aef6..53981b73 100644 --- a/aries_cloudcontroller/models/indy_ge_proof_pred.py +++ b/aries_cloudcontroller/models/indy_ge_proof_pred.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyGEProofPred(BaseModel): """ @@ -48,7 +44,7 @@ def p_type_validate_enum(cls, value): if value is None: return value - if value not in ("LT", "LE", "GE", "GT"): + if value not in set(["LT", "LE", "GE", "GT"]): raise ValueError("must be one of enum values ('LT', 'LE', 'GE', 'GT')") return value @@ -63,7 +59,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyGEProofPred from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,15 +73,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyGEProofPred from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_key_correctness_proof.py b/aries_cloudcontroller/models/indy_key_correctness_proof.py index a54707d4..6fb1f480 100644 --- a/aries_cloudcontroller/models/indy_key_correctness_proof.py +++ b/aries_cloudcontroller/models/indy_key_correctness_proof.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyKeyCorrectnessProof(BaseModel): """ @@ -69,7 +64,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyKeyCorrectnessProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,15 +78,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyKeyCorrectnessProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_non_revoc_proof.py b/aries_cloudcontroller/models/indy_non_revoc_proof.py index 212c0a9e..28ef0df3 100644 --- a/aries_cloudcontroller/models/indy_non_revoc_proof.py +++ b/aries_cloudcontroller/models/indy_non_revoc_proof.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyNonRevocProof(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyNonRevocProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyNonRevocProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_non_revocation_interval.py b/aries_cloudcontroller/models/indy_non_revocation_interval.py index 887d7051..f593c701 100644 --- a/aries_cloudcontroller/models/indy_non_revocation_interval.py +++ b/aries_cloudcontroller/models/indy_non_revocation_interval.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyNonRevocationInterval(BaseModel): """ @@ -60,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyNonRevocationInterval from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyNonRevocationInterval from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_pres_attr_spec.py b/aries_cloudcontroller/models/indy_pres_attr_spec.py index 73bc89b3..3f22898b 100644 --- a/aries_cloudcontroller/models/indy_pres_attr_spec.py +++ b/aries_cloudcontroller/models/indy_pres_attr_spec.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyPresAttrSpec(BaseModel): """ @@ -78,7 +73,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyPresAttrSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -92,15 +87,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyPresAttrSpec from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_pres_pred_spec.py b/aries_cloudcontroller/models/indy_pres_pred_spec.py index d2755a5b..763dc8dc 100644 --- a/aries_cloudcontroller/models/indy_pres_pred_spec.py +++ b/aries_cloudcontroller/models/indy_pres_pred_spec.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyPresPredSpec(BaseModel): """ @@ -66,7 +61,7 @@ def cred_def_id_validate_regular_expression(cls, value): @field_validator("predicate") def predicate_validate_enum(cls, value): """Validates the enum""" - if value not in ("<", "<=", ">=", ">"): + if value not in set(["<", "<=", ">=", ">"]): raise ValueError("must be one of enum values ('<', '<=', '>=', '>')") return value @@ -81,7 +76,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyPresPredSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -95,15 +90,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyPresPredSpec from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_pres_preview.py b/aries_cloudcontroller/models/indy_pres_preview.py index 7a6b0d1e..bbd949af 100644 --- a/aries_cloudcontroller/models/indy_pres_preview.py +++ b/aries_cloudcontroller/models/indy_pres_preview.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_pres_attr_spec import IndyPresAttrSpec from aries_cloudcontroller.models.indy_pres_pred_spec import IndyPresPredSpec from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyPresPreview(BaseModel): """ @@ -53,7 +49,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyPresPreview from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) @@ -89,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyPresPreview from a dict""" if obj is None: return None @@ -101,18 +99,12 @@ def from_dict(cls, obj: Dict) -> Self: { "@type": obj.get("@type"), "attributes": ( - [ - IndyPresAttrSpec.from_dict(_item) - for _item in obj.get("attributes") - ] + [IndyPresAttrSpec.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None ), "predicates": ( - [ - IndyPresPredSpec.from_dict(_item) - for _item in obj.get("predicates") - ] + [IndyPresPredSpec.from_dict(_item) for _item in obj["predicates"]] if obj.get("predicates") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_pres_spec.py b/aries_cloudcontroller/models/indy_pres_spec.py index 276869cf..64bb126c 100644 --- a/aries_cloudcontroller/models/indy_pres_spec.py +++ b/aries_cloudcontroller/models/indy_pres_spec.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_requested_creds_requested_attr import ( IndyRequestedCredsRequestedAttr, @@ -28,11 +29,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyPresSpec(BaseModel): """ @@ -69,7 +65,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyPresSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,9 +79,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in requested_attributes (dict) @@ -105,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyPresSpec from a dict""" if obj is None: return None @@ -118,7 +116,7 @@ def from_dict(cls, obj: Dict) -> Self: "requested_attributes": ( dict( (_k, IndyRequestedCredsRequestedAttr.from_dict(_v)) - for _k, _v in obj.get("requested_attributes").items() + for _k, _v in obj["requested_attributes"].items() ) if obj.get("requested_attributes") is not None else None @@ -126,7 +124,7 @@ def from_dict(cls, obj: Dict) -> Self: "requested_predicates": ( dict( (_k, IndyRequestedCredsRequestedPred.from_dict(_v)) - for _k, _v in obj.get("requested_predicates").items() + for _k, _v in obj["requested_predicates"].items() ) if obj.get("requested_predicates") is not None else None diff --git a/aries_cloudcontroller/models/indy_primary_proof.py b/aries_cloudcontroller/models/indy_primary_proof.py index 002ca050..9fb04d0d 100644 --- a/aries_cloudcontroller/models/indy_primary_proof.py +++ b/aries_cloudcontroller/models/indy_primary_proof.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.indy_ge_proof import IndyGEProof from aries_cloudcontroller.models.indy_primary_proof_eq_proof import ( @@ -26,11 +27,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyPrimaryProof(BaseModel): """ @@ -54,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyPrimaryProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of eq_proof @@ -96,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyPrimaryProof from a dict""" if obj is None: return None @@ -107,12 +105,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "eq_proof": ( - IndyPrimaryProofEqProof.from_dict(obj.get("eq_proof")) + IndyPrimaryProofEqProof.from_dict(obj["eq_proof"]) if obj.get("eq_proof") is not None else None ), "ge_proofs": ( - [IndyGEProof.from_dict(_item) for _item in obj.get("ge_proofs")] + [IndyGEProof.from_dict(_item) for _item in obj["ge_proofs"]] if obj.get("ge_proofs") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_primary_proof_eq_proof.py b/aries_cloudcontroller/models/indy_primary_proof_eq_proof.py index 472b513c..42edd90e 100644 --- a/aries_cloudcontroller/models/indy_primary_proof_eq_proof.py +++ b/aries_cloudcontroller/models/indy_primary_proof_eq_proof.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyPrimaryProofEqProof(BaseModel): """ @@ -101,7 +96,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyPrimaryProofEqProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,15 +110,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyPrimaryProofEqProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof.py b/aries_cloudcontroller/models/indy_proof.py index b39cbaec..0139858a 100644 --- a/aries_cloudcontroller/models/indy_proof.py +++ b/aries_cloudcontroller/models/indy_proof.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_identifier import IndyProofIdentifier from aries_cloudcontroller.models.indy_proof_proof import IndyProofProof @@ -27,11 +28,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProof(BaseModel): """ @@ -41,8 +37,12 @@ class IndyProof(BaseModel): identifiers: Optional[List[IndyProofIdentifier]] = Field( default=None, description="Indy proof.identifiers content" ) - proof: Optional[IndyProofProof] = None - requested_proof: Optional[IndyProofRequestedProof] = None + proof: Optional[IndyProofProof] = Field( + default=None, description="Indy proof.proof content" + ) + requested_proof: Optional[IndyProofRequestedProof] = Field( + default=None, description="Indy proof.requested_proof content" + ) __properties: ClassVar[List[str]] = ["identifiers", "proof", "requested_proof"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -56,7 +56,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,9 +70,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in identifiers (list) @@ -91,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProof from a dict""" if obj is None: return None @@ -104,18 +106,18 @@ def from_dict(cls, obj: Dict) -> Self: "identifiers": ( [ IndyProofIdentifier.from_dict(_item) - for _item in obj.get("identifiers") + for _item in obj["identifiers"] ] if obj.get("identifiers") is not None else None ), "proof": ( - IndyProofProof.from_dict(obj.get("proof")) + IndyProofProof.from_dict(obj["proof"]) if obj.get("proof") is not None else None ), "requested_proof": ( - IndyProofRequestedProof.from_dict(obj.get("requested_proof")) + IndyProofRequestedProof.from_dict(obj["requested_proof"]) if obj.get("requested_proof") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_proof_identifier.py b/aries_cloudcontroller/models/indy_proof_identifier.py index 6d367ea8..4085cbba 100644 --- a/aries_cloudcontroller/models/indy_proof_identifier.py +++ b/aries_cloudcontroller/models/indy_proof_identifier.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofIdentifier(BaseModel): """ @@ -110,7 +105,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofIdentifier from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -124,9 +119,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if rev_reg_id (nullable) is None @@ -142,7 +139,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofIdentifier from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_proof.py b/aries_cloudcontroller/models/indy_proof_proof.py index c9059d9b..20eeccc7 100644 --- a/aries_cloudcontroller/models/indy_proof_proof.py +++ b/aries_cloudcontroller/models/indy_proof_proof.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_proof_aggregated_proof import ( IndyProofProofAggregatedProof, @@ -28,18 +29,15 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofProof(BaseModel): """ IndyProofProof """ # noqa: E501 - aggregated_proof: Optional[IndyProofProofAggregatedProof] = None + aggregated_proof: Optional[IndyProofProofAggregatedProof] = Field( + default=None, description="Indy proof aggregated proof" + ) proofs: Optional[List[IndyProofProofProofsProof]] = Field( default=None, description="Indy proof proofs" ) @@ -56,7 +54,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,9 +68,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of aggregated_proof @@ -88,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofProof from a dict""" if obj is None: return None @@ -99,14 +99,14 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "aggregated_proof": ( - IndyProofProofAggregatedProof.from_dict(obj.get("aggregated_proof")) + IndyProofProofAggregatedProof.from_dict(obj["aggregated_proof"]) if obj.get("aggregated_proof") is not None else None ), "proofs": ( [ IndyProofProofProofsProof.from_dict(_item) - for _item in obj.get("proofs") + for _item in obj["proofs"] ] if obj.get("proofs") is not None else None diff --git a/aries_cloudcontroller/models/indy_proof_proof_aggregated_proof.py b/aries_cloudcontroller/models/indy_proof_proof_aggregated_proof.py index 3e9362e8..bae805ea 100644 --- a/aries_cloudcontroller/models/indy_proof_proof_aggregated_proof.py +++ b/aries_cloudcontroller/models/indy_proof_proof_aggregated_proof.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofProofAggregatedProof(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofProofAggregatedProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofProofAggregatedProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_proof_proofs_proof.py b/aries_cloudcontroller/models/indy_proof_proof_proofs_proof.py index 8fb3a0db..0efb31eb 100644 --- a/aries_cloudcontroller/models/indy_proof_proof_proofs_proof.py +++ b/aries_cloudcontroller/models/indy_proof_proof_proofs_proof.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.indy_primary_proof import IndyPrimaryProof from aries_cloudcontroller.models.indy_proof_proof_proofs_proof_non_revoc_proof import ( @@ -26,11 +27,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofProofProofsProof(BaseModel): """ @@ -38,7 +34,9 @@ class IndyProofProofProofsProof(BaseModel): """ # noqa: E501 non_revoc_proof: Optional[IndyProofProofProofsProofNonRevocProof] = None - primary_proof: Optional[IndyPrimaryProof] = None + primary_proof: Optional[IndyPrimaryProof] = Field( + default=None, description="Indy primary proof" + ) __properties: ClassVar[List[str]] = ["non_revoc_proof", "primary_proof"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -52,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofProofProofsProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of non_revoc_proof @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofProofProofsProof from a dict""" if obj is None: return None @@ -97,13 +97,13 @@ def from_dict(cls, obj: Dict) -> Self: { "non_revoc_proof": ( IndyProofProofProofsProofNonRevocProof.from_dict( - obj.get("non_revoc_proof") + obj["non_revoc_proof"] ) if obj.get("non_revoc_proof") is not None else None ), "primary_proof": ( - IndyPrimaryProof.from_dict(obj.get("primary_proof")) + IndyPrimaryProof.from_dict(obj["primary_proof"]) if obj.get("primary_proof") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_proof_proof_proofs_proof_non_revoc_proof.py b/aries_cloudcontroller/models/indy_proof_proof_proofs_proof_non_revoc_proof.py index bfb8792e..5bb8e068 100644 --- a/aries_cloudcontroller/models/indy_proof_proof_proofs_proof_non_revoc_proof.py +++ b/aries_cloudcontroller/models/indy_proof_proof_proofs_proof_non_revoc_proof.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofProofProofsProofNonRevocProof(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofProofProofsProofNonRevocProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofProofProofsProofNonRevocProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_req_attr_spec.py b/aries_cloudcontroller/models/indy_proof_req_attr_spec.py index 049d93ff..cd27fb2c 100644 --- a/aries_cloudcontroller/models/indy_proof_req_attr_spec.py +++ b/aries_cloudcontroller/models/indy_proof_req_attr_spec.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_req_attr_spec_non_revoked import ( IndyProofReqAttrSpecNonRevoked, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofReqAttrSpec(BaseModel): """ @@ -58,7 +54,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofReqAttrSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,9 +68,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of non_revoked @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofReqAttrSpec from a dict""" if obj is None: return None @@ -101,7 +99,7 @@ def from_dict(cls, obj: Dict) -> Self: "name": obj.get("name"), "names": obj.get("names"), "non_revoked": ( - IndyProofReqAttrSpecNonRevoked.from_dict(obj.get("non_revoked")) + IndyProofReqAttrSpecNonRevoked.from_dict(obj["non_revoked"]) if obj.get("non_revoked") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_proof_req_attr_spec_non_revoked.py b/aries_cloudcontroller/models/indy_proof_req_attr_spec_non_revoked.py index e8579acb..d63a67bf 100644 --- a/aries_cloudcontroller/models/indy_proof_req_attr_spec_non_revoked.py +++ b/aries_cloudcontroller/models/indy_proof_req_attr_spec_non_revoked.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofReqAttrSpecNonRevoked(BaseModel): """ @@ -60,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofReqAttrSpecNonRevoked from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofReqAttrSpecNonRevoked from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_req_pred_spec.py b/aries_cloudcontroller/models/indy_proof_req_pred_spec.py index f51e8c44..eee30149 100644 --- a/aries_cloudcontroller/models/indy_proof_req_pred_spec.py +++ b/aries_cloudcontroller/models/indy_proof_req_pred_spec.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_req_pred_spec_non_revoked import ( IndyProofReqPredSpecNonRevoked, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofReqPredSpec(BaseModel): """ @@ -55,7 +51,7 @@ class IndyProofReqPredSpec(BaseModel): @field_validator("p_type") def p_type_validate_enum(cls, value): """Validates the enum""" - if value not in ("<", "<=", ">=", ">"): + if value not in set(["<", "<=", ">=", ">"]): raise ValueError("must be one of enum values ('<', '<=', '>=', '>')") return value @@ -70,7 +66,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofReqPredSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,9 +80,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of non_revoked @@ -100,7 +98,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofReqPredSpec from a dict""" if obj is None: return None @@ -112,7 +110,7 @@ def from_dict(cls, obj: Dict) -> Self: { "name": obj.get("name"), "non_revoked": ( - IndyProofReqPredSpecNonRevoked.from_dict(obj.get("non_revoked")) + IndyProofReqPredSpecNonRevoked.from_dict(obj["non_revoked"]) if obj.get("non_revoked") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_proof_req_pred_spec_non_revoked.py b/aries_cloudcontroller/models/indy_proof_req_pred_spec_non_revoked.py index e4fb9956..34cd3ab5 100644 --- a/aries_cloudcontroller/models/indy_proof_req_pred_spec_non_revoked.py +++ b/aries_cloudcontroller/models/indy_proof_req_pred_spec_non_revoked.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofReqPredSpecNonRevoked(BaseModel): """ @@ -60,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofReqPredSpecNonRevoked from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofReqPredSpecNonRevoked from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_request.py b/aries_cloudcontroller/models/indy_proof_request.py index fbf8183b..5ee4b721 100644 --- a/aries_cloudcontroller/models/indy_proof_request.py +++ b/aries_cloudcontroller/models/indy_proof_request.py @@ -17,10 +17,10 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_proof_req_attr_spec import IndyProofReqAttrSpec from aries_cloudcontroller.models.indy_proof_req_pred_spec import IndyProofReqPredSpec @@ -29,11 +29,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofRequest(BaseModel): """ @@ -94,7 +89,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -108,9 +103,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of non_revoked @@ -138,7 +135,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofRequest from a dict""" if obj is None: return None @@ -150,7 +147,7 @@ def from_dict(cls, obj: Dict) -> Self: { "name": obj.get("name"), "non_revoked": ( - IndyProofRequestNonRevoked.from_dict(obj.get("non_revoked")) + IndyProofRequestNonRevoked.from_dict(obj["non_revoked"]) if obj.get("non_revoked") is not None else None ), @@ -158,7 +155,7 @@ def from_dict(cls, obj: Dict) -> Self: "requested_attributes": ( dict( (_k, IndyProofReqAttrSpec.from_dict(_v)) - for _k, _v in obj.get("requested_attributes").items() + for _k, _v in obj["requested_attributes"].items() ) if obj.get("requested_attributes") is not None else None @@ -166,7 +163,7 @@ def from_dict(cls, obj: Dict) -> Self: "requested_predicates": ( dict( (_k, IndyProofReqPredSpec.from_dict(_v)) - for _k, _v in obj.get("requested_predicates").items() + for _k, _v in obj["requested_predicates"].items() ) if obj.get("requested_predicates") is not None else None diff --git a/aries_cloudcontroller/models/indy_proof_request_non_revoked.py b/aries_cloudcontroller/models/indy_proof_request_non_revoked.py index ea3d3f62..37c1f2a0 100644 --- a/aries_cloudcontroller/models/indy_proof_request_non_revoked.py +++ b/aries_cloudcontroller/models/indy_proof_request_non_revoked.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofRequestNonRevoked(BaseModel): """ @@ -60,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofRequestNonRevoked from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofRequestNonRevoked from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_requested_proof.py b/aries_cloudcontroller/models/indy_proof_requested_proof.py index b4c68233..0c0fbb98 100644 --- a/aries_cloudcontroller/models/indy_proof_requested_proof.py +++ b/aries_cloudcontroller/models/indy_proof_requested_proof.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_requested_proof_predicate import ( IndyProofRequestedProofPredicate, @@ -31,11 +32,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofRequestedProof(BaseModel): """ @@ -53,10 +49,10 @@ class IndyProofRequestedProof(BaseModel): revealed_attrs: Optional[Dict[str, IndyProofRequestedProofRevealedAttr]] = Field( default=None, description="Proof requested proof revealed attributes" ) - self_attested_attrs: Optional[Union[str, Any]] = Field( + self_attested_attrs: Optional[Dict[str, Any]] = Field( default=None, description="Proof requested proof self-attested attributes" ) - unrevealed_attrs: Optional[Union[str, Any]] = Field( + unrevealed_attrs: Optional[Dict[str, Any]] = Field( default=None, description="Unrevealed attributes" ) __properties: ClassVar[List[str]] = [ @@ -78,7 +74,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofRequestedProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -92,9 +88,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in predicates (dict) @@ -134,7 +132,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofRequestedProof from a dict""" if obj is None: return None @@ -147,7 +145,7 @@ def from_dict(cls, obj: Dict) -> Self: "predicates": ( dict( (_k, IndyProofRequestedProofPredicate.from_dict(_v)) - for _k, _v in obj.get("predicates").items() + for _k, _v in obj["predicates"].items() ) if obj.get("predicates") is not None else None @@ -155,7 +153,7 @@ def from_dict(cls, obj: Dict) -> Self: "revealed_attr_groups": ( dict( (_k, IndyProofRequestedProofRevealedAttrGroup.from_dict(_v)) - for _k, _v in obj.get("revealed_attr_groups").items() + for _k, _v in obj["revealed_attr_groups"].items() ) if obj.get("revealed_attr_groups") is not None else None @@ -163,7 +161,7 @@ def from_dict(cls, obj: Dict) -> Self: "revealed_attrs": ( dict( (_k, IndyProofRequestedProofRevealedAttr.from_dict(_v)) - for _k, _v in obj.get("revealed_attrs").items() + for _k, _v in obj["revealed_attrs"].items() ) if obj.get("revealed_attrs") is not None else None diff --git a/aries_cloudcontroller/models/indy_proof_requested_proof_predicate.py b/aries_cloudcontroller/models/indy_proof_requested_proof_predicate.py index 5555ca8c..70ec3b9f 100644 --- a/aries_cloudcontroller/models/indy_proof_requested_proof_predicate.py +++ b/aries_cloudcontroller/models/indy_proof_requested_proof_predicate.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofRequestedProofPredicate(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofRequestedProofPredicate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofRequestedProofPredicate from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr.py b/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr.py index eb3fd4ee..ae49facf 100644 --- a/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr.py +++ b/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofRequestedProofRevealedAttr(BaseModel): """ @@ -65,7 +60,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofRequestedProofRevealedAttr from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,15 +74,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofRequestedProofRevealedAttr from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr_group.py b/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr_group.py index 0fdd5d8e..31bce6eb 100644 --- a/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr_group.py +++ b/aries_cloudcontroller/models/indy_proof_requested_proof_revealed_attr_group.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt +from typing_extensions import Self from aries_cloudcontroller.models.raw_encoded import RawEncoded from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyProofRequestedProofRevealedAttrGroup(BaseModel): """ @@ -54,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyProofRequestedProofRevealedAttrGroup from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in values (dict) @@ -83,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyProofRequestedProofRevealedAttrGroup from a dict""" if obj is None: return None @@ -97,7 +95,7 @@ def from_dict(cls, obj: Dict) -> Self: "values": ( dict( (_k, RawEncoded.from_dict(_v)) - for _k, _v in obj.get("values").items() + for _k, _v in obj["values"].items() ) if obj.get("values") is not None else None diff --git a/aries_cloudcontroller/models/indy_requested_creds_requested_attr.py b/aries_cloudcontroller/models/indy_requested_creds_requested_attr.py index 4b9ab1f5..86fe8d9b 100644 --- a/aries_cloudcontroller/models/indy_requested_creds_requested_attr.py +++ b/aries_cloudcontroller/models/indy_requested_creds_requested_attr.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRequestedCredsRequestedAttr(BaseModel): """ @@ -52,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRequestedCredsRequestedAttr from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,15 +62,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRequestedCredsRequestedAttr from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_requested_creds_requested_pred.py b/aries_cloudcontroller/models/indy_requested_creds_requested_pred.py index 45fbba9e..84a4c8cb 100644 --- a/aries_cloudcontroller/models/indy_requested_creds_requested_pred.py +++ b/aries_cloudcontroller/models/indy_requested_creds_requested_pred.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRequestedCredsRequestedPred(BaseModel): """ @@ -55,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRequestedCredsRequestedPred from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,15 +64,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRequestedCredsRequestedPred from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_rev_reg_def.py b/aries_cloudcontroller/models/indy_rev_reg_def.py index f69b1a01..521c5d17 100644 --- a/aries_cloudcontroller/models/indy_rev_reg_def.py +++ b/aries_cloudcontroller/models/indy_rev_reg_def.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_rev_reg_def_value import IndyRevRegDefValue from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRevRegDef(BaseModel): """ @@ -50,7 +45,9 @@ class IndyRevRegDef(BaseModel): tag: Optional[StrictStr] = Field( default=None, description="Revocation registry tag" ) - value: Optional[IndyRevRegDefValue] = None + value: Optional[IndyRevRegDefValue] = Field( + default=None, description="Revocation registry definition value" + ) ver: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Version of revocation registry definition" ) @@ -99,7 +96,7 @@ def revoc_def_type_validate_enum(cls, value): if value is None: return value - if value not in ("CL_ACCUM"): + if value not in set(["CL_ACCUM"]): raise ValueError("must be one of enum values ('CL_ACCUM')") return value @@ -124,7 +121,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRevRegDef from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -138,9 +135,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of value @@ -149,7 +148,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRevRegDef from a dict""" if obj is None: return None @@ -164,7 +163,7 @@ def from_dict(cls, obj: Dict) -> Self: "revocDefType": obj.get("revocDefType"), "tag": obj.get("tag"), "value": ( - IndyRevRegDefValue.from_dict(obj.get("value")) + IndyRevRegDefValue.from_dict(obj["value"]) if obj.get("value") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_rev_reg_def_value.py b/aries_cloudcontroller/models/indy_rev_reg_def_value.py index 936bf219..cc792d5e 100644 --- a/aries_cloudcontroller/models/indy_rev_reg_def_value.py +++ b/aries_cloudcontroller/models/indy_rev_reg_def_value.py @@ -17,21 +17,16 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_rev_reg_def_value_public_keys import ( IndyRevRegDefValuePublicKeys, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRevRegDefValue(BaseModel): """ @@ -47,7 +42,7 @@ class IndyRevRegDefValue(BaseModel): alias="maxCredNum", ) public_keys: Optional[IndyRevRegDefValuePublicKeys] = Field( - default=None, alias="publicKeys" + default=None, description="Public keys", alias="publicKeys" ) tails_hash: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Tails hash value", alias="tailsHash" @@ -69,7 +64,7 @@ def issuance_type_validate_enum(cls, value): if value is None: return value - if value not in ("ISSUANCE_ON_DEMAND", "ISSUANCE_BY_DEFAULT"): + if value not in set(["ISSUANCE_ON_DEMAND", "ISSUANCE_BY_DEFAULT"]): raise ValueError( "must be one of enum values ('ISSUANCE_ON_DEMAND', 'ISSUANCE_BY_DEFAULT')" ) @@ -101,7 +96,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRevRegDefValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,9 +110,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of public_keys @@ -126,7 +123,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRevRegDefValue from a dict""" if obj is None: return None @@ -139,7 +136,7 @@ def from_dict(cls, obj: Dict) -> Self: "issuanceType": obj.get("issuanceType"), "maxCredNum": obj.get("maxCredNum"), "publicKeys": ( - IndyRevRegDefValuePublicKeys.from_dict(obj.get("publicKeys")) + IndyRevRegDefValuePublicKeys.from_dict(obj["publicKeys"]) if obj.get("publicKeys") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys.py b/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys.py index 4c1d332a..8e96bbb2 100644 --- a/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys.py +++ b/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.indy_rev_reg_def_value_public_keys_accum_key import ( IndyRevRegDefValuePublicKeysAccumKey, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRevRegDefValuePublicKeys(BaseModel): """ @@ -52,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRevRegDefValuePublicKeys from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,9 +62,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of accum_key @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRevRegDefValuePublicKeys from a dict""" if obj is None: return None @@ -88,7 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "accumKey": ( - IndyRevRegDefValuePublicKeysAccumKey.from_dict(obj.get("accumKey")) + IndyRevRegDefValuePublicKeysAccumKey.from_dict(obj["accumKey"]) if obj.get("accumKey") is not None else None ) diff --git a/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys_accum_key.py b/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys_accum_key.py index 907a159e..72af56a1 100644 --- a/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys_accum_key.py +++ b/aries_cloudcontroller/models/indy_rev_reg_def_value_public_keys_accum_key.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRevRegDefValuePublicKeysAccumKey(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRevRegDefValuePublicKeysAccumKey from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRevRegDefValuePublicKeysAccumKey from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/indy_rev_reg_entry.py b/aries_cloudcontroller/models/indy_rev_reg_entry.py index 3411bd12..be808438 100644 --- a/aries_cloudcontroller/models/indy_rev_reg_entry.py +++ b/aries_cloudcontroller/models/indy_rev_reg_entry.py @@ -17,26 +17,23 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_rev_reg_entry_value import IndyRevRegEntryValue from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRevRegEntry(BaseModel): """ IndyRevRegEntry """ # noqa: E501 - value: Optional[IndyRevRegEntryValue] = None + value: Optional[IndyRevRegEntryValue] = Field( + default=None, description="Revocation registry entry value" + ) ver: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Version of revocation registry entry" ) @@ -63,7 +60,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRevRegEntry from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,9 +74,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of value @@ -88,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRevRegEntry from a dict""" if obj is None: return None @@ -99,7 +98,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "value": ( - IndyRevRegEntryValue.from_dict(obj.get("value")) + IndyRevRegEntryValue.from_dict(obj["value"]) if obj.get("value") is not None else None ), diff --git a/aries_cloudcontroller/models/indy_rev_reg_entry_value.py b/aries_cloudcontroller/models/indy_rev_reg_entry_value.py index bd1d4a3d..625f8f51 100644 --- a/aries_cloudcontroller/models/indy_rev_reg_entry_value.py +++ b/aries_cloudcontroller/models/indy_rev_reg_entry_value.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IndyRevRegEntryValue(BaseModel): """ @@ -53,7 +49,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IndyRevRegEntryValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,15 +63,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IndyRevRegEntryValue from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/input_descriptors.py b/aries_cloudcontroller/models/input_descriptors.py index 0c2859ff..644f7b8c 100644 --- a/aries_cloudcontroller/models/input_descriptors.py +++ b/aries_cloudcontroller/models/input_descriptors.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.constraints import Constraints from aries_cloudcontroller.models.schemas_input_descriptor_filter import ( @@ -26,11 +27,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class InputDescriptors(BaseModel): """ @@ -40,13 +36,15 @@ class InputDescriptors(BaseModel): constraints: Optional[Constraints] = None group: Optional[List[StrictStr]] = None id: Optional[StrictStr] = Field(default=None, description="ID") - metadata: Optional[Union[str, Any]] = Field( + metadata: Optional[Dict[str, Any]] = Field( default=None, description="Metadata dictionary" ) name: Optional[StrictStr] = Field(default=None, description="Name") purpose: Optional[StrictStr] = Field(default=None, description="Purpose") var_schema: Optional[SchemasInputDescriptorFilter] = Field( - default=None, alias="schema" + default=None, + description="Accepts a list of schema or a dict containing filters like oneof_filter.", + alias="schema", ) __properties: ClassVar[List[str]] = [ "constraints", @@ -69,7 +67,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of InputDescriptors from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,9 +81,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of constraints @@ -97,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of InputDescriptors from a dict""" if obj is None: return None @@ -108,7 +108,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "constraints": ( - Constraints.from_dict(obj.get("constraints")) + Constraints.from_dict(obj["constraints"]) if obj.get("constraints") is not None else None ), @@ -118,7 +118,7 @@ def from_dict(cls, obj: Dict) -> Self: "name": obj.get("name"), "purpose": obj.get("purpose"), "schema": ( - SchemasInputDescriptorFilter.from_dict(obj.get("schema")) + SchemasInputDescriptorFilter.from_dict(obj["schema"]) if obj.get("schema") is not None else None ), diff --git a/aries_cloudcontroller/models/invitation_create_request.py b/aries_cloudcontroller/models/invitation_create_request.py index 7c74f1bb..dda419d1 100644 --- a/aries_cloudcontroller/models/invitation_create_request.py +++ b/aries_cloudcontroller/models/invitation_create_request.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.attachment_def import AttachmentDef from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class InvitationCreateRequest(BaseModel): """ @@ -56,7 +51,7 @@ class InvitationCreateRequest(BaseModel): mediation_id: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Identifier for active mediation record to be used" ) - metadata: Optional[Union[str, Any]] = Field( + metadata: Optional[Dict[str, Any]] = Field( default=None, description="Optional metadata to attach to the connection created with the invitation", ) @@ -109,7 +104,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of InvitationCreateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -123,9 +118,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) @@ -138,7 +135,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of InvitationCreateRequest from a dict""" if obj is None: return None @@ -151,7 +148,7 @@ def from_dict(cls, obj: Dict) -> Self: "accept": obj.get("accept"), "alias": obj.get("alias"), "attachments": ( - [AttachmentDef.from_dict(_item) for _item in obj.get("attachments")] + [AttachmentDef.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None ), diff --git a/aries_cloudcontroller/models/invitation_message.py b/aries_cloudcontroller/models/invitation_message.py index 7480ddb9..44b3db89 100644 --- a/aries_cloudcontroller/models/invitation_message.py +++ b/aries_cloudcontroller/models/invitation_message.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class InvitationMessage(BaseModel): """ @@ -86,7 +82,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of InvitationMessage from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -100,9 +96,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in requestsattach (list) @@ -120,7 +118,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of InvitationMessage from a dict""" if obj is None: return None @@ -141,7 +139,7 @@ def from_dict(cls, obj: Dict) -> Self: "requests~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("requests~attach") + for _item in obj["requests~attach"] ] if obj.get("requests~attach") is not None else None diff --git a/aries_cloudcontroller/models/invitation_record.py b/aries_cloudcontroller/models/invitation_record.py index 9ebcf533..174de9b1 100644 --- a/aries_cloudcontroller/models/invitation_record.py +++ b/aries_cloudcontroller/models/invitation_record.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.invitation_message import InvitationMessage from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class InvitationRecord(BaseModel): """ @@ -42,7 +37,9 @@ class InvitationRecord(BaseModel): invi_msg_id: Optional[StrictStr] = Field( default=None, description="Invitation message identifier" ) - invitation: Optional[InvitationMessage] = None + invitation: Optional[InvitationMessage] = Field( + default=None, description="Out of band invitation message" + ) invitation_id: Optional[StrictStr] = Field( default=None, description="Invitation record identifier" ) @@ -115,7 +112,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of InvitationRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -129,9 +126,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of invitation @@ -140,7 +139,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of InvitationRecord from a dict""" if obj is None: return None @@ -153,7 +152,7 @@ def from_dict(cls, obj: Dict) -> Self: "created_at": obj.get("created_at"), "invi_msg_id": obj.get("invi_msg_id"), "invitation": ( - InvitationMessage.from_dict(obj.get("invitation")) + InvitationMessage.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None ), diff --git a/aries_cloudcontroller/models/invitation_result.py b/aries_cloudcontroller/models/invitation_result.py index 851196dc..6d6ad5ee 100644 --- a/aries_cloudcontroller/models/invitation_result.py +++ b/aries_cloudcontroller/models/invitation_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.connection_invitation import ConnectionInvitation from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class InvitationResult(BaseModel): """ @@ -58,7 +54,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of InvitationResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,9 +68,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of invitation @@ -83,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of InvitationResult from a dict""" if obj is None: return None @@ -95,7 +93,7 @@ def from_dict(cls, obj: Dict) -> Self: { "connection_id": obj.get("connection_id"), "invitation": ( - ConnectionInvitation.from_dict(obj.get("invitation")) + ConnectionInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None ), diff --git a/aries_cloudcontroller/models/issuer_cred_rev_record.py b/aries_cloudcontroller/models/issuer_cred_rev_record.py index 06fdf962..76084362 100644 --- a/aries_cloudcontroller/models/issuer_cred_rev_record.py +++ b/aries_cloudcontroller/models/issuer_cred_rev_record.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IssuerCredRevRecord(BaseModel): """ @@ -156,7 +151,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IssuerCredRevRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -170,15 +165,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IssuerCredRevRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/issuer_rev_reg_record.py b/aries_cloudcontroller/models/issuer_rev_reg_record.py index 1d048285..b21f69db 100644 --- a/aries_cloudcontroller/models/issuer_rev_reg_record.py +++ b/aries_cloudcontroller/models/issuer_rev_reg_record.py @@ -17,20 +17,15 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_rev_reg_def import IndyRevRegDef from aries_cloudcontroller.models.indy_rev_reg_entry import IndyRevRegEntry from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class IssuerRevRegRecord(BaseModel): """ @@ -61,8 +56,12 @@ class IssuerRevRegRecord(BaseModel): revoc_def_type: Optional[StrictStr] = Field( default=None, description="Revocation registry type (specify CL_ACCUM)" ) - revoc_reg_def: Optional[IndyRevRegDef] = None - revoc_reg_entry: Optional[IndyRevRegEntry] = None + revoc_reg_def: Optional[IndyRevRegDef] = Field( + default=None, description="Revocation registry definition" + ) + revoc_reg_entry: Optional[IndyRevRegEntry] = Field( + default=None, description="Revocation registry entry" + ) revoc_reg_id: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Revocation registry identifier" ) @@ -155,7 +154,7 @@ def revoc_def_type_validate_enum(cls, value): if value is None: return value - if value not in ("CL_ACCUM"): + if value not in set(["CL_ACCUM"]): raise ValueError("must be one of enum values ('CL_ACCUM')") return value @@ -215,7 +214,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IssuerRevRegRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -229,9 +228,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of revoc_reg_def @@ -243,7 +244,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IssuerRevRegRecord from a dict""" if obj is None: return None @@ -262,12 +263,12 @@ def from_dict(cls, obj: Dict) -> Self: "record_id": obj.get("record_id"), "revoc_def_type": obj.get("revoc_def_type"), "revoc_reg_def": ( - IndyRevRegDef.from_dict(obj.get("revoc_reg_def")) + IndyRevRegDef.from_dict(obj["revoc_reg_def"]) if obj.get("revoc_reg_def") is not None else None ), "revoc_reg_entry": ( - IndyRevRegEntry.from_dict(obj.get("revoc_reg_entry")) + IndyRevRegEntry.from_dict(obj["revoc_reg_entry"]) if obj.get("revoc_reg_entry") is not None else None ), diff --git a/aries_cloudcontroller/models/jws_create.py b/aries_cloudcontroller/models/jws_create.py index 58c93543..21fd841a 100644 --- a/aries_cloudcontroller/models/jws_create.py +++ b/aries_cloudcontroller/models/jws_create.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class JWSCreate(BaseModel): """ @@ -38,8 +33,8 @@ class JWSCreate(BaseModel): did: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="DID of interest" ) - headers: Optional[Union[str, Any]] = None - payload: Union[str, Any] + headers: Optional[Dict[str, Any]] = None + payload: Dict[str, Any] verification_method: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Information used for proof verification", @@ -90,7 +85,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of JWSCreate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -104,15 +99,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of JWSCreate from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/jws_verify.py b/aries_cloudcontroller/models/jws_verify.py index e5adcfb7..71640e0b 100644 --- a/aries_cloudcontroller/models/jws_verify.py +++ b/aries_cloudcontroller/models/jws_verify.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class JWSVerify(BaseModel): """ @@ -61,7 +56,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of JWSVerify from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,15 +70,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of JWSVerify from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/jws_verify_response.py b/aries_cloudcontroller/models/jws_verify_response.py index 39e0f1d6..dad1690d 100644 --- a/aries_cloudcontroller/models/jws_verify_response.py +++ b/aries_cloudcontroller/models/jws_verify_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class JWSVerifyResponse(BaseModel): """ @@ -34,9 +30,9 @@ class JWSVerifyResponse(BaseModel): """ # noqa: E501 error: Optional[StrictStr] = Field(default=None, description="Error text") - headers: Union[str, Any] = Field(description="Headers from verified JWT.") + headers: Dict[str, Any] = Field(description="Headers from verified JWT.") kid: StrictStr = Field(description="kid of signer") - payload: Union[str, Any] = Field(description="Payload from verified JWT") + payload: Dict[str, Any] = Field(description="Payload from verified JWT") valid: StrictBool __properties: ClassVar[List[str]] = ["error", "headers", "kid", "payload", "valid"] @@ -51,7 +47,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of JWSVerifyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,15 +61,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of JWSVerifyResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/keylist.py b/aries_cloudcontroller/models/keylist.py index b92ba708..bc9f1356 100644 --- a/aries_cloudcontroller/models/keylist.py +++ b/aries_cloudcontroller/models/keylist.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.route_record import RouteRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Keylist(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Keylist from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Keylist from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [RouteRecord.from_dict(_item) for _item in obj.get("results")] + [RouteRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/keylist_query.py b/aries_cloudcontroller/models/keylist_query.py index 0dad7f6c..a17042db 100644 --- a/aries_cloudcontroller/models/keylist_query.py +++ b/aries_cloudcontroller/models/keylist_query.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.keylist_query_paginate import KeylistQueryPaginate from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class KeylistQuery(BaseModel): """ @@ -40,10 +36,12 @@ class KeylistQuery(BaseModel): type: Optional[StrictStr] = Field( default=None, description="Message type", alias="@type" ) - filter: Optional[Union[str, Any]] = Field( + filter: Optional[Dict[str, Any]] = Field( default=None, description="Query dictionary object" ) - paginate: Optional[KeylistQueryPaginate] = None + paginate: Optional[KeylistQueryPaginate] = Field( + default=None, description="Pagination info" + ) __properties: ClassVar[List[str]] = ["@id", "@type", "filter", "paginate"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -57,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeylistQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,11 +70,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of paginate @@ -85,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeylistQuery from a dict""" if obj is None: return None @@ -99,7 +101,7 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "filter": obj.get("filter"), "paginate": ( - KeylistQueryPaginate.from_dict(obj.get("paginate")) + KeylistQueryPaginate.from_dict(obj["paginate"]) if obj.get("paginate") is not None else None ), diff --git a/aries_cloudcontroller/models/keylist_query_filter_request.py b/aries_cloudcontroller/models/keylist_query_filter_request.py index 202be595..9ca87d06 100644 --- a/aries_cloudcontroller/models/keylist_query_filter_request.py +++ b/aries_cloudcontroller/models/keylist_query_filter_request.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class KeylistQueryFilterRequest(BaseModel): """ KeylistQueryFilterRequest """ # noqa: E501 - filter: Optional[Union[str, Any]] = Field( + filter: Optional[Dict[str, Any]] = Field( default=None, description="Filter for keylist query" ) __properties: ClassVar[List[str]] = ["filter"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeylistQueryFilterRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeylistQueryFilterRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/keylist_query_paginate.py b/aries_cloudcontroller/models/keylist_query_paginate.py index 654eef8c..791ee42c 100644 --- a/aries_cloudcontroller/models/keylist_query_paginate.py +++ b/aries_cloudcontroller/models/keylist_query_paginate.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class KeylistQueryPaginate(BaseModel): """ @@ -52,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeylistQueryPaginate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,15 +62,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeylistQueryPaginate from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/keylist_update.py b/aries_cloudcontroller/models/keylist_update.py index 139cfe87..c2b4e86a 100644 --- a/aries_cloudcontroller/models/keylist_update.py +++ b/aries_cloudcontroller/models/keylist_update.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.keylist_update_rule import KeylistUpdateRule from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class KeylistUpdate(BaseModel): """ @@ -56,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeylistUpdate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,11 +67,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in updates (list) @@ -88,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeylistUpdate from a dict""" if obj is None: return None @@ -101,7 +101,7 @@ def from_dict(cls, obj: Dict) -> Self: "@id": obj.get("@id"), "@type": obj.get("@type"), "updates": ( - [KeylistUpdateRule.from_dict(_item) for _item in obj.get("updates")] + [KeylistUpdateRule.from_dict(_item) for _item in obj["updates"]] if obj.get("updates") is not None else None ), diff --git a/aries_cloudcontroller/models/keylist_update_request.py b/aries_cloudcontroller/models/keylist_update_request.py index 5844369d..1270b11b 100644 --- a/aries_cloudcontroller/models/keylist_update_request.py +++ b/aries_cloudcontroller/models/keylist_update_request.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.keylist_update_rule import KeylistUpdateRule from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class KeylistUpdateRequest(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeylistUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in updates (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeylistUpdateRequest from a dict""" if obj is None: return None @@ -88,7 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "updates": ( - [KeylistUpdateRule.from_dict(_item) for _item in obj.get("updates")] + [KeylistUpdateRule.from_dict(_item) for _item in obj["updates"]] if obj.get("updates") is not None else None ) diff --git a/aries_cloudcontroller/models/keylist_update_rule.py b/aries_cloudcontroller/models/keylist_update_rule.py index 9891d36c..7c0b8f59 100644 --- a/aries_cloudcontroller/models/keylist_update_rule.py +++ b/aries_cloudcontroller/models/keylist_update_rule.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class KeylistUpdateRule(BaseModel): """ @@ -44,7 +39,7 @@ class KeylistUpdateRule(BaseModel): @field_validator("action") def action_validate_enum(cls, value): """Validates the enum""" - if value not in ("add", "remove"): + if value not in set(["add", "remove"]): raise ValueError("must be one of enum values ('add', 'remove')") return value @@ -71,7 +66,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeylistUpdateRule from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -85,15 +80,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeylistUpdateRule from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/ld_proof_vc_detail.py b/aries_cloudcontroller/models/ld_proof_vc_detail.py index 6184c50b..6d3bb4bd 100644 --- a/aries_cloudcontroller/models/ld_proof_vc_detail.py +++ b/aries_cloudcontroller/models/ld_proof_vc_detail.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.credential import Credential from aries_cloudcontroller.models.ld_proof_vc_detail_options import ( @@ -26,19 +27,18 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class LDProofVCDetail(BaseModel): """ LDProofVCDetail """ # noqa: E501 - credential: Credential - options: LDProofVCDetailOptions + credential: Credential = Field( + description="Detail of the JSON-LD Credential to be issued" + ) + options: LDProofVCDetailOptions = Field( + description="Options for specifying how the linked data proof is created." + ) __properties: ClassVar[List[str]] = ["credential", "options"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -52,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LDProofVCDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,9 +66,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential @@ -80,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LDProofVCDetail from a dict""" if obj is None: return None @@ -91,12 +93,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "credential": ( - Credential.from_dict(obj.get("credential")) + Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None ), "options": ( - LDProofVCDetailOptions.from_dict(obj.get("options")) + LDProofVCDetailOptions.from_dict(obj["options"]) if obj.get("options") is not None else None ), diff --git a/aries_cloudcontroller/models/ld_proof_vc_detail_options.py b/aries_cloudcontroller/models/ld_proof_vc_detail_options.py index 18e06c22..c6360341 100644 --- a/aries_cloudcontroller/models/ld_proof_vc_detail_options.py +++ b/aries_cloudcontroller/models/ld_proof_vc_detail_options.py @@ -17,21 +17,16 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_status_options import ( CredentialStatusOptions, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class LDProofVCDetailOptions(BaseModel): """ @@ -47,7 +42,9 @@ class LDProofVCDetailOptions(BaseModel): description="The date and time of the proof (with a maximum accuracy in seconds). Defaults to current system time", ) credential_status: Optional[CredentialStatusOptions] = Field( - default=None, alias="credentialStatus" + default=None, + description="The credential status mechanism to use for the credential. Omitting the property indicates the issued credential will not include a credential status", + alias="credentialStatus", ) domain: Optional[StrictStr] = Field( default=None, description="The intended domain of validity for the proof" @@ -96,7 +93,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LDProofVCDetailOptions from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -110,9 +107,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_status @@ -121,7 +120,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LDProofVCDetailOptions from a dict""" if obj is None: return None @@ -134,7 +133,7 @@ def from_dict(cls, obj: Dict) -> Self: "challenge": obj.get("challenge"), "created": obj.get("created"), "credentialStatus": ( - CredentialStatusOptions.from_dict(obj.get("credentialStatus")) + CredentialStatusOptions.from_dict(obj["credentialStatus"]) if obj.get("credentialStatus") is not None else None ), diff --git a/aries_cloudcontroller/models/ledger_config_instance.py b/aries_cloudcontroller/models/ledger_config_instance.py index b063cd35..ab4acb6c 100644 --- a/aries_cloudcontroller/models/ledger_config_instance.py +++ b/aries_cloudcontroller/models/ledger_config_instance.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class LedgerConfigInstance(BaseModel): """ @@ -61,7 +57,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LedgerConfigInstance from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,15 +71,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LedgerConfigInstance from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/ledger_config_list.py b/aries_cloudcontroller/models/ledger_config_list.py index ad5911cb..7c175cf4 100644 --- a/aries_cloudcontroller/models/ledger_config_list.py +++ b/aries_cloudcontroller/models/ledger_config_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.ledger_config_instance import LedgerConfigInstance from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class LedgerConfigList(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LedgerConfigList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in ledger_config_list (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LedgerConfigList from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: "ledger_config_list": ( [ LedgerConfigInstance.from_dict(_item) - for _item in obj.get("ledger_config_list") + for _item in obj["ledger_config_list"] ] if obj.get("ledger_config_list") is not None else None diff --git a/aries_cloudcontroller/models/linked_data_proof.py b/aries_cloudcontroller/models/linked_data_proof.py index f7c36079..00f1d53e 100644 --- a/aries_cloudcontroller/models/linked_data_proof.py +++ b/aries_cloudcontroller/models/linked_data_proof.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class LinkedDataProof(BaseModel): """ @@ -118,7 +113,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LinkedDataProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -132,15 +127,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LinkedDataProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/mediation_deny.py b/aries_cloudcontroller/models/mediation_deny.py index 01e4f2cc..9bc4ae04 100644 --- a/aries_cloudcontroller/models/mediation_deny.py +++ b/aries_cloudcontroller/models/mediation_deny.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MediationDeny(BaseModel): """ @@ -52,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MediationDeny from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,17 +63,21 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MediationDeny from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/mediation_grant.py b/aries_cloudcontroller/models/mediation_grant.py index 20057962..a5c4d879 100644 --- a/aries_cloudcontroller/models/mediation_grant.py +++ b/aries_cloudcontroller/models/mediation_grant.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MediationGrant(BaseModel): """ @@ -57,7 +53,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MediationGrant from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,17 +68,21 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MediationGrant from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/mediation_id_match_info.py b/aries_cloudcontroller/models/mediation_id_match_info.py index 592a27ae..369e2246 100644 --- a/aries_cloudcontroller/models/mediation_id_match_info.py +++ b/aries_cloudcontroller/models/mediation_id_match_info.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MediationIdMatchInfo(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MediationIdMatchInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MediationIdMatchInfo from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/mediation_list.py b/aries_cloudcontroller/models/mediation_list.py index 3d6a3c00..82cd484d 100644 --- a/aries_cloudcontroller/models/mediation_list.py +++ b/aries_cloudcontroller/models/mediation_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.mediation_record import MediationRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MediationList(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MediationList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MediationList from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [MediationRecord.from_dict(_item) for _item in obj.get("results")] + [MediationRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/mediation_record.py b/aries_cloudcontroller/models/mediation_record.py index d2513df2..37898d2d 100644 --- a/aries_cloudcontroller/models/mediation_record.py +++ b/aries_cloudcontroller/models/mediation_record.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MediationRecord(BaseModel): """ @@ -103,7 +98,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MediationRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -117,15 +112,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MediationRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/menu.py b/aries_cloudcontroller/models/menu.py index a9de8209..1796f422 100644 --- a/aries_cloudcontroller/models/menu.py +++ b/aries_cloudcontroller/models/menu.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.menu_option import MenuOption from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Menu(BaseModel): """ @@ -68,7 +64,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Menu from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,11 +79,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in options (list) @@ -100,7 +100,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Menu from a dict""" if obj is None: return None @@ -115,7 +115,7 @@ def from_dict(cls, obj: Dict) -> Self: "description": obj.get("description"), "errormsg": obj.get("errormsg"), "options": ( - [MenuOption.from_dict(_item) for _item in obj.get("options")] + [MenuOption.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None ), diff --git a/aries_cloudcontroller/models/menu_form.py b/aries_cloudcontroller/models/menu_form.py index bfb2a0ad..1578b3f4 100644 --- a/aries_cloudcontroller/models/menu_form.py +++ b/aries_cloudcontroller/models/menu_form.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.menu_form_param import MenuFormParam from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MenuForm(BaseModel): """ @@ -64,7 +60,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MenuForm from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,9 +74,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in params (list) @@ -93,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MenuForm from a dict""" if obj is None: return None @@ -105,7 +103,7 @@ def from_dict(cls, obj: Dict) -> Self: { "description": obj.get("description"), "params": ( - [MenuFormParam.from_dict(_item) for _item in obj.get("params")] + [MenuFormParam.from_dict(_item) for _item in obj["params"]] if obj.get("params") is not None else None ), diff --git a/aries_cloudcontroller/models/menu_form_param.py b/aries_cloudcontroller/models/menu_form_param.py index 9b2b4c45..7b92a70c 100644 --- a/aries_cloudcontroller/models/menu_form_param.py +++ b/aries_cloudcontroller/models/menu_form_param.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MenuFormParam(BaseModel): """ @@ -67,7 +63,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MenuFormParam from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,15 +77,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MenuFormParam from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/menu_json.py b/aries_cloudcontroller/models/menu_json.py index 5cdb5a90..f548cd8b 100644 --- a/aries_cloudcontroller/models/menu_json.py +++ b/aries_cloudcontroller/models/menu_json.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.menu_option import MenuOption from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MenuJson(BaseModel): """ @@ -55,7 +51,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MenuJson from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,9 +65,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in options (list) @@ -84,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MenuJson from a dict""" if obj is None: return None @@ -97,7 +95,7 @@ def from_dict(cls, obj: Dict) -> Self: "description": obj.get("description"), "errormsg": obj.get("errormsg"), "options": ( - [MenuOption.from_dict(_item) for _item in obj.get("options")] + [MenuOption.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None ), diff --git a/aries_cloudcontroller/models/menu_option.py b/aries_cloudcontroller/models/menu_option.py index 09f39ceb..91c48696 100644 --- a/aries_cloudcontroller/models/menu_option.py +++ b/aries_cloudcontroller/models/menu_option.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.menu_form import MenuForm from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class MenuOption(BaseModel): """ @@ -62,7 +58,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MenuOption from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,9 +72,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of form @@ -87,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MenuOption from a dict""" if obj is None: return None @@ -100,7 +98,7 @@ def from_dict(cls, obj: Dict) -> Self: "description": obj.get("description"), "disabled": obj.get("disabled"), "form": ( - MenuForm.from_dict(obj.get("form")) + MenuForm.from_dict(obj["form"]) if obj.get("form") is not None else None ), diff --git a/aries_cloudcontroller/models/model_date.py b/aries_cloudcontroller/models/model_date.py index 979834e2..e5a874ca 100644 --- a/aries_cloudcontroller/models/model_date.py +++ b/aries_cloudcontroller/models/model_date.py @@ -17,17 +17,13 @@ import json import pprint from datetime import datetime -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ModelDate(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ModelDate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ModelDate from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/model_schema.py b/aries_cloudcontroller/models/model_schema.py index 792a2815..561bd5f2 100644 --- a/aries_cloudcontroller/models/model_schema.py +++ b/aries_cloudcontroller/models/model_schema.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ModelSchema(BaseModel): """ @@ -106,7 +101,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ModelSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -120,15 +115,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ModelSchema from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/oob_record.py b/aries_cloudcontroller/models/oob_record.py index 479ee9ca..a4fd07cf 100644 --- a/aries_cloudcontroller/models/oob_record.py +++ b/aries_cloudcontroller/models/oob_record.py @@ -17,20 +17,15 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.invitation_message import InvitationMessage from aries_cloudcontroller.models.service_decorator import ServiceDecorator from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class OobRecord(BaseModel): """ @@ -47,7 +42,7 @@ class OobRecord(BaseModel): default=None, description="Time of record creation" ) invi_msg_id: StrictStr = Field(description="Invitation message identifier") - invitation: InvitationMessage + invitation: InvitationMessage = Field(description="Out of band invitation message") oob_id: StrictStr = Field(description="Oob record identifier") our_recipient_key: Optional[StrictStr] = Field( default=None, description="Recipient key used for oob invitation" @@ -98,21 +93,23 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("sender", "receiver"): + if value not in set(["sender", "receiver"]): raise ValueError("must be one of enum values ('sender', 'receiver')") return value @field_validator("state") def state_validate_enum(cls, value): """Validates the enum""" - if value not in ( - "initial", - "prepare-response", - "await-response", - "reuse-not-accepted", - "reuse-accepted", - "done", - "deleted", + if value not in set( + [ + "initial", + "prepare-response", + "await-response", + "reuse-not-accepted", + "reuse-accepted", + "done", + "deleted", + ] ): raise ValueError( "must be one of enum values ('initial', 'prepare-response', 'await-response', 'reuse-not-accepted', 'reuse-accepted', 'done', 'deleted')" @@ -145,7 +142,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OobRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -159,9 +156,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of invitation @@ -173,7 +172,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OobRecord from a dict""" if obj is None: return None @@ -188,7 +187,7 @@ def from_dict(cls, obj: Dict) -> Self: "created_at": obj.get("created_at"), "invi_msg_id": obj.get("invi_msg_id"), "invitation": ( - InvitationMessage.from_dict(obj.get("invitation")) + InvitationMessage.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None ), @@ -197,7 +196,7 @@ def from_dict(cls, obj: Dict) -> Self: "role": obj.get("role"), "state": obj.get("state"), "their_service": ( - ServiceDecorator.from_dict(obj.get("their_service")) + ServiceDecorator.from_dict(obj["their_service"]) if obj.get("their_service") is not None else None ), diff --git a/aries_cloudcontroller/models/perform_request.py b/aries_cloudcontroller/models/perform_request.py index 7127a45e..3c2a04a9 100644 --- a/aries_cloudcontroller/models/perform_request.py +++ b/aries_cloudcontroller/models/perform_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PerformRequest(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PerformRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PerformRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/ping_request.py b/aries_cloudcontroller/models/ping_request.py index 2be322f6..18fa9196 100644 --- a/aries_cloudcontroller/models/ping_request.py +++ b/aries_cloudcontroller/models/ping_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PingRequest(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PingRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,9 +59,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if comment (nullable) is None @@ -76,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PingRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/ping_request_response.py b/aries_cloudcontroller/models/ping_request_response.py index b4625c94..e922755a 100644 --- a/aries_cloudcontroller/models/ping_request_response.py +++ b/aries_cloudcontroller/models/ping_request_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PingRequestResponse(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PingRequestResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PingRequestResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/presentation_definition.py b/aries_cloudcontroller/models/presentation_definition.py index d9dd441f..99208e72 100644 --- a/aries_cloudcontroller/models/presentation_definition.py +++ b/aries_cloudcontroller/models/presentation_definition.py @@ -17,21 +17,16 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.claim_format import ClaimFormat from aries_cloudcontroller.models.input_descriptors import InputDescriptors from aries_cloudcontroller.models.submission_requirements import SubmissionRequirements from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PresentationDefinition(BaseModel): """ @@ -87,7 +82,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PresentationDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -101,9 +96,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of format @@ -126,7 +123,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PresentationDefinition from a dict""" if obj is None: return None @@ -137,7 +134,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "format": ( - ClaimFormat.from_dict(obj.get("format")) + ClaimFormat.from_dict(obj["format"]) if obj.get("format") is not None else None ), @@ -145,7 +142,7 @@ def from_dict(cls, obj: Dict) -> Self: "input_descriptors": ( [ InputDescriptors.from_dict(_item) - for _item in obj.get("input_descriptors") + for _item in obj["input_descriptors"] ] if obj.get("input_descriptors") is not None else None @@ -155,7 +152,7 @@ def from_dict(cls, obj: Dict) -> Self: "submission_requirements": ( [ SubmissionRequirements.from_dict(_item) - for _item in obj.get("submission_requirements") + for _item in obj["submission_requirements"] ] if obj.get("submission_requirements") is not None else None diff --git a/aries_cloudcontroller/models/presentation_proposal.py b/aries_cloudcontroller/models/presentation_proposal.py index 8aa8e7e8..d76d10c2 100644 --- a/aries_cloudcontroller/models/presentation_proposal.py +++ b/aries_cloudcontroller/models/presentation_proposal.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_pres_preview import IndyPresPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PresentationProposal(BaseModel): """ @@ -62,7 +58,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PresentationProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,11 +73,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation_proposal @@ -95,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PresentationProposal from a dict""" if obj is None: return None @@ -109,7 +109,7 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "presentation_proposal": ( - IndyPresPreview.from_dict(obj.get("presentation_proposal")) + IndyPresPreview.from_dict(obj["presentation_proposal"]) if obj.get("presentation_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/presentation_request.py b/aries_cloudcontroller/models/presentation_request.py index ce9f14b0..ec626f19 100644 --- a/aries_cloudcontroller/models/presentation_request.py +++ b/aries_cloudcontroller/models/presentation_request.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PresentationRequest(BaseModel): """ @@ -64,7 +60,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PresentationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,11 +75,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in request_presentationsattach (list) @@ -101,7 +101,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PresentationRequest from a dict""" if obj is None: return None @@ -117,7 +117,7 @@ def from_dict(cls, obj: Dict) -> Self: "request_presentations~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("request_presentations~attach") + for _item in obj["request_presentations~attach"] ] if obj.get("request_presentations~attach") is not None else None diff --git a/aries_cloudcontroller/models/profile_settings.py b/aries_cloudcontroller/models/profile_settings.py index 1ca11c4c..29efcca1 100644 --- a/aries_cloudcontroller/models/profile_settings.py +++ b/aries_cloudcontroller/models/profile_settings.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ProfileSettings(BaseModel): """ ProfileSettings """ # noqa: E501 - settings: Optional[Union[str, Any]] = Field( + settings: Optional[Dict[str, Any]] = Field( default=None, description="Profile settings dict" ) __properties: ClassVar[List[str]] = ["settings"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ProfileSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ProfileSettings from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/protocol_descriptor.py b/aries_cloudcontroller/models/protocol_descriptor.py index 077165ed..2a754e21 100644 --- a/aries_cloudcontroller/models/protocol_descriptor.py +++ b/aries_cloudcontroller/models/protocol_descriptor.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ProtocolDescriptor(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ProtocolDescriptor from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if roles (nullable) is None @@ -75,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ProtocolDescriptor from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/publish_revocations.py b/aries_cloudcontroller/models/publish_revocations.py index 7f847cc1..4457c14f 100644 --- a/aries_cloudcontroller/models/publish_revocations.py +++ b/aries_cloudcontroller/models/publish_revocations.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class PublishRevocations(BaseModel): """ @@ -50,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PublishRevocations from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PublishRevocations from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/queries.py b/aries_cloudcontroller/models/queries.py index 8c6c0bf6..6a3e5981 100644 --- a/aries_cloudcontroller/models/queries.py +++ b/aries_cloudcontroller/models/queries.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.query_item import QueryItem from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Queries(BaseModel): """ @@ -54,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Queries from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,11 +65,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in queries (list) @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Queries from a dict""" if obj is None: return None @@ -99,7 +99,7 @@ def from_dict(cls, obj: Dict) -> Self: "@id": obj.get("@id"), "@type": obj.get("@type"), "queries": ( - [QueryItem.from_dict(_item) for _item in obj.get("queries")] + [QueryItem.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None ), diff --git a/aries_cloudcontroller/models/query.py b/aries_cloudcontroller/models/query.py index c1acb88a..c9e983d7 100644 --- a/aries_cloudcontroller/models/query.py +++ b/aries_cloudcontroller/models/query.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class Query(BaseModel): """ @@ -54,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Query from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,11 +65,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if comment (nullable) is None @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Query from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/query_item.py b/aries_cloudcontroller/models/query_item.py index 31272d61..feb42648 100644 --- a/aries_cloudcontroller/models/query_item.py +++ b/aries_cloudcontroller/models/query_item.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class QueryItem(BaseModel): """ @@ -40,7 +36,7 @@ class QueryItem(BaseModel): @field_validator("feature_type") def feature_type_validate_enum(cls, value): """Validates the enum""" - if value not in ("protocol", "goal-code"): + if value not in set(["protocol", "goal-code"]): raise ValueError("must be one of enum values ('protocol', 'goal-code')") return value @@ -55,7 +51,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of QueryItem from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,15 +65,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of QueryItem from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/raw_encoded.py b/aries_cloudcontroller/models/raw_encoded.py index 04735d5b..d5496a71 100644 --- a/aries_cloudcontroller/models/raw_encoded.py +++ b/aries_cloudcontroller/models/raw_encoded.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RawEncoded(BaseModel): """ @@ -62,7 +57,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RawEncoded from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,15 +71,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RawEncoded from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/receive_invitation_request.py b/aries_cloudcontroller/models/receive_invitation_request.py index 156461f6..7889d63f 100644 --- a/aries_cloudcontroller/models/receive_invitation_request.py +++ b/aries_cloudcontroller/models/receive_invitation_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ReceiveInvitationRequest(BaseModel): """ @@ -100,7 +95,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ReceiveInvitationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,11 +110,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if image_url (nullable) is None @@ -130,7 +129,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ReceiveInvitationRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/remove_wallet_request.py b/aries_cloudcontroller/models/remove_wallet_request.py index 4ef1caf2..927e5f52 100644 --- a/aries_cloudcontroller/models/remove_wallet_request.py +++ b/aries_cloudcontroller/models/remove_wallet_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RemoveWalletRequest(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RemoveWalletRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RemoveWalletRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/resolution_result.py b/aries_cloudcontroller/models/resolution_result.py index bcbefd21..d38919a1 100644 --- a/aries_cloudcontroller/models/resolution_result.py +++ b/aries_cloudcontroller/models/resolution_result.py @@ -16,25 +16,21 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ResolutionResult(BaseModel): """ ResolutionResult """ # noqa: E501 - did_document: Union[str, Any] = Field(description="DID Document") - metadata: Union[str, Any] = Field(description="Resolution metadata") + did_document: Dict[str, Any] = Field(description="DID Document") + metadata: Dict[str, Any] = Field(description="Resolution metadata") __properties: ClassVar[List[str]] = ["did_document", "metadata"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ResolutionResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ResolutionResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/rev_reg_create_request.py b/aries_cloudcontroller/models/rev_reg_create_request.py index 721a6798..ea210ac6 100644 --- a/aries_cloudcontroller/models/rev_reg_create_request.py +++ b/aries_cloudcontroller/models/rev_reg_create_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevRegCreateRequest(BaseModel): """ @@ -69,7 +64,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevRegCreateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,15 +78,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevRegCreateRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/rev_reg_issued_result.py b/aries_cloudcontroller/models/rev_reg_issued_result.py index 0ff945a6..a8018fb1 100644 --- a/aries_cloudcontroller/models/rev_reg_issued_result.py +++ b/aries_cloudcontroller/models/rev_reg_issued_result.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevRegIssuedResult(BaseModel): """ @@ -51,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevRegIssuedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevRegIssuedResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/rev_reg_result.py b/aries_cloudcontroller/models/rev_reg_result.py index 3f6d728b..c3773262 100644 --- a/aries_cloudcontroller/models/rev_reg_result.py +++ b/aries_cloudcontroller/models/rev_reg_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.issuer_rev_reg_record import IssuerRevRegRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevRegResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevRegResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevRegResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "result": ( - IssuerRevRegRecord.from_dict(obj.get("result")) + IssuerRevRegRecord.from_dict(obj["result"]) if obj.get("result") is not None else None ) diff --git a/aries_cloudcontroller/models/rev_reg_update_tails_file_uri.py b/aries_cloudcontroller/models/rev_reg_update_tails_file_uri.py index 792953ad..da1cc386 100644 --- a/aries_cloudcontroller/models/rev_reg_update_tails_file_uri.py +++ b/aries_cloudcontroller/models/rev_reg_update_tails_file_uri.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevRegUpdateTailsFileUri(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevRegUpdateTailsFileUri from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevRegUpdateTailsFileUri from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/rev_reg_wallet_updated_result.py b/aries_cloudcontroller/models/rev_reg_wallet_updated_result.py index 399b0772..299c104f 100644 --- a/aries_cloudcontroller/models/rev_reg_wallet_updated_result.py +++ b/aries_cloudcontroller/models/rev_reg_wallet_updated_result.py @@ -16,30 +16,26 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevRegWalletUpdatedResult(BaseModel): """ RevRegWalletUpdatedResult """ # noqa: E501 - accum_calculated: Optional[Union[str, Any]] = Field( + accum_calculated: Optional[Dict[str, Any]] = Field( default=None, description="Calculated accumulator for phantom revocations" ) - accum_fixed: Optional[Union[str, Any]] = Field( + accum_fixed: Optional[Dict[str, Any]] = Field( default=None, description="Applied ledger transaction to fix revocations" ) - rev_reg_delta: Optional[Union[str, Any]] = Field( + rev_reg_delta: Optional[Dict[str, Any]] = Field( default=None, description="Indy revocation registry delta" ) __properties: ClassVar[List[str]] = [ @@ -59,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevRegWalletUpdatedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevRegWalletUpdatedResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/rev_regs_created.py b/aries_cloudcontroller/models/rev_regs_created.py index 9d169419..aab74fa1 100644 --- a/aries_cloudcontroller/models/rev_regs_created.py +++ b/aries_cloudcontroller/models/rev_regs_created.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevRegsCreated(BaseModel): """ @@ -48,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevRegsCreated from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevRegsCreated from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/revoke_request.py b/aries_cloudcontroller/models/revoke_request.py index e5e6980b..7ac0b6b6 100644 --- a/aries_cloudcontroller/models/revoke_request.py +++ b/aries_cloudcontroller/models/revoke_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RevokeRequest(BaseModel): """ @@ -125,7 +120,7 @@ def notify_version_validate_enum(cls, value): if value is None: return value - if value not in ("v1_0", "v2_0"): + if value not in set(["v1_0", "v2_0"]): raise ValueError("must be one of enum values ('v1_0', 'v2_0')") return value @@ -155,7 +150,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RevokeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -169,15 +164,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RevokeRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/route_record.py b/aries_cloudcontroller/models/route_record.py index 365413c4..cdeac35a 100644 --- a/aries_cloudcontroller/models/route_record.py +++ b/aries_cloudcontroller/models/route_record.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class RouteRecord(BaseModel): """ @@ -99,7 +94,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RouteRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -113,15 +108,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RouteRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/schema_get_result.py b/aries_cloudcontroller/models/schema_get_result.py index e38182f0..7d6834eb 100644 --- a/aries_cloudcontroller/models/schema_get_result.py +++ b/aries_cloudcontroller/models/schema_get_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.model_schema import ModelSchema from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SchemaGetResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SchemaGetResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of var_schema @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SchemaGetResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "schema": ( - ModelSchema.from_dict(obj.get("schema")) + ModelSchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None ) diff --git a/aries_cloudcontroller/models/schema_input_descriptor.py b/aries_cloudcontroller/models/schema_input_descriptor.py index a472c9f1..0a334312 100644 --- a/aries_cloudcontroller/models/schema_input_descriptor.py +++ b/aries_cloudcontroller/models/schema_input_descriptor.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SchemaInputDescriptor(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SchemaInputDescriptor from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SchemaInputDescriptor from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/schema_send_request.py b/aries_cloudcontroller/models/schema_send_request.py index ab18c2b7..edeb0b8c 100644 --- a/aries_cloudcontroller/models/schema_send_request.py +++ b/aries_cloudcontroller/models/schema_send_request.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SchemaSendRequest(BaseModel): """ @@ -60,7 +55,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SchemaSendRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +69,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SchemaSendRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/schema_send_result.py b/aries_cloudcontroller/models/schema_send_result.py index b0e6c67a..f174a7aa 100644 --- a/aries_cloudcontroller/models/schema_send_result.py +++ b/aries_cloudcontroller/models/schema_send_result.py @@ -17,26 +17,23 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.model_schema import ModelSchema from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SchemaSendResult(BaseModel): """ SchemaSendResult """ # noqa: E501 - var_schema: Optional[ModelSchema] = Field(default=None, alias="schema") + var_schema: Optional[ModelSchema] = Field( + default=None, description="Schema definition", alias="schema" + ) schema_id: Annotated[str, Field(strict=True)] = Field( description="Schema identifier" ) @@ -65,7 +62,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SchemaSendResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,9 +76,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of var_schema @@ -90,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SchemaSendResult from a dict""" if obj is None: return None @@ -101,7 +100,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "schema": ( - ModelSchema.from_dict(obj.get("schema")) + ModelSchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None ), diff --git a/aries_cloudcontroller/models/schemas_created_result.py b/aries_cloudcontroller/models/schemas_created_result.py index 450fa414..87ad5192 100644 --- a/aries_cloudcontroller/models/schemas_created_result.py +++ b/aries_cloudcontroller/models/schemas_created_result.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SchemasCreatedResult(BaseModel): """ @@ -48,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SchemasCreatedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SchemasCreatedResult from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/schemas_input_descriptor_filter.py b/aries_cloudcontroller/models/schemas_input_descriptor_filter.py index e6432a68..eb43c1ab 100644 --- a/aries_cloudcontroller/models/schemas_input_descriptor_filter.py +++ b/aries_cloudcontroller/models/schemas_input_descriptor_filter.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.models.schema_input_descriptor import SchemaInputDescriptor from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SchemasInputDescriptorFilter(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SchemasInputDescriptorFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,9 +59,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in uri_groups (list of list) @@ -84,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SchemasInputDescriptorFilter from a dict""" if obj is None: return None @@ -101,7 +99,7 @@ def from_dict(cls, obj: Dict) -> Self: SchemaInputDescriptor.from_dict(_inner_item) for _inner_item in _item ] - for _item in obj.get("uri_groups") + for _item in obj["uri_groups"] ] if obj.get("uri_groups") is not None else None diff --git a/aries_cloudcontroller/models/sdjws_create.py b/aries_cloudcontroller/models/sdjws_create.py index 4b30fd6b..83b4ccf8 100644 --- a/aries_cloudcontroller/models/sdjws_create.py +++ b/aries_cloudcontroller/models/sdjws_create.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SDJWSCreate(BaseModel): """ @@ -38,9 +33,9 @@ class SDJWSCreate(BaseModel): did: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="DID of interest" ) - headers: Optional[Union[str, Any]] = None + headers: Optional[Dict[str, Any]] = None non_sd_list: Optional[List[Annotated[str, Field(strict=True)]]] = None - payload: Union[str, Any] + payload: Dict[str, Any] verification_method: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Information used for proof verification", @@ -92,7 +87,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SDJWSCreate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -106,15 +101,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SDJWSCreate from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/sdjws_verify.py b/aries_cloudcontroller/models/sdjws_verify.py index 31d7893e..18cc5e8b 100644 --- a/aries_cloudcontroller/models/sdjws_verify.py +++ b/aries_cloudcontroller/models/sdjws_verify.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SDJWSVerify(BaseModel): """ @@ -64,7 +59,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SDJWSVerify from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,15 +73,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SDJWSVerify from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/sdjws_verify_response.py b/aries_cloudcontroller/models/sdjws_verify_response.py index 4728252c..7dd9fb74 100644 --- a/aries_cloudcontroller/models/sdjws_verify_response.py +++ b/aries_cloudcontroller/models/sdjws_verify_response.py @@ -16,30 +16,26 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SDJWSVerifyResponse(BaseModel): """ SDJWSVerifyResponse """ # noqa: E501 - disclosures: Optional[List[List[Union[str, Any]]]] = Field( + disclosures: Optional[List[List[Union[str, Dict[str, Any]]]]] = Field( default=None, description="Disclosure arrays associated with the SD-JWT" ) error: Optional[StrictStr] = Field(default=None, description="Error text") - headers: Union[str, Any] = Field(description="Headers from verified JWT.") + headers: Dict[str, Any] = Field(description="Headers from verified JWT.") kid: StrictStr = Field(description="kid of signer") - payload: Union[str, Any] = Field(description="Payload from verified JWT") + payload: Dict[str, Any] = Field(description="Payload from verified JWT") valid: StrictBool __properties: ClassVar[List[str]] = [ "disclosures", @@ -61,7 +57,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SDJWSVerifyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,15 +71,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SDJWSVerifyResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/send_menu.py b/aries_cloudcontroller/models/send_menu.py index 024f32ca..c3edcd94 100644 --- a/aries_cloudcontroller/models/send_menu.py +++ b/aries_cloudcontroller/models/send_menu.py @@ -16,25 +16,21 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.menu_json import MenuJson from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SendMenu(BaseModel): """ SendMenu """ # noqa: E501 - menu: MenuJson + menu: MenuJson = Field(description="Menu to send to connection") __properties: ClassVar[List[str]] = ["menu"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SendMenu from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of menu @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SendMenu from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "menu": ( - MenuJson.from_dict(obj.get("menu")) + MenuJson.from_dict(obj["menu"]) if obj.get("menu") is not None else None ) diff --git a/aries_cloudcontroller/models/send_message.py b/aries_cloudcontroller/models/send_message.py index deb784c2..e85077f9 100644 --- a/aries_cloudcontroller/models/send_message.py +++ b/aries_cloudcontroller/models/send_message.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SendMessage(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SendMessage from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SendMessage from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/service_decorator.py b/aries_cloudcontroller/models/service_decorator.py index 7774ce38..4c0db4e0 100644 --- a/aries_cloudcontroller/models/service_decorator.py +++ b/aries_cloudcontroller/models/service_decorator.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class ServiceDecorator(BaseModel): """ @@ -62,7 +57,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ServiceDecorator from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,15 +71,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ServiceDecorator from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/sign_request.py b/aries_cloudcontroller/models/sign_request.py index 1263221e..09fb155c 100644 --- a/aries_cloudcontroller/models/sign_request.py +++ b/aries_cloudcontroller/models/sign_request.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.doc import Doc from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SignRequest(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SignRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,9 +59,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of doc @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SignRequest from a dict""" if obj is None: return None @@ -85,9 +83,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "doc": ( - Doc.from_dict(obj.get("doc")) - if obj.get("doc") is not None - else None + Doc.from_dict(obj["doc"]) if obj.get("doc") is not None else None ), "verkey": obj.get("verkey"), } diff --git a/aries_cloudcontroller/models/sign_response.py b/aries_cloudcontroller/models/sign_response.py index e4ef0007..327d49ed 100644 --- a/aries_cloudcontroller/models/sign_response.py +++ b/aries_cloudcontroller/models/sign_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SignResponse(BaseModel): """ @@ -34,7 +30,7 @@ class SignResponse(BaseModel): """ # noqa: E501 error: Optional[StrictStr] = Field(default=None, description="Error text") - signed_doc: Optional[Union[str, Any]] = Field( + signed_doc: Optional[Dict[str, Any]] = Field( default=None, description="Signed document" ) __properties: ClassVar[List[str]] = ["error", "signed_doc"] @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SignResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SignResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/signature_options.py b/aries_cloudcontroller/models/signature_options.py index 930f37e9..ab538d0f 100644 --- a/aries_cloudcontroller/models/signature_options.py +++ b/aries_cloudcontroller/models/signature_options.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SignatureOptions(BaseModel): """ @@ -57,7 +53,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SignatureOptions from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,15 +67,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SignatureOptions from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/signed_doc.py b/aries_cloudcontroller/models/signed_doc.py index b745852f..7d66c127 100644 --- a/aries_cloudcontroller/models/signed_doc.py +++ b/aries_cloudcontroller/models/signed_doc.py @@ -16,25 +16,21 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.signature_options import SignatureOptions from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SignedDoc(BaseModel): """ SignedDoc """ # noqa: E501 - proof: SignatureOptions + proof: SignatureOptions = Field(description="Linked data proof") __properties: ClassVar[List[str]] = ["proof"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SignedDoc from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of proof @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SignedDoc from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "proof": ( - SignatureOptions.from_dict(obj.get("proof")) + SignatureOptions.from_dict(obj["proof"]) if obj.get("proof") is not None else None ) diff --git a/aries_cloudcontroller/models/submission_requirements.py b/aries_cloudcontroller/models/submission_requirements.py index e14f96d1..ce43386d 100644 --- a/aries_cloudcontroller/models/submission_requirements.py +++ b/aries_cloudcontroller/models/submission_requirements.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class SubmissionRequirements(BaseModel): """ @@ -60,7 +56,7 @@ def rule_validate_enum(cls, value): if value is None: return value - if value not in ("all", "pick"): + if value not in set(["all", "pick"]): raise ValueError("must be one of enum values ('all', 'pick')") return value @@ -75,7 +71,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SubmissionRequirements from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,9 +85,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in from_nested (list) @@ -104,7 +102,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SubmissionRequirements from a dict""" if obj is None: return None @@ -119,7 +117,7 @@ def from_dict(cls, obj: Dict) -> Self: "from_nested": ( [ SubmissionRequirements.from_dict(_item) - for _item in obj.get("from_nested") + for _item in obj["from_nested"] ] if obj.get("from_nested") is not None else None diff --git a/aries_cloudcontroller/models/taa_accept.py b/aries_cloudcontroller/models/taa_accept.py index c970dab8..49c374e8 100644 --- a/aries_cloudcontroller/models/taa_accept.py +++ b/aries_cloudcontroller/models/taa_accept.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TAAAccept(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TAAAccept from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TAAAccept from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/taa_acceptance.py b/aries_cloudcontroller/models/taa_acceptance.py index dd208386..267f34f7 100644 --- a/aries_cloudcontroller/models/taa_acceptance.py +++ b/aries_cloudcontroller/models/taa_acceptance.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TAAAcceptance(BaseModel): """ @@ -51,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TAAAcceptance from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TAAAcceptance from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/taa_info.py b/aries_cloudcontroller/models/taa_info.py index 2400d847..edfe3a20 100644 --- a/aries_cloudcontroller/models/taa_info.py +++ b/aries_cloudcontroller/models/taa_info.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictBool +from typing_extensions import Self from aries_cloudcontroller.models.aml_record import AMLRecord from aries_cloudcontroller.models.taa_acceptance import TAAAcceptance from aries_cloudcontroller.models.taa_record import TAARecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TAAInfo(BaseModel): """ @@ -58,7 +54,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TAAInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,9 +68,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of aml_record @@ -89,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TAAInfo from a dict""" if obj is None: return None @@ -100,17 +98,17 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "aml_record": ( - AMLRecord.from_dict(obj.get("aml_record")) + AMLRecord.from_dict(obj["aml_record"]) if obj.get("aml_record") is not None else None ), "taa_accepted": ( - TAAAcceptance.from_dict(obj.get("taa_accepted")) + TAAAcceptance.from_dict(obj["taa_accepted"]) if obj.get("taa_accepted") is not None else None ), "taa_record": ( - TAARecord.from_dict(obj.get("taa_record")) + TAARecord.from_dict(obj["taa_record"]) if obj.get("taa_record") is not None else None ), diff --git a/aries_cloudcontroller/models/taa_record.py b/aries_cloudcontroller/models/taa_record.py index f9cf7f96..de6bc854 100644 --- a/aries_cloudcontroller/models/taa_record.py +++ b/aries_cloudcontroller/models/taa_record.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TAARecord(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TAARecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TAARecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/taa_result.py b/aries_cloudcontroller/models/taa_result.py index 9548cc95..b1a287fb 100644 --- a/aries_cloudcontroller/models/taa_result.py +++ b/aries_cloudcontroller/models/taa_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.taa_info import TAAInfo from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TAAResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TAAResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -73,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TAAResult from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "result": ( - TAAInfo.from_dict(obj.get("result")) + TAAInfo.from_dict(obj["result"]) if obj.get("result") is not None else None ) diff --git a/aries_cloudcontroller/models/tails_delete_response.py b/aries_cloudcontroller/models/tails_delete_response.py index 2bb0f2d8..94b3c3b7 100644 --- a/aries_cloudcontroller/models/tails_delete_response.py +++ b/aries_cloudcontroller/models/tails_delete_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TailsDeleteResponse(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TailsDeleteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TailsDeleteResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/transaction_jobs.py b/aries_cloudcontroller/models/transaction_jobs.py index 46f887d1..5ba3ca6c 100644 --- a/aries_cloudcontroller/models/transaction_jobs.py +++ b/aries_cloudcontroller/models/transaction_jobs.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TransactionJobs(BaseModel): """ @@ -47,7 +43,7 @@ def transaction_my_job_validate_enum(cls, value): if value is None: return value - if value not in ("TRANSACTION_AUTHOR", "TRANSACTION_ENDORSER", "reset"): + if value not in set(["TRANSACTION_AUTHOR", "TRANSACTION_ENDORSER", "reset"]): raise ValueError( "must be one of enum values ('TRANSACTION_AUTHOR', 'TRANSACTION_ENDORSER', 'reset')" ) @@ -59,7 +55,7 @@ def transaction_their_job_validate_enum(cls, value): if value is None: return value - if value not in ("TRANSACTION_AUTHOR", "TRANSACTION_ENDORSER", "reset"): + if value not in set(["TRANSACTION_AUTHOR", "TRANSACTION_ENDORSER", "reset"]): raise ValueError( "must be one of enum values ('TRANSACTION_AUTHOR', 'TRANSACTION_ENDORSER', 'reset')" ) @@ -76,7 +72,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransactionJobs from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -90,15 +86,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransactionJobs from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/transaction_list.py b/aries_cloudcontroller/models/transaction_list.py index 0a8748fd..f97e619b 100644 --- a/aries_cloudcontroller/models/transaction_list.py +++ b/aries_cloudcontroller/models/transaction_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.transaction_record import TransactionRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TransactionList(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransactionList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransactionList from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [TransactionRecord.from_dict(_item) for _item in obj.get("results")] + [TransactionRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/transaction_record.py b/aries_cloudcontroller/models/transaction_record.py index f28d6763..dfab7c48 100644 --- a/aries_cloudcontroller/models/transaction_record.py +++ b/aries_cloudcontroller/models/transaction_record.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TransactionRecord(BaseModel): """ @@ -50,15 +45,15 @@ class TransactionRecord(BaseModel): description="If True, Endorser will write the transaction after endorsing it", ) formats: Optional[List[Dict[str, StrictStr]]] = None - messages_attach: Optional[List[Union[str, Any]]] = None - meta_data: Optional[Union[str, Any]] = None - signature_request: Optional[List[Union[str, Any]]] = None - signature_response: Optional[List[Union[str, Any]]] = None + messages_attach: Optional[List[Dict[str, Any]]] = None + meta_data: Optional[Dict[str, Any]] = None + signature_request: Optional[List[Dict[str, Any]]] = None + signature_response: Optional[List[Dict[str, Any]]] = None state: Optional[StrictStr] = Field(default=None, description="Current record state") thread_id: Optional[StrictStr] = Field( default=None, description="Thread Identifier" ) - timing: Optional[Union[str, Any]] = None + timing: Optional[Dict[str, Any]] = None trace: Optional[StrictBool] = Field( default=None, description="Record trace information, based on agent configuration", @@ -128,7 +123,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransactionRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -142,15 +137,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransactionRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/txn_or_credential_definition_send_result.py b/aries_cloudcontroller/models/txn_or_credential_definition_send_result.py index c54dcb2e..99543a1d 100644 --- a/aries_cloudcontroller/models/txn_or_credential_definition_send_result.py +++ b/aries_cloudcontroller/models/txn_or_credential_definition_send_result.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.credential_definition_send_result import ( CredentialDefinitionSendResult, @@ -26,11 +27,6 @@ from aries_cloudcontroller.models.transaction_record import TransactionRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TxnOrCredentialDefinitionSendResult(BaseModel): """ @@ -38,7 +34,9 @@ class TxnOrCredentialDefinitionSendResult(BaseModel): """ # noqa: E501 sent: Optional[CredentialDefinitionSendResult] = None - txn: Optional[TransactionRecord] = None + txn: Optional[TransactionRecord] = Field( + default=None, description="Credential definition transaction to endorse" + ) __properties: ClassVar[List[str]] = ["sent", "txn"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -52,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TxnOrCredentialDefinitionSendResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sent @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TxnOrCredentialDefinitionSendResult from a dict""" if obj is None: return None @@ -91,12 +91,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "sent": ( - CredentialDefinitionSendResult.from_dict(obj.get("sent")) + CredentialDefinitionSendResult.from_dict(obj["sent"]) if obj.get("sent") is not None else None ), "txn": ( - TransactionRecord.from_dict(obj.get("txn")) + TransactionRecord.from_dict(obj["txn"]) if obj.get("txn") is not None else None ), diff --git a/aries_cloudcontroller/models/txn_or_publish_revocations_result.py b/aries_cloudcontroller/models/txn_or_publish_revocations_result.py index c1deeec7..26240c06 100644 --- a/aries_cloudcontroller/models/txn_or_publish_revocations_result.py +++ b/aries_cloudcontroller/models/txn_or_publish_revocations_result.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.publish_revocations import PublishRevocations from aries_cloudcontroller.models.transaction_record import TransactionRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TxnOrPublishRevocationsResult(BaseModel): """ @@ -36,7 +32,10 @@ class TxnOrPublishRevocationsResult(BaseModel): """ # noqa: E501 sent: Optional[PublishRevocations] = None - txn: Optional[TransactionRecord] = None + txn: Optional[TransactionRecord] = Field( + default=None, + description="Revocation registry revocations transaction to endorse", + ) __properties: ClassVar[List[str]] = ["sent", "txn"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +49,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TxnOrPublishRevocationsResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sent @@ -78,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TxnOrPublishRevocationsResult from a dict""" if obj is None: return None @@ -89,12 +90,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "sent": ( - PublishRevocations.from_dict(obj.get("sent")) + PublishRevocations.from_dict(obj["sent"]) if obj.get("sent") is not None else None ), "txn": ( - TransactionRecord.from_dict(obj.get("txn")) + TransactionRecord.from_dict(obj["txn"]) if obj.get("txn") is not None else None ), diff --git a/aries_cloudcontroller/models/txn_or_register_ledger_nym_response.py b/aries_cloudcontroller/models/txn_or_register_ledger_nym_response.py index 5a03f0b2..4aa15757 100644 --- a/aries_cloudcontroller/models/txn_or_register_ledger_nym_response.py +++ b/aries_cloudcontroller/models/txn_or_register_ledger_nym_response.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.models.transaction_record import TransactionRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TxnOrRegisterLedgerNymResponse(BaseModel): """ @@ -37,7 +33,9 @@ class TxnOrRegisterLedgerNymResponse(BaseModel): success: Optional[StrictBool] = Field( default=None, description="Success of nym registration operation" ) - txn: Optional[TransactionRecord] = None + txn: Optional[TransactionRecord] = Field( + default=None, description="DID transaction to endorse" + ) __properties: ClassVar[List[str]] = ["success", "txn"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -51,7 +49,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TxnOrRegisterLedgerNymResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of txn @@ -76,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TxnOrRegisterLedgerNymResponse from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: { "success": obj.get("success"), "txn": ( - TransactionRecord.from_dict(obj.get("txn")) + TransactionRecord.from_dict(obj["txn"]) if obj.get("txn") is not None else None ), diff --git a/aries_cloudcontroller/models/txn_or_rev_reg_result.py b/aries_cloudcontroller/models/txn_or_rev_reg_result.py index b2f416c4..e42d0173 100644 --- a/aries_cloudcontroller/models/txn_or_rev_reg_result.py +++ b/aries_cloudcontroller/models/txn_or_rev_reg_result.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.rev_reg_result import RevRegResult from aries_cloudcontroller.models.transaction_record import TransactionRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TxnOrRevRegResult(BaseModel): """ @@ -36,7 +32,10 @@ class TxnOrRevRegResult(BaseModel): """ # noqa: E501 sent: Optional[RevRegResult] = None - txn: Optional[TransactionRecord] = None + txn: Optional[TransactionRecord] = Field( + default=None, + description="Revocation registry definition transaction to endorse", + ) __properties: ClassVar[List[str]] = ["sent", "txn"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +49,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TxnOrRevRegResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sent @@ -78,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TxnOrRevRegResult from a dict""" if obj is None: return None @@ -89,12 +90,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "sent": ( - RevRegResult.from_dict(obj.get("sent")) + RevRegResult.from_dict(obj["sent"]) if obj.get("sent") is not None else None ), "txn": ( - TransactionRecord.from_dict(obj.get("txn")) + TransactionRecord.from_dict(obj["txn"]) if obj.get("txn") is not None else None ), diff --git a/aries_cloudcontroller/models/txn_or_schema_send_result.py b/aries_cloudcontroller/models/txn_or_schema_send_result.py index 371f666b..ddf4e287 100644 --- a/aries_cloudcontroller/models/txn_or_schema_send_result.py +++ b/aries_cloudcontroller/models/txn_or_schema_send_result.py @@ -16,27 +16,25 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.schema_send_result import SchemaSendResult from aries_cloudcontroller.models.transaction_record import TransactionRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class TxnOrSchemaSendResult(BaseModel): """ TxnOrSchemaSendResult """ # noqa: E501 - sent: Optional[SchemaSendResult] = None - txn: Optional[TransactionRecord] = None + sent: Optional[SchemaSendResult] = Field(default=None, description="Content sent") + txn: Optional[TransactionRecord] = Field( + default=None, description="Schema transaction to endorse" + ) __properties: ClassVar[List[str]] = ["sent", "txn"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TxnOrSchemaSendResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +62,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sent @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TxnOrSchemaSendResult from a dict""" if obj is None: return None @@ -89,12 +89,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "sent": ( - SchemaSendResult.from_dict(obj.get("sent")) + SchemaSendResult.from_dict(obj["sent"]) if obj.get("sent") is not None else None ), "txn": ( - TransactionRecord.from_dict(obj.get("txn")) + TransactionRecord.from_dict(obj["txn"]) if obj.get("txn") is not None else None ), diff --git a/aries_cloudcontroller/models/update_profile_settings.py b/aries_cloudcontroller/models/update_profile_settings.py index 0b2eb5e6..c6f721e9 100644 --- a/aries_cloudcontroller/models/update_profile_settings.py +++ b/aries_cloudcontroller/models/update_profile_settings.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class UpdateProfileSettings(BaseModel): """ UpdateProfileSettings """ # noqa: E501 - extra_settings: Optional[Union[str, Any]] = Field( + extra_settings: Optional[Dict[str, Any]] = Field( default=None, description="Agent config key-value pairs" ) __properties: ClassVar[List[str]] = ["extra_settings"] @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateProfileSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateProfileSettings from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/update_wallet_request.py b/aries_cloudcontroller/models/update_wallet_request.py index 4b8e4795..9024f9da 100644 --- a/aries_cloudcontroller/models/update_wallet_request.py +++ b/aries_cloudcontroller/models/update_wallet_request.py @@ -16,24 +16,20 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class UpdateWalletRequest(BaseModel): """ UpdateWalletRequest """ # noqa: E501 - extra_settings: Optional[Union[str, Any]] = Field( + extra_settings: Optional[Dict[str, Any]] = Field( default=None, description="Agent config key-value pairs" ) image_url: Optional[StrictStr] = Field( @@ -65,7 +61,7 @@ def wallet_dispatch_type_validate_enum(cls, value): if value is None: return value - if value not in ("default", "both", "base"): + if value not in set(["default", "both", "base"]): raise ValueError("must be one of enum values ('default', 'both', 'base')") return value @@ -80,7 +76,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateWalletRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -94,15 +90,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateWalletRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v10_credential_bound_offer_request.py b/aries_cloudcontroller/models/v10_credential_bound_offer_request.py index 305173da..f7c3ac11 100644 --- a/aries_cloudcontroller/models/v10_credential_bound_offer_request.py +++ b/aries_cloudcontroller/models/v10_credential_bound_offer_request.py @@ -16,25 +16,23 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.credential_proposal import CredentialProposal from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialBoundOfferRequest(BaseModel): """ V10CredentialBoundOfferRequest """ # noqa: E501 - counter_proposal: Optional[CredentialProposal] = None + counter_proposal: Optional[CredentialProposal] = Field( + default=None, description="Optional counter-proposal" + ) __properties: ClassVar[List[str]] = ["counter_proposal"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialBoundOfferRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of counter_proposal @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialBoundOfferRequest from a dict""" if obj is None: return None @@ -84,7 +84,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "counter_proposal": ( - CredentialProposal.from_dict(obj.get("counter_proposal")) + CredentialProposal.from_dict(obj["counter_proposal"]) if obj.get("counter_proposal") is not None else None ) diff --git a/aries_cloudcontroller/models/v10_credential_conn_free_offer_request.py b/aries_cloudcontroller/models/v10_credential_conn_free_offer_request.py index 39f2638e..9cce6c99 100644 --- a/aries_cloudcontroller/models/v10_credential_conn_free_offer_request.py +++ b/aries_cloudcontroller/models/v10_credential_conn_free_offer_request.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialConnFreeOfferRequest(BaseModel): """ @@ -87,7 +82,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialConnFreeOfferRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -101,9 +96,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -117,7 +114,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialConnFreeOfferRequest from a dict""" if obj is None: return None @@ -132,7 +129,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "cred_def_id": obj.get("cred_def_id"), "credential_preview": ( - CredentialPreview.from_dict(obj.get("credential_preview")) + CredentialPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_credential_create.py b/aries_cloudcontroller/models/v10_credential_create.py index 723e07e7..c52425b3 100644 --- a/aries_cloudcontroller/models/v10_credential_create.py +++ b/aries_cloudcontroller/models/v10_credential_create.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialCreate(BaseModel): """ @@ -158,7 +153,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialCreate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -172,9 +167,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_proposal @@ -188,7 +185,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialCreate from a dict""" if obj is None: return None @@ -202,7 +199,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "cred_def_id": obj.get("cred_def_id"), "credential_proposal": ( - CredentialPreview.from_dict(obj.get("credential_proposal")) + CredentialPreview.from_dict(obj["credential_proposal"]) if obj.get("credential_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_credential_exchange.py b/aries_cloudcontroller/models/v10_credential_exchange.py index 607b1982..a6df098d 100644 --- a/aries_cloudcontroller/models/v10_credential_exchange.py +++ b/aries_cloudcontroller/models/v10_credential_exchange.py @@ -17,10 +17,10 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_offer import CredentialOffer from aries_cloudcontroller.models.credential_proposal import CredentialProposal @@ -30,11 +30,6 @@ from aries_cloudcontroller.models.indy_credential import IndyCredential from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialExchange(BaseModel): """ @@ -59,7 +54,9 @@ class V10CredentialExchange(BaseModel): created_at: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Time of record creation" ) - credential: Optional[IndyCredInfo] = None + credential: Optional[IndyCredInfo] = Field( + default=None, description="Credential as stored" + ) credential_definition_id: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Credential definition identifier" ) @@ -69,11 +66,19 @@ class V10CredentialExchange(BaseModel): credential_id: Optional[StrictStr] = Field( default=None, description="Credential identifier" ) - credential_offer: Optional[IndyCredAbstract] = None - credential_offer_dict: Optional[CredentialOffer] = None - credential_proposal_dict: Optional[CredentialProposal] = None - credential_request: Optional[IndyCredRequest] = None - credential_request_metadata: Optional[Union[str, Any]] = Field( + credential_offer: Optional[IndyCredAbstract] = Field( + default=None, description="(Indy) credential offer" + ) + credential_offer_dict: Optional[CredentialOffer] = Field( + default=None, description="Credential offer message" + ) + credential_proposal_dict: Optional[CredentialProposal] = Field( + default=None, description="Credential proposal message" + ) + credential_request: Optional[IndyCredRequest] = Field( + default=None, description="(Indy) credential request" + ) + credential_request_metadata: Optional[Dict[str, Any]] = Field( default=None, description="(Indy) credential request metadata" ) error_msg: Optional[StrictStr] = Field(default=None, description="Error message") @@ -84,7 +89,10 @@ class V10CredentialExchange(BaseModel): parent_thread_id: Optional[StrictStr] = Field( default=None, description="Parent thread identifier" ) - raw_credential: Optional[IndyCredential] = None + raw_credential: Optional[IndyCredential] = Field( + default=None, + description="Credential as received, prior to storage in holder wallet", + ) revoc_reg_id: Optional[StrictStr] = Field( default=None, description="Revocation registry identifier" ) @@ -175,7 +183,7 @@ def initiator_validate_enum(cls, value): if value is None: return value - if value not in ("self", "external"): + if value not in set(["self", "external"]): raise ValueError("must be one of enum values ('self', 'external')") return value @@ -185,7 +193,7 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("holder", "issuer"): + if value not in set(["holder", "issuer"]): raise ValueError("must be one of enum values ('holder', 'issuer')") return value @@ -230,7 +238,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialExchange from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -244,9 +252,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential @@ -270,7 +280,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialExchange from a dict""" if obj is None: return None @@ -286,7 +296,7 @@ def from_dict(cls, obj: Dict) -> Self: "connection_id": obj.get("connection_id"), "created_at": obj.get("created_at"), "credential": ( - IndyCredInfo.from_dict(obj.get("credential")) + IndyCredInfo.from_dict(obj["credential"]) if obj.get("credential") is not None else None ), @@ -294,22 +304,22 @@ def from_dict(cls, obj: Dict) -> Self: "credential_exchange_id": obj.get("credential_exchange_id"), "credential_id": obj.get("credential_id"), "credential_offer": ( - IndyCredAbstract.from_dict(obj.get("credential_offer")) + IndyCredAbstract.from_dict(obj["credential_offer"]) if obj.get("credential_offer") is not None else None ), "credential_offer_dict": ( - CredentialOffer.from_dict(obj.get("credential_offer_dict")) + CredentialOffer.from_dict(obj["credential_offer_dict"]) if obj.get("credential_offer_dict") is not None else None ), "credential_proposal_dict": ( - CredentialProposal.from_dict(obj.get("credential_proposal_dict")) + CredentialProposal.from_dict(obj["credential_proposal_dict"]) if obj.get("credential_proposal_dict") is not None else None ), "credential_request": ( - IndyCredRequest.from_dict(obj.get("credential_request")) + IndyCredRequest.from_dict(obj["credential_request"]) if obj.get("credential_request") is not None else None ), @@ -318,7 +328,7 @@ def from_dict(cls, obj: Dict) -> Self: "initiator": obj.get("initiator"), "parent_thread_id": obj.get("parent_thread_id"), "raw_credential": ( - IndyCredential.from_dict(obj.get("raw_credential")) + IndyCredential.from_dict(obj["raw_credential"]) if obj.get("raw_credential") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_credential_exchange_auto_remove_request.py b/aries_cloudcontroller/models/v10_credential_exchange_auto_remove_request.py index 6c706e1c..744187c5 100644 --- a/aries_cloudcontroller/models/v10_credential_exchange_auto_remove_request.py +++ b/aries_cloudcontroller/models/v10_credential_exchange_auto_remove_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialExchangeAutoRemoveRequest(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialExchangeAutoRemoveRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,15 +60,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialExchangeAutoRemoveRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v10_credential_exchange_list_result.py b/aries_cloudcontroller/models/v10_credential_exchange_list_result.py index cc2413f3..6cc8b0e0 100644 --- a/aries_cloudcontroller/models/v10_credential_exchange_list_result.py +++ b/aries_cloudcontroller/models/v10_credential_exchange_list_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v10_credential_exchange import V10CredentialExchange from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialExchangeListResult(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialExchangeListResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialExchangeListResult from a dict""" if obj is None: return None @@ -90,10 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [ - V10CredentialExchange.from_dict(_item) - for _item in obj.get("results") - ] + [V10CredentialExchange.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/v10_credential_free_offer_request.py b/aries_cloudcontroller/models/v10_credential_free_offer_request.py index b2628935..071da605 100644 --- a/aries_cloudcontroller/models/v10_credential_free_offer_request.py +++ b/aries_cloudcontroller/models/v10_credential_free_offer_request.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialFreeOfferRequest(BaseModel): """ @@ -89,7 +84,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialFreeOfferRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -103,9 +98,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -119,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialFreeOfferRequest from a dict""" if obj is None: return None @@ -135,7 +132,7 @@ def from_dict(cls, obj: Dict) -> Self: "connection_id": obj.get("connection_id"), "cred_def_id": obj.get("cred_def_id"), "credential_preview": ( - CredentialPreview.from_dict(obj.get("credential_preview")) + CredentialPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_credential_issue_request.py b/aries_cloudcontroller/models/v10_credential_issue_request.py index ff6ee9dc..4635fe2c 100644 --- a/aries_cloudcontroller/models/v10_credential_issue_request.py +++ b/aries_cloudcontroller/models/v10_credential_issue_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialIssueRequest(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialIssueRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,9 +59,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if comment (nullable) is None @@ -76,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialIssueRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v10_credential_problem_report_request.py b/aries_cloudcontroller/models/v10_credential_problem_report_request.py index bb5d0a15..c258b1ee 100644 --- a/aries_cloudcontroller/models/v10_credential_problem_report_request.py +++ b/aries_cloudcontroller/models/v10_credential_problem_report_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialProblemReportRequest(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialProblemReportRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialProblemReportRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v10_credential_proposal_request_mand.py b/aries_cloudcontroller/models/v10_credential_proposal_request_mand.py index 6243a07a..3eb87b30 100644 --- a/aries_cloudcontroller/models/v10_credential_proposal_request_mand.py +++ b/aries_cloudcontroller/models/v10_credential_proposal_request_mand.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialProposalRequestMand(BaseModel): """ @@ -160,7 +155,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialProposalRequestMand from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -174,9 +169,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_proposal @@ -190,7 +187,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialProposalRequestMand from a dict""" if obj is None: return None @@ -205,7 +202,7 @@ def from_dict(cls, obj: Dict) -> Self: "connection_id": obj.get("connection_id"), "cred_def_id": obj.get("cred_def_id"), "credential_proposal": ( - CredentialPreview.from_dict(obj.get("credential_proposal")) + CredentialPreview.from_dict(obj["credential_proposal"]) if obj.get("credential_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_credential_proposal_request_opt.py b/aries_cloudcontroller/models/v10_credential_proposal_request_opt.py index 4f8d3693..65f2dc9a 100644 --- a/aries_cloudcontroller/models/v10_credential_proposal_request_opt.py +++ b/aries_cloudcontroller/models/v10_credential_proposal_request_opt.py @@ -17,19 +17,14 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.credential_preview import CredentialPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialProposalRequestOpt(BaseModel): """ @@ -160,7 +155,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialProposalRequestOpt from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -174,9 +169,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_proposal @@ -190,7 +187,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialProposalRequestOpt from a dict""" if obj is None: return None @@ -205,7 +202,7 @@ def from_dict(cls, obj: Dict) -> Self: "connection_id": obj.get("connection_id"), "cred_def_id": obj.get("cred_def_id"), "credential_proposal": ( - CredentialPreview.from_dict(obj.get("credential_proposal")) + CredentialPreview.from_dict(obj["credential_proposal"]) if obj.get("credential_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_credential_store_request.py b/aries_cloudcontroller/models/v10_credential_store_request.py index 1aea4cf2..f256369d 100644 --- a/aries_cloudcontroller/models/v10_credential_store_request.py +++ b/aries_cloudcontroller/models/v10_credential_store_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10CredentialStoreRequest(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10CredentialStoreRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10CredentialStoreRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v10_discovery_exchange_list_result.py b/aries_cloudcontroller/models/v10_discovery_exchange_list_result.py index 931d88cc..e0e211e7 100644 --- a/aries_cloudcontroller/models/v10_discovery_exchange_list_result.py +++ b/aries_cloudcontroller/models/v10_discovery_exchange_list_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.v10_discovery_record import V10DiscoveryRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10DiscoveryExchangeListResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10DiscoveryExchangeListResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10DiscoveryExchangeListResult from a dict""" if obj is None: return None @@ -88,10 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [ - V10DiscoveryRecord.from_dict(_item) - for _item in obj.get("results") - ] + [V10DiscoveryRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/v10_discovery_record.py b/aries_cloudcontroller/models/v10_discovery_record.py index 20785c54..261a4b0b 100644 --- a/aries_cloudcontroller/models/v10_discovery_record.py +++ b/aries_cloudcontroller/models/v10_discovery_record.py @@ -17,20 +17,15 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.disclose import Disclose from aries_cloudcontroller.models.query import Query from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10DiscoveryRecord(BaseModel): """ @@ -43,11 +38,11 @@ class V10DiscoveryRecord(BaseModel): created_at: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Time of record creation" ) - disclose: Optional[Disclose] = None + disclose: Optional[Disclose] = Field(default=None, description="Disclose message") discovery_exchange_id: Optional[StrictStr] = Field( default=None, description="Credential exchange identifier" ) - query_msg: Optional[Query] = None + query_msg: Optional[Query] = Field(default=None, description="Query message") state: Optional[StrictStr] = Field(default=None, description="Current record state") thread_id: Optional[StrictStr] = Field( default=None, description="Thread identifier" @@ -112,7 +107,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10DiscoveryRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -126,9 +121,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of disclose @@ -140,7 +137,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10DiscoveryRecord from a dict""" if obj is None: return None @@ -153,13 +150,13 @@ def from_dict(cls, obj: Dict) -> Self: "connection_id": obj.get("connection_id"), "created_at": obj.get("created_at"), "disclose": ( - Disclose.from_dict(obj.get("disclose")) + Disclose.from_dict(obj["disclose"]) if obj.get("disclose") is not None else None ), "discovery_exchange_id": obj.get("discovery_exchange_id"), "query_msg": ( - Query.from_dict(obj.get("query_msg")) + Query.from_dict(obj["query_msg"]) if obj.get("query_msg") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_presentation_create_request_request.py b/aries_cloudcontroller/models/v10_presentation_create_request_request.py index de8b80af..4591cbcf 100644 --- a/aries_cloudcontroller/models/v10_presentation_create_request_request.py +++ b/aries_cloudcontroller/models/v10_presentation_create_request_request.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_request import IndyProofRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationCreateRequestRequest(BaseModel): """ @@ -65,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationCreateRequestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of proof_request @@ -95,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationCreateRequestRequest from a dict""" if obj is None: return None @@ -109,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "auto_verify": obj.get("auto_verify"), "comment": obj.get("comment"), "proof_request": ( - IndyProofRequest.from_dict(obj.get("proof_request")) + IndyProofRequest.from_dict(obj["proof_request"]) if obj.get("proof_request") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_presentation_exchange.py b/aries_cloudcontroller/models/v10_presentation_exchange.py index 4063c8f1..7fa078dd 100644 --- a/aries_cloudcontroller/models/v10_presentation_exchange.py +++ b/aries_cloudcontroller/models/v10_presentation_exchange.py @@ -17,10 +17,10 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.indy_proof import IndyProof from aries_cloudcontroller.models.indy_proof_request import IndyProofRequest @@ -28,11 +28,6 @@ from aries_cloudcontroller.models.presentation_request import PresentationRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationExchange(BaseModel): """ @@ -60,13 +55,22 @@ class V10PresentationExchange(BaseModel): initiator: Optional[StrictStr] = Field( default=None, description="Present-proof exchange initiator: self or external" ) - presentation: Optional[IndyProof] = None + presentation: Optional[IndyProof] = Field( + default=None, description="(Indy) presentation (also known as proof)" + ) presentation_exchange_id: Optional[StrictStr] = Field( default=None, description="Presentation exchange identifier" ) - presentation_proposal_dict: Optional[PresentationProposal] = None - presentation_request: Optional[IndyProofRequest] = None - presentation_request_dict: Optional[PresentationRequest] = None + presentation_proposal_dict: Optional[PresentationProposal] = Field( + default=None, description="Presentation proposal message" + ) + presentation_request: Optional[IndyProofRequest] = Field( + default=None, + description="(Indy) presentation request (also known as proof request)", + ) + presentation_request_dict: Optional[PresentationRequest] = Field( + default=None, description="Presentation request message" + ) role: Optional[StrictStr] = Field( default=None, description="Present-proof exchange role: prover or verifier" ) @@ -130,7 +134,7 @@ def initiator_validate_enum(cls, value): if value is None: return value - if value not in ("self", "external"): + if value not in set(["self", "external"]): raise ValueError("must be one of enum values ('self', 'external')") return value @@ -140,7 +144,7 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("prover", "verifier"): + if value not in set(["prover", "verifier"]): raise ValueError("must be one of enum values ('prover', 'verifier')") return value @@ -165,7 +169,7 @@ def verified_validate_enum(cls, value): if value is None: return value - if value not in ("true", "false"): + if value not in set(["true", "false"]): raise ValueError("must be one of enum values ('true', 'false')") return value @@ -180,7 +184,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationExchange from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -194,9 +198,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation @@ -218,7 +224,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationExchange from a dict""" if obj is None: return None @@ -236,25 +242,23 @@ def from_dict(cls, obj: Dict) -> Self: "error_msg": obj.get("error_msg"), "initiator": obj.get("initiator"), "presentation": ( - IndyProof.from_dict(obj.get("presentation")) + IndyProof.from_dict(obj["presentation"]) if obj.get("presentation") is not None else None ), "presentation_exchange_id": obj.get("presentation_exchange_id"), "presentation_proposal_dict": ( - PresentationProposal.from_dict( - obj.get("presentation_proposal_dict") - ) + PresentationProposal.from_dict(obj["presentation_proposal_dict"]) if obj.get("presentation_proposal_dict") is not None else None ), "presentation_request": ( - IndyProofRequest.from_dict(obj.get("presentation_request")) + IndyProofRequest.from_dict(obj["presentation_request"]) if obj.get("presentation_request") is not None else None ), "presentation_request_dict": ( - PresentationRequest.from_dict(obj.get("presentation_request_dict")) + PresentationRequest.from_dict(obj["presentation_request_dict"]) if obj.get("presentation_request_dict") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_presentation_exchange_list.py b/aries_cloudcontroller/models/v10_presentation_exchange_list.py index b70b11e4..5e1ea616 100644 --- a/aries_cloudcontroller/models/v10_presentation_exchange_list.py +++ b/aries_cloudcontroller/models/v10_presentation_exchange_list.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v10_presentation_exchange import ( V10PresentationExchange, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationExchangeList(BaseModel): """ @@ -52,7 +48,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationExchangeList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,9 +62,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -81,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationExchangeList from a dict""" if obj is None: return None @@ -94,7 +92,7 @@ def from_dict(cls, obj: Dict) -> Self: "results": ( [ V10PresentationExchange.from_dict(_item) - for _item in obj.get("results") + for _item in obj["results"] ] if obj.get("results") is not None else None diff --git a/aries_cloudcontroller/models/v10_presentation_problem_report_request.py b/aries_cloudcontroller/models/v10_presentation_problem_report_request.py index 42733c0d..b0a43dd0 100644 --- a/aries_cloudcontroller/models/v10_presentation_problem_report_request.py +++ b/aries_cloudcontroller/models/v10_presentation_problem_report_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationProblemReportRequest(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationProblemReportRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationProblemReportRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v10_presentation_proposal_request.py b/aries_cloudcontroller/models/v10_presentation_proposal_request.py index 2828448a..23cb86b7 100644 --- a/aries_cloudcontroller/models/v10_presentation_proposal_request.py +++ b/aries_cloudcontroller/models/v10_presentation_proposal_request.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_pres_preview import IndyPresPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationProposalRequest(BaseModel): """ @@ -70,7 +66,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationProposalRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,9 +80,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation_proposal @@ -100,7 +98,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationProposalRequest from a dict""" if obj is None: return None @@ -115,7 +113,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "presentation_proposal": ( - IndyPresPreview.from_dict(obj.get("presentation_proposal")) + IndyPresPreview.from_dict(obj["presentation_proposal"]) if obj.get("presentation_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_presentation_send_request.py b/aries_cloudcontroller/models/v10_presentation_send_request.py index 5286d031..d1b39ca2 100644 --- a/aries_cloudcontroller/models/v10_presentation_send_request.py +++ b/aries_cloudcontroller/models/v10_presentation_send_request.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_requested_creds_requested_attr import ( IndyRequestedCredsRequestedAttr, @@ -28,11 +29,6 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationSendRequest(BaseModel): """ @@ -74,7 +70,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationSendRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -88,9 +84,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in requested_attributes (dict) @@ -110,7 +108,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationSendRequest from a dict""" if obj is None: return None @@ -124,7 +122,7 @@ def from_dict(cls, obj: Dict) -> Self: "requested_attributes": ( dict( (_k, IndyRequestedCredsRequestedAttr.from_dict(_v)) - for _k, _v in obj.get("requested_attributes").items() + for _k, _v in obj["requested_attributes"].items() ) if obj.get("requested_attributes") is not None else None @@ -132,7 +130,7 @@ def from_dict(cls, obj: Dict) -> Self: "requested_predicates": ( dict( (_k, IndyRequestedCredsRequestedPred.from_dict(_v)) - for _k, _v in obj.get("requested_predicates").items() + for _k, _v in obj["requested_predicates"].items() ) if obj.get("requested_predicates") is not None else None diff --git a/aries_cloudcontroller/models/v10_presentation_send_request_request.py b/aries_cloudcontroller/models/v10_presentation_send_request_request.py index 34f93d91..6e55b727 100644 --- a/aries_cloudcontroller/models/v10_presentation_send_request_request.py +++ b/aries_cloudcontroller/models/v10_presentation_send_request_request.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.indy_proof_request import IndyProofRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationSendRequestRequest(BaseModel): """ @@ -67,7 +63,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationSendRequestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,9 +77,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of proof_request @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationSendRequestRequest from a dict""" if obj is None: return None @@ -112,7 +110,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "proof_request": ( - IndyProofRequest.from_dict(obj.get("proof_request")) + IndyProofRequest.from_dict(obj["proof_request"]) if obj.get("proof_request") is not None else None ), diff --git a/aries_cloudcontroller/models/v10_presentation_send_request_to_proposal.py b/aries_cloudcontroller/models/v10_presentation_send_request_to_proposal.py index a53dc0ac..e66b56f5 100644 --- a/aries_cloudcontroller/models/v10_presentation_send_request_to_proposal.py +++ b/aries_cloudcontroller/models/v10_presentation_send_request_to_proposal.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V10PresentationSendRequestToProposal(BaseModel): """ @@ -56,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V10PresentationSendRequestToProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,15 +66,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V10PresentationSendRequestToProposal from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_attr_spec.py b/aries_cloudcontroller/models/v20_cred_attr_spec.py index f9663b53..6693c5d7 100644 --- a/aries_cloudcontroller/models/v20_cred_attr_spec.py +++ b/aries_cloudcontroller/models/v20_cred_attr_spec.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredAttrSpec(BaseModel): """ @@ -55,7 +51,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredAttrSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,9 +65,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if mime_type (nullable) is None @@ -82,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredAttrSpec from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_bound_offer_request.py b/aries_cloudcontroller/models/v20_cred_bound_offer_request.py index c5b28b4f..9cb7e735 100644 --- a/aries_cloudcontroller/models/v20_cred_bound_offer_request.py +++ b/aries_cloudcontroller/models/v20_cred_bound_offer_request.py @@ -16,27 +16,27 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_filter import V20CredFilter from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredBoundOfferRequest(BaseModel): """ V20CredBoundOfferRequest """ # noqa: E501 - counter_preview: Optional[V20CredPreview] = None - filter: Optional[V20CredFilter] = None + counter_preview: Optional[V20CredPreview] = Field( + default=None, description="Optional content for counter-proposal" + ) + filter: Optional[V20CredFilter] = Field( + default=None, description="Credential specification criteria by format" + ) __properties: ClassVar[List[str]] = ["counter_preview", "filter"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredBoundOfferRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of counter_preview @@ -78,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredBoundOfferRequest from a dict""" if obj is None: return None @@ -89,12 +91,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "counter_preview": ( - V20CredPreview.from_dict(obj.get("counter_preview")) + V20CredPreview.from_dict(obj["counter_preview"]) if obj.get("counter_preview") is not None else None ), "filter": ( - V20CredFilter.from_dict(obj.get("filter")) + V20CredFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_ex_free.py b/aries_cloudcontroller/models/v20_cred_ex_free.py index f5870624..5eed1765 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_free.py +++ b/aries_cloudcontroller/models/v20_cred_ex_free.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_filter import V20CredFilter from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExFree(BaseModel): """ @@ -44,7 +40,9 @@ class V20CredExFree(BaseModel): ) connection_id: StrictStr = Field(description="Connection identifier") credential_preview: Optional[V20CredPreview] = None - filter: V20CredFilter + filter: V20CredFilter = Field( + description="Credential specification criteria by format" + ) replacement_id: Optional[StrictStr] = Field( default=None, description="Optional identifier used to manage credential replacement", @@ -78,7 +76,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExFree from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -92,9 +90,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -124,7 +124,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExFree from a dict""" if obj is None: return None @@ -138,12 +138,12 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "credential_preview": ( - V20CredPreview.from_dict(obj.get("credential_preview")) + V20CredPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "filter": ( - V20CredFilter.from_dict(obj.get("filter")) + V20CredFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_ex_record.py b/aries_cloudcontroller/models/v20_cred_ex_record.py index 4b959ebf..f37ac523 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_record.py +++ b/aries_cloudcontroller/models/v20_cred_ex_record.py @@ -17,10 +17,10 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.v20_cred_ex_record_by_format import ( V20CredExRecordByFormat, @@ -32,11 +32,6 @@ from aries_cloudcontroller.models.v20_cred_request import V20CredRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExRecord(BaseModel): """ @@ -55,7 +50,10 @@ class V20CredExRecord(BaseModel): default=None, description="Issuer choice to remove this credential exchange record when complete", ) - by_format: Optional[V20CredExRecordByFormat] = None + by_format: Optional[V20CredExRecordByFormat] = Field( + default=None, + description="Attachment content by format for proposal, offer, request, and issue", + ) connection_id: Optional[StrictStr] = Field( default=None, description="Connection identifier" ) @@ -65,11 +63,21 @@ class V20CredExRecord(BaseModel): cred_ex_id: Optional[StrictStr] = Field( default=None, description="Credential exchange identifier" ) - cred_issue: Optional[V20CredIssue] = None - cred_offer: Optional[V20CredOffer] = None - cred_preview: Optional[V20CredPreview] = None - cred_proposal: Optional[V20CredProposal] = None - cred_request: Optional[V20CredRequest] = None + cred_issue: Optional[V20CredIssue] = Field( + default=None, description="Serialized credential issue message" + ) + cred_offer: Optional[V20CredOffer] = Field( + default=None, description="Credential offer message" + ) + cred_preview: Optional[V20CredPreview] = Field( + default=None, description="Credential preview from credential proposal" + ) + cred_proposal: Optional[V20CredProposal] = Field( + default=None, description="Credential proposal message" + ) + cred_request: Optional[V20CredRequest] = Field( + default=None, description="Serialized credential request message" + ) error_msg: Optional[StrictStr] = Field(default=None, description="Error message") initiator: Optional[StrictStr] = Field( default=None, @@ -138,7 +146,7 @@ def initiator_validate_enum(cls, value): if value is None: return value - if value not in ("self", "external"): + if value not in set(["self", "external"]): raise ValueError("must be one of enum values ('self', 'external')") return value @@ -148,7 +156,7 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("issuer", "holder"): + if value not in set(["issuer", "holder"]): raise ValueError("must be one of enum values ('issuer', 'holder')") return value @@ -158,19 +166,21 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ( - "proposal-sent", - "proposal-received", - "offer-sent", - "offer-received", - "request-sent", - "request-received", - "credential-issued", - "credential-received", - "done", - "credential-revoked", - "abandoned", - "deleted", + if value not in set( + [ + "proposal-sent", + "proposal-received", + "offer-sent", + "offer-received", + "request-sent", + "request-received", + "credential-issued", + "credential-received", + "done", + "credential-revoked", + "abandoned", + "deleted", + ] ): raise ValueError( "must be one of enum values ('proposal-sent', 'proposal-received', 'offer-sent', 'offer-received', 'request-sent', 'request-received', 'credential-issued', 'credential-received', 'done', 'credential-revoked', 'abandoned', 'deleted')" @@ -203,7 +213,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -217,9 +227,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of by_format @@ -243,7 +255,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExRecord from a dict""" if obj is None: return None @@ -257,7 +269,7 @@ def from_dict(cls, obj: Dict) -> Self: "auto_offer": obj.get("auto_offer"), "auto_remove": obj.get("auto_remove"), "by_format": ( - V20CredExRecordByFormat.from_dict(obj.get("by_format")) + V20CredExRecordByFormat.from_dict(obj["by_format"]) if obj.get("by_format") is not None else None ), @@ -265,27 +277,27 @@ def from_dict(cls, obj: Dict) -> Self: "created_at": obj.get("created_at"), "cred_ex_id": obj.get("cred_ex_id"), "cred_issue": ( - V20CredIssue.from_dict(obj.get("cred_issue")) + V20CredIssue.from_dict(obj["cred_issue"]) if obj.get("cred_issue") is not None else None ), "cred_offer": ( - V20CredOffer.from_dict(obj.get("cred_offer")) + V20CredOffer.from_dict(obj["cred_offer"]) if obj.get("cred_offer") is not None else None ), "cred_preview": ( - V20CredPreview.from_dict(obj.get("cred_preview")) + V20CredPreview.from_dict(obj["cred_preview"]) if obj.get("cred_preview") is not None else None ), "cred_proposal": ( - V20CredProposal.from_dict(obj.get("cred_proposal")) + V20CredProposal.from_dict(obj["cred_proposal"]) if obj.get("cred_proposal") is not None else None ), "cred_request": ( - V20CredRequest.from_dict(obj.get("cred_request")) + V20CredRequest.from_dict(obj["cred_request"]) if obj.get("cred_request") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_ex_record_by_format.py b/aries_cloudcontroller/models/v20_cred_ex_record_by_format.py index c24d71cd..8439a07f 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_record_by_format.py +++ b/aries_cloudcontroller/models/v20_cred_ex_record_by_format.py @@ -16,27 +16,23 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExRecordByFormat(BaseModel): """ V20CredExRecordByFormat """ # noqa: E501 - cred_issue: Optional[Union[str, Any]] = None - cred_offer: Optional[Union[str, Any]] = None - cred_proposal: Optional[Union[str, Any]] = None - cred_request: Optional[Union[str, Any]] = None + cred_issue: Optional[Dict[str, Any]] = None + cred_offer: Optional[Dict[str, Any]] = None + cred_proposal: Optional[Dict[str, Any]] = None + cred_request: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = [ "cred_issue", "cred_offer", @@ -55,7 +51,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExRecordByFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,15 +65,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExRecordByFormat from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_ex_record_detail.py b/aries_cloudcontroller/models/v20_cred_ex_record_detail.py index 7668b278..ab16bc7f 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_record_detail.py +++ b/aries_cloudcontroller/models/v20_cred_ex_record_detail.py @@ -16,9 +16,10 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_ex_record import V20CredExRecord from aries_cloudcontroller.models.v20_cred_ex_record_indy import V20CredExRecordIndy @@ -27,18 +28,15 @@ ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExRecordDetail(BaseModel): """ V20CredExRecordDetail """ # noqa: E501 - cred_ex_record: Optional[V20CredExRecord] = None + cred_ex_record: Optional[V20CredExRecord] = Field( + default=None, description="Credential exchange record" + ) indy: Optional[V20CredExRecordIndy] = None ld_proof: Optional[V20CredExRecordLDProof] = None __properties: ClassVar[List[str]] = ["cred_ex_record", "indy", "ld_proof"] @@ -54,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExRecordDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,9 +66,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of cred_ex_record @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExRecordDetail from a dict""" if obj is None: return None @@ -96,17 +96,17 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "cred_ex_record": ( - V20CredExRecord.from_dict(obj.get("cred_ex_record")) + V20CredExRecord.from_dict(obj["cred_ex_record"]) if obj.get("cred_ex_record") is not None else None ), "indy": ( - V20CredExRecordIndy.from_dict(obj.get("indy")) + V20CredExRecordIndy.from_dict(obj["indy"]) if obj.get("indy") is not None else None ), "ld_proof": ( - V20CredExRecordLDProof.from_dict(obj.get("ld_proof")) + V20CredExRecordLDProof.from_dict(obj["ld_proof"]) if obj.get("ld_proof") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_ex_record_indy.py b/aries_cloudcontroller/models/v20_cred_ex_record_indy.py index bbd9dc89..769ca9fd 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_record_indy.py +++ b/aries_cloudcontroller/models/v20_cred_ex_record_indy.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExRecordIndy(BaseModel): """ @@ -48,7 +43,7 @@ class V20CredExRecordIndy(BaseModel): cred_id_stored: Optional[StrictStr] = Field( default=None, description="Credential identifier stored in wallet" ) - cred_request_metadata: Optional[Union[str, Any]] = Field( + cred_request_metadata: Optional[Dict[str, Any]] = Field( default=None, description="Credential request metadata for indy holder" ) cred_rev_id: Optional[Annotated[str, Field(strict=True)]] = Field( @@ -140,7 +135,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExRecordIndy from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -154,15 +149,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExRecordIndy from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_ex_record_ld_proof.py b/aries_cloudcontroller/models/v20_cred_ex_record_ld_proof.py index 10627a61..3bccf149 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_record_ld_proof.py +++ b/aries_cloudcontroller/models/v20_cred_ex_record_ld_proof.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExRecordLDProof(BaseModel): """ @@ -102,7 +97,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExRecordLDProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -116,15 +111,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExRecordLDProof from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_ex_record_list_result.py b/aries_cloudcontroller/models/v20_cred_ex_record_list_result.py index a6f1d812..cecbc2ba 100644 --- a/aries_cloudcontroller/models/v20_cred_ex_record_list_result.py +++ b/aries_cloudcontroller/models/v20_cred_ex_record_list_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_ex_record_detail import V20CredExRecordDetail from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredExRecordListResult(BaseModel): """ @@ -51,7 +47,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredExRecordListResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,9 +61,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -80,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredExRecordListResult from a dict""" if obj is None: return None @@ -91,10 +89,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [ - V20CredExRecordDetail.from_dict(_item) - for _item in obj.get("results") - ] + [V20CredExRecordDetail.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/v20_cred_filter.py b/aries_cloudcontroller/models/v20_cred_filter.py index 6ade71a3..e28426b9 100644 --- a/aries_cloudcontroller/models/v20_cred_filter.py +++ b/aries_cloudcontroller/models/v20_cred_filter.py @@ -16,27 +16,27 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.ld_proof_vc_detail import LDProofVCDetail from aries_cloudcontroller.models.v20_cred_filter_indy import V20CredFilterIndy from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredFilter(BaseModel): """ V20CredFilter """ # noqa: E501 - indy: Optional[V20CredFilterIndy] = None - ld_proof: Optional[LDProofVCDetail] = None + indy: Optional[V20CredFilterIndy] = Field( + default=None, description="Credential filter for indy" + ) + ld_proof: Optional[LDProofVCDetail] = Field( + default=None, description="Credential filter for linked data proof" + ) __properties: ClassVar[List[str]] = ["indy", "ld_proof"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of indy @@ -78,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredFilter from a dict""" if obj is None: return None @@ -89,12 +91,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "indy": ( - V20CredFilterIndy.from_dict(obj.get("indy")) + V20CredFilterIndy.from_dict(obj["indy"]) if obj.get("indy") is not None else None ), "ld_proof": ( - LDProofVCDetail.from_dict(obj.get("ld_proof")) + LDProofVCDetail.from_dict(obj["ld_proof"]) if obj.get("ld_proof") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_filter_indy.py b/aries_cloudcontroller/models/v20_cred_filter_indy.py index 9e92bf07..9d4780cf 100644 --- a/aries_cloudcontroller/models/v20_cred_filter_indy.py +++ b/aries_cloudcontroller/models/v20_cred_filter_indy.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredFilterIndy(BaseModel): """ @@ -141,7 +136,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredFilterIndy from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -155,15 +150,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredFilterIndy from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_filter_ld_proof.py b/aries_cloudcontroller/models/v20_cred_filter_ld_proof.py index c6705660..d4701b00 100644 --- a/aries_cloudcontroller/models/v20_cred_filter_ld_proof.py +++ b/aries_cloudcontroller/models/v20_cred_filter_ld_proof.py @@ -16,25 +16,23 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.ld_proof_vc_detail import LDProofVCDetail from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredFilterLDProof(BaseModel): """ V20CredFilterLDProof """ # noqa: E501 - ld_proof: LDProofVCDetail + ld_proof: LDProofVCDetail = Field( + description="Credential filter for linked data proof" + ) __properties: ClassVar[List[str]] = ["ld_proof"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredFilterLDProof from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of ld_proof @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredFilterLDProof from a dict""" if obj is None: return None @@ -84,7 +84,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "ld_proof": ( - LDProofVCDetail.from_dict(obj.get("ld_proof")) + LDProofVCDetail.from_dict(obj["ld_proof"]) if obj.get("ld_proof") is not None else None ) diff --git a/aries_cloudcontroller/models/v20_cred_format.py b/aries_cloudcontroller/models/v20_cred_format.py index 0ebd6b76..da72aa4f 100644 --- a/aries_cloudcontroller/models/v20_cred_format.py +++ b/aries_cloudcontroller/models/v20_cred_format.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredFormat(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredFormat from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_issue.py b/aries_cloudcontroller/models/v20_cred_issue.py index 28fe6945..2c0745e4 100644 --- a/aries_cloudcontroller/models/v20_cred_issue.py +++ b/aries_cloudcontroller/models/v20_cred_issue.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_cred_format import V20CredFormat from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredIssue(BaseModel): """ @@ -72,7 +68,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredIssue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,11 +83,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in credentialsattach (list) @@ -116,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredIssue from a dict""" if obj is None: return None @@ -132,13 +132,13 @@ def from_dict(cls, obj: Dict) -> Self: "credentials~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("credentials~attach") + for _item in obj["credentials~attach"] ] if obj.get("credentials~attach") is not None else None ), "formats": ( - [V20CredFormat.from_dict(_item) for _item in obj.get("formats")] + [V20CredFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_issue_problem_report_request.py b/aries_cloudcontroller/models/v20_cred_issue_problem_report_request.py index c5c51271..6414bd5c 100644 --- a/aries_cloudcontroller/models/v20_cred_issue_problem_report_request.py +++ b/aries_cloudcontroller/models/v20_cred_issue_problem_report_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredIssueProblemReportRequest(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredIssueProblemReportRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredIssueProblemReportRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_issue_request.py b/aries_cloudcontroller/models/v20_cred_issue_request.py index 29be3039..bf58c98d 100644 --- a/aries_cloudcontroller/models/v20_cred_issue_request.py +++ b/aries_cloudcontroller/models/v20_cred_issue_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredIssueRequest(BaseModel): """ @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredIssueRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,9 +59,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if comment (nullable) is None @@ -76,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredIssueRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_offer.py b/aries_cloudcontroller/models/v20_cred_offer.py index 443248a5..52bb49ee 100644 --- a/aries_cloudcontroller/models/v20_cred_offer.py +++ b/aries_cloudcontroller/models/v20_cred_offer.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_cred_format import V20CredFormat from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredOffer(BaseModel): """ @@ -75,7 +71,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredOffer from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -90,11 +86,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -122,7 +122,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredOffer from a dict""" if obj is None: return None @@ -136,20 +136,17 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "credential_preview": ( - V20CredPreview.from_dict(obj.get("credential_preview")) + V20CredPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "formats": ( - [V20CredFormat.from_dict(_item) for _item in obj.get("formats")] + [V20CredFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), "offers~attach": ( - [ - AttachDecorator.from_dict(_item) - for _item in obj.get("offers~attach") - ] + [AttachDecorator.from_dict(_item) for _item in obj["offers~attach"]] if obj.get("offers~attach") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_offer_conn_free_request.py b/aries_cloudcontroller/models/v20_cred_offer_conn_free_request.py index 2ff353e4..5d0aa34a 100644 --- a/aries_cloudcontroller/models/v20_cred_offer_conn_free_request.py +++ b/aries_cloudcontroller/models/v20_cred_offer_conn_free_request.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_filter import V20CredFilter from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredOfferConnFreeRequest(BaseModel): """ @@ -47,7 +43,9 @@ class V20CredOfferConnFreeRequest(BaseModel): default=None, description="Human-readable comment" ) credential_preview: Optional[V20CredPreview] = None - filter: V20CredFilter + filter: V20CredFilter = Field( + description="Credential specification criteria by format" + ) replacement_id: Optional[StrictStr] = Field( default=None, description="Optional identifier used to manage credential replacement", @@ -77,7 +75,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredOfferConnFreeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -91,9 +89,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -115,7 +115,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredOfferConnFreeRequest from a dict""" if obj is None: return None @@ -129,12 +129,12 @@ def from_dict(cls, obj: Dict) -> Self: "auto_remove": obj.get("auto_remove"), "comment": obj.get("comment"), "credential_preview": ( - V20CredPreview.from_dict(obj.get("credential_preview")) + V20CredPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "filter": ( - V20CredFilter.from_dict(obj.get("filter")) + V20CredFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_offer_request.py b/aries_cloudcontroller/models/v20_cred_offer_request.py index 414f7e1a..fc1179c2 100644 --- a/aries_cloudcontroller/models/v20_cred_offer_request.py +++ b/aries_cloudcontroller/models/v20_cred_offer_request.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_filter import V20CredFilter from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredOfferRequest(BaseModel): """ @@ -48,7 +44,9 @@ class V20CredOfferRequest(BaseModel): ) connection_id: StrictStr = Field(description="Connection identifier") credential_preview: Optional[V20CredPreview] = None - filter: V20CredFilter + filter: V20CredFilter = Field( + description="Credential specification criteria by format" + ) replacement_id: Optional[StrictStr] = Field( default=None, description="Optional identifier used to manage credential replacement", @@ -79,7 +77,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredOfferRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -93,9 +91,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -117,7 +117,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredOfferRequest from a dict""" if obj is None: return None @@ -132,12 +132,12 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "credential_preview": ( - V20CredPreview.from_dict(obj.get("credential_preview")) + V20CredPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "filter": ( - V20CredFilter.from_dict(obj.get("filter")) + V20CredFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_preview.py b/aries_cloudcontroller/models/v20_cred_preview.py index 066b2810..8008f735 100644 --- a/aries_cloudcontroller/models/v20_cred_preview.py +++ b/aries_cloudcontroller/models/v20_cred_preview.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_attr_spec import V20CredAttrSpec from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredPreview(BaseModel): """ @@ -51,7 +47,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredPreview from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,9 +61,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) @@ -80,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredPreview from a dict""" if obj is None: return None @@ -92,10 +90,7 @@ def from_dict(cls, obj: Dict) -> Self: { "@type": obj.get("@type"), "attributes": ( - [ - V20CredAttrSpec.from_dict(_item) - for _item in obj.get("attributes") - ] + [V20CredAttrSpec.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_proposal.py b/aries_cloudcontroller/models/v20_cred_proposal.py index a0fc437c..2cc7ec10 100644 --- a/aries_cloudcontroller/models/v20_cred_proposal.py +++ b/aries_cloudcontroller/models/v20_cred_proposal.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_cred_format import V20CredFormat from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredProposal(BaseModel): """ @@ -45,7 +41,9 @@ class V20CredProposal(BaseModel): comment: Optional[StrictStr] = Field( default=None, description="Human-readable comment" ) - credential_preview: Optional[V20CredPreview] = None + credential_preview: Optional[V20CredPreview] = Field( + default=None, description="Credential preview" + ) filtersattach: List[AttachDecorator] = Field( description="Credential filter per acceptable format on corresponding identifier", alias="filters~attach", @@ -71,7 +69,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,11 +84,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -118,7 +120,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredProposal from a dict""" if obj is None: return None @@ -132,20 +134,20 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "credential_preview": ( - V20CredPreview.from_dict(obj.get("credential_preview")) + V20CredPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "filters~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("filters~attach") + for _item in obj["filters~attach"] ] if obj.get("filters~attach") is not None else None ), "formats": ( - [V20CredFormat.from_dict(_item) for _item in obj.get("formats")] + [V20CredFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_request.py b/aries_cloudcontroller/models/v20_cred_request.py index 8f8b4a4e..8a27ca34 100644 --- a/aries_cloudcontroller/models/v20_cred_request.py +++ b/aries_cloudcontroller/models/v20_cred_request.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_cred_format import V20CredFormat from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredRequest(BaseModel): """ @@ -67,7 +63,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,11 +78,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in formats (list) @@ -111,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredRequest from a dict""" if obj is None: return None @@ -125,14 +125,14 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "formats": ( - [V20CredFormat.from_dict(_item) for _item in obj.get("formats")] + [V20CredFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), "requests~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("requests~attach") + for _item in obj["requests~attach"] ] if obj.get("requests~attach") is not None else None diff --git a/aries_cloudcontroller/models/v20_cred_request_free.py b/aries_cloudcontroller/models/v20_cred_request_free.py index 6ea44320..2ec435b0 100644 --- a/aries_cloudcontroller/models/v20_cred_request_free.py +++ b/aries_cloudcontroller/models/v20_cred_request_free.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_filter_ld_proof import V20CredFilterLDProof from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredRequestFree(BaseModel): """ @@ -42,7 +38,9 @@ class V20CredRequestFree(BaseModel): default=None, description="Human-readable comment" ) connection_id: StrictStr = Field(description="Connection identifier") - filter: V20CredFilterLDProof + filter: V20CredFilterLDProof = Field( + description="Credential specification criteria by format" + ) holder_did: Optional[StrictStr] = Field( default=None, description="Holder DID to substitute for the credentialSubject.id", @@ -70,7 +68,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredRequestFree from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,9 +82,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of filter @@ -105,7 +105,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredRequestFree from a dict""" if obj is None: return None @@ -119,7 +119,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "filter": ( - V20CredFilterLDProof.from_dict(obj.get("filter")) + V20CredFilterLDProof.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_cred_request_request.py b/aries_cloudcontroller/models/v20_cred_request_request.py index 154c7252..d2647985 100644 --- a/aries_cloudcontroller/models/v20_cred_request_request.py +++ b/aries_cloudcontroller/models/v20_cred_request_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredRequestRequest(BaseModel): """ @@ -54,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredRequestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # set to None if holder_did (nullable) is None @@ -81,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredRequestRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_cred_store_request.py b/aries_cloudcontroller/models/v20_cred_store_request.py index b6f2e586..519d0055 100644 --- a/aries_cloudcontroller/models/v20_cred_store_request.py +++ b/aries_cloudcontroller/models/v20_cred_store_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20CredStoreRequest(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20CredStoreRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20CredStoreRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_discovery_exchange_list_result.py b/aries_cloudcontroller/models/v20_discovery_exchange_list_result.py index 564dd152..93d6b47e 100644 --- a/aries_cloudcontroller/models/v20_discovery_exchange_list_result.py +++ b/aries_cloudcontroller/models/v20_discovery_exchange_list_result.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.v20_discovery_record import V20DiscoveryRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20DiscoveryExchangeListResult(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20DiscoveryExchangeListResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20DiscoveryExchangeListResult from a dict""" if obj is None: return None @@ -88,10 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [ - V20DiscoveryRecord.from_dict(_item) - for _item in obj.get("results") - ] + [V20DiscoveryRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/v20_discovery_exchange_result.py b/aries_cloudcontroller/models/v20_discovery_exchange_result.py index 5ed0f1b3..7f94478e 100644 --- a/aries_cloudcontroller/models/v20_discovery_exchange_result.py +++ b/aries_cloudcontroller/models/v20_discovery_exchange_result.py @@ -16,25 +16,23 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v20_discovery_record import V20DiscoveryRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20DiscoveryExchangeResult(BaseModel): """ V20DiscoveryExchangeResult """ # noqa: E501 - results: Optional[V20DiscoveryRecord] = None + results: Optional[V20DiscoveryRecord] = Field( + default=None, description="Discover Features v2.0 exchange record" + ) __properties: ClassVar[List[str]] = ["results"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -48,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20DiscoveryExchangeResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of results @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20DiscoveryExchangeResult from a dict""" if obj is None: return None @@ -84,7 +84,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - V20DiscoveryRecord.from_dict(obj.get("results")) + V20DiscoveryRecord.from_dict(obj["results"]) if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/v20_discovery_record.py b/aries_cloudcontroller/models/v20_discovery_record.py index 7b7c0e62..c9c2ab24 100644 --- a/aries_cloudcontroller/models/v20_discovery_record.py +++ b/aries_cloudcontroller/models/v20_discovery_record.py @@ -17,20 +17,15 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.disclosures import Disclosures from aries_cloudcontroller.models.queries import Queries from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20DiscoveryRecord(BaseModel): """ @@ -43,11 +38,13 @@ class V20DiscoveryRecord(BaseModel): created_at: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Time of record creation" ) - disclosures: Optional[Disclosures] = None + disclosures: Optional[Disclosures] = Field( + default=None, description="Disclosures message" + ) discovery_exchange_id: Optional[StrictStr] = Field( default=None, description="Credential exchange identifier" ) - queries_msg: Optional[Queries] = None + queries_msg: Optional[Queries] = Field(default=None, description="Queries message") state: Optional[StrictStr] = Field(default=None, description="Current record state") thread_id: Optional[StrictStr] = Field( default=None, description="Thread identifier" @@ -112,7 +109,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20DiscoveryRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -126,9 +123,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of disclosures @@ -140,7 +139,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20DiscoveryRecord from a dict""" if obj is None: return None @@ -153,13 +152,13 @@ def from_dict(cls, obj: Dict) -> Self: "connection_id": obj.get("connection_id"), "created_at": obj.get("created_at"), "disclosures": ( - Disclosures.from_dict(obj.get("disclosures")) + Disclosures.from_dict(obj["disclosures"]) if obj.get("disclosures") is not None else None ), "discovery_exchange_id": obj.get("discovery_exchange_id"), "queries_msg": ( - Queries.from_dict(obj.get("queries_msg")) + Queries.from_dict(obj["queries_msg"]) if obj.get("queries_msg") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_issue_cred_schema_core.py b/aries_cloudcontroller/models/v20_issue_cred_schema_core.py index 445ef21c..5d038141 100644 --- a/aries_cloudcontroller/models/v20_issue_cred_schema_core.py +++ b/aries_cloudcontroller/models/v20_issue_cred_schema_core.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_cred_filter import V20CredFilter from aries_cloudcontroller.models.v20_cred_preview import V20CredPreview from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20IssueCredSchemaCore(BaseModel): """ @@ -43,7 +39,9 @@ class V20IssueCredSchemaCore(BaseModel): default=None, description="Human-readable comment" ) credential_preview: Optional[V20CredPreview] = None - filter: V20CredFilter + filter: V20CredFilter = Field( + description="Credential specification criteria by format" + ) replacement_id: Optional[StrictStr] = Field( default=None, description="Optional identifier used to manage credential replacement", @@ -72,7 +70,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20IssueCredSchemaCore from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,9 +84,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of credential_preview @@ -110,7 +110,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20IssueCredSchemaCore from a dict""" if obj is None: return None @@ -123,12 +123,12 @@ def from_dict(cls, obj: Dict) -> Self: "auto_remove": obj.get("auto_remove"), "comment": obj.get("comment"), "credential_preview": ( - V20CredPreview.from_dict(obj.get("credential_preview")) + V20CredPreview.from_dict(obj["credential_preview"]) if obj.get("credential_preview") is not None else None ), "filter": ( - V20CredFilter.from_dict(obj.get("filter")) + V20CredFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres.py b/aries_cloudcontroller/models/v20_pres.py index 3554d675..b1e724c3 100644 --- a/aries_cloudcontroller/models/v20_pres.py +++ b/aries_cloudcontroller/models/v20_pres.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_pres_format import V20PresFormat from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20Pres(BaseModel): """ @@ -65,7 +61,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20Pres from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,11 +76,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in formats (list) @@ -109,7 +109,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20Pres from a dict""" if obj is None: return None @@ -123,14 +123,14 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "formats": ( - [V20PresFormat.from_dict(_item) for _item in obj.get("formats")] + [V20PresFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), "presentations~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("presentations~attach") + for _item in obj["presentations~attach"] ] if obj.get("presentations~attach") is not None else None diff --git a/aries_cloudcontroller/models/v20_pres_create_request_request.py b/aries_cloudcontroller/models/v20_pres_create_request_request.py index b199d2e4..d48d7cc6 100644 --- a/aries_cloudcontroller/models/v20_pres_create_request_request.py +++ b/aries_cloudcontroller/models/v20_pres_create_request_request.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_pres_request_by_format import ( V20PresRequestByFormat, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresCreateRequestRequest(BaseModel): """ @@ -67,7 +63,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresCreateRequestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,9 +77,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation_request @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresCreateRequestRequest from a dict""" if obj is None: return None @@ -111,7 +109,7 @@ def from_dict(cls, obj: Dict) -> Self: "auto_verify": obj.get("auto_verify"), "comment": obj.get("comment"), "presentation_request": ( - V20PresRequestByFormat.from_dict(obj.get("presentation_request")) + V20PresRequestByFormat.from_dict(obj["presentation_request"]) if obj.get("presentation_request") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres_ex_record.py b/aries_cloudcontroller/models/v20_pres_ex_record.py index aa7e7921..1a3e6f12 100644 --- a/aries_cloudcontroller/models/v20_pres_ex_record.py +++ b/aries_cloudcontroller/models/v20_pres_ex_record.py @@ -17,10 +17,10 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.models.v20_pres import V20Pres from aries_cloudcontroller.models.v20_pres_ex_record_by_format import ( @@ -30,11 +30,6 @@ from aries_cloudcontroller.models.v20_pres_request import V20PresRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresExRecord(BaseModel): """ @@ -52,7 +47,10 @@ class V20PresExRecord(BaseModel): auto_verify: Optional[StrictBool] = Field( default=None, description="Verifier choice to auto-verify proof presentation" ) - by_format: Optional[V20PresExRecordByFormat] = None + by_format: Optional[V20PresExRecordByFormat] = Field( + default=None, + description="Attachment content by format for proposal, request, and presentation", + ) connection_id: Optional[StrictStr] = Field( default=None, description="Connection identifier" ) @@ -63,12 +61,16 @@ class V20PresExRecord(BaseModel): initiator: Optional[StrictStr] = Field( default=None, description="Present-proof exchange initiator: self or external" ) - pres: Optional[V20Pres] = None + pres: Optional[V20Pres] = Field(default=None, description="Presentation message") pres_ex_id: Optional[StrictStr] = Field( default=None, description="Presentation exchange identifier" ) - pres_proposal: Optional[V20PresProposal] = None - pres_request: Optional[V20PresRequest] = None + pres_proposal: Optional[V20PresProposal] = Field( + default=None, description="Presentation proposal message" + ) + pres_request: Optional[V20PresRequest] = Field( + default=None, description="Presentation request message" + ) role: Optional[StrictStr] = Field( default=None, description="Present-proof exchange role: prover or verifier" ) @@ -132,7 +134,7 @@ def initiator_validate_enum(cls, value): if value is None: return value - if value not in ("self", "external"): + if value not in set(["self", "external"]): raise ValueError("must be one of enum values ('self', 'external')") return value @@ -142,7 +144,7 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("prover", "verifier"): + if value not in set(["prover", "verifier"]): raise ValueError("must be one of enum values ('prover', 'verifier')") return value @@ -152,16 +154,18 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ( - "proposal-sent", - "proposal-received", - "request-sent", - "request-received", - "presentation-sent", - "presentation-received", - "done", - "abandoned", - "deleted", + if value not in set( + [ + "proposal-sent", + "proposal-received", + "request-sent", + "request-received", + "presentation-sent", + "presentation-received", + "done", + "abandoned", + "deleted", + ] ): raise ValueError( "must be one of enum values ('proposal-sent', 'proposal-received', 'request-sent', 'request-received', 'presentation-sent', 'presentation-received', 'done', 'abandoned', 'deleted')" @@ -189,7 +193,7 @@ def verified_validate_enum(cls, value): if value is None: return value - if value not in ("true", "false"): + if value not in set(["true", "false"]): raise ValueError("must be one of enum values ('true', 'false')") return value @@ -204,7 +208,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresExRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -218,9 +222,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of by_format @@ -238,7 +244,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresExRecord from a dict""" if obj is None: return None @@ -252,7 +258,7 @@ def from_dict(cls, obj: Dict) -> Self: "auto_remove": obj.get("auto_remove"), "auto_verify": obj.get("auto_verify"), "by_format": ( - V20PresExRecordByFormat.from_dict(obj.get("by_format")) + V20PresExRecordByFormat.from_dict(obj["by_format"]) if obj.get("by_format") is not None else None ), @@ -261,18 +267,18 @@ def from_dict(cls, obj: Dict) -> Self: "error_msg": obj.get("error_msg"), "initiator": obj.get("initiator"), "pres": ( - V20Pres.from_dict(obj.get("pres")) + V20Pres.from_dict(obj["pres"]) if obj.get("pres") is not None else None ), "pres_ex_id": obj.get("pres_ex_id"), "pres_proposal": ( - V20PresProposal.from_dict(obj.get("pres_proposal")) + V20PresProposal.from_dict(obj["pres_proposal"]) if obj.get("pres_proposal") is not None else None ), "pres_request": ( - V20PresRequest.from_dict(obj.get("pres_request")) + V20PresRequest.from_dict(obj["pres_request"]) if obj.get("pres_request") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres_ex_record_by_format.py b/aries_cloudcontroller/models/v20_pres_ex_record_by_format.py index 29e8df25..20fdc15d 100644 --- a/aries_cloudcontroller/models/v20_pres_ex_record_by_format.py +++ b/aries_cloudcontroller/models/v20_pres_ex_record_by_format.py @@ -16,26 +16,22 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresExRecordByFormat(BaseModel): """ V20PresExRecordByFormat """ # noqa: E501 - pres: Optional[Union[str, Any]] = None - pres_proposal: Optional[Union[str, Any]] = None - pres_request: Optional[Union[str, Any]] = None + pres: Optional[Dict[str, Any]] = None + pres_proposal: Optional[Dict[str, Any]] = None + pres_request: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["pres", "pres_proposal", "pres_request"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -49,7 +45,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresExRecordByFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,15 +59,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresExRecordByFormat from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_pres_ex_record_list.py b/aries_cloudcontroller/models/v20_pres_ex_record_list.py index fd61e0f9..806b83ba 100644 --- a/aries_cloudcontroller/models/v20_pres_ex_record_list.py +++ b/aries_cloudcontroller/models/v20_pres_ex_record_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.v20_pres_ex_record import V20PresExRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresExRecordList(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresExRecordList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresExRecordList from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [V20PresExRecord.from_dict(_item) for _item in obj.get("results")] + [V20PresExRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/v20_pres_format.py b/aries_cloudcontroller/models/v20_pres_format.py index 187965f5..eb0a760b 100644 --- a/aries_cloudcontroller/models/v20_pres_format.py +++ b/aries_cloudcontroller/models/v20_pres_format.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresFormat(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresFormat from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_pres_problem_report_request.py b/aries_cloudcontroller/models/v20_pres_problem_report_request.py index ce19795b..85e22398 100644 --- a/aries_cloudcontroller/models/v20_pres_problem_report_request.py +++ b/aries_cloudcontroller/models/v20_pres_problem_report_request.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresProblemReportRequest(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresProblemReportRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresProblemReportRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/v20_pres_proposal.py b/aries_cloudcontroller/models/v20_pres_proposal.py index e28f901e..32b17201 100644 --- a/aries_cloudcontroller/models/v20_pres_proposal.py +++ b/aries_cloudcontroller/models/v20_pres_proposal.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_pres_format import V20PresFormat from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresProposal(BaseModel): """ @@ -68,7 +64,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,11 +79,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in formats (list) @@ -107,7 +107,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresProposal from a dict""" if obj is None: return None @@ -121,14 +121,14 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "formats": ( - [V20PresFormat.from_dict(_item) for _item in obj.get("formats")] + [V20PresFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), "proposals~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("proposals~attach") + for _item in obj["proposals~attach"] ] if obj.get("proposals~attach") is not None else None diff --git a/aries_cloudcontroller/models/v20_pres_proposal_by_format.py b/aries_cloudcontroller/models/v20_pres_proposal_by_format.py index 75283e2b..c7019e61 100644 --- a/aries_cloudcontroller/models/v20_pres_proposal_by_format.py +++ b/aries_cloudcontroller/models/v20_pres_proposal_by_format.py @@ -16,27 +16,27 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.dif_proof_proposal import DIFProofProposal from aries_cloudcontroller.models.indy_proof_request import IndyProofRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresProposalByFormat(BaseModel): """ V20PresProposalByFormat """ # noqa: E501 - dif: Optional[DIFProofProposal] = None - indy: Optional[IndyProofRequest] = None + dif: Optional[DIFProofProposal] = Field( + default=None, description="Presentation proposal for DIF" + ) + indy: Optional[IndyProofRequest] = Field( + default=None, description="Presentation proposal for indy" + ) __properties: ClassVar[List[str]] = ["dif", "indy"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresProposalByFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of dif @@ -78,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresProposalByFormat from a dict""" if obj is None: return None @@ -89,12 +91,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "dif": ( - DIFProofProposal.from_dict(obj.get("dif")) + DIFProofProposal.from_dict(obj["dif"]) if obj.get("dif") is not None else None ), "indy": ( - IndyProofRequest.from_dict(obj.get("indy")) + IndyProofRequest.from_dict(obj["indy"]) if obj.get("indy") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres_proposal_request.py b/aries_cloudcontroller/models/v20_pres_proposal_request.py index a7f5c297..8d79ea18 100644 --- a/aries_cloudcontroller/models/v20_pres_proposal_request.py +++ b/aries_cloudcontroller/models/v20_pres_proposal_request.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_pres_proposal_by_format import ( V20PresProposalByFormat, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresProposalRequest(BaseModel): """ @@ -72,7 +68,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresProposalRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,9 +82,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation_proposal @@ -102,7 +100,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresProposalRequest from a dict""" if obj is None: return None @@ -117,7 +115,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "presentation_proposal": ( - V20PresProposalByFormat.from_dict(obj.get("presentation_proposal")) + V20PresProposalByFormat.from_dict(obj["presentation_proposal"]) if obj.get("presentation_proposal") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres_request.py b/aries_cloudcontroller/models/v20_pres_request.py index 7e15deba..84bf1664 100644 --- a/aries_cloudcontroller/models/v20_pres_request.py +++ b/aries_cloudcontroller/models/v20_pres_request.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.attach_decorator import AttachDecorator from aries_cloudcontroller.models.v20_pres_format import V20PresFormat from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresRequest(BaseModel): """ @@ -72,7 +68,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,11 +83,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set( + [ + "type", + ] + ) + _dict = self.model_dump( by_alias=True, - exclude={ - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in formats (list) @@ -111,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresRequest from a dict""" if obj is None: return None @@ -125,14 +125,14 @@ def from_dict(cls, obj: Dict) -> Self: "@type": obj.get("@type"), "comment": obj.get("comment"), "formats": ( - [V20PresFormat.from_dict(_item) for _item in obj.get("formats")] + [V20PresFormat.from_dict(_item) for _item in obj["formats"]] if obj.get("formats") is not None else None ), "request_presentations~attach": ( [ AttachDecorator.from_dict(_item) - for _item in obj.get("request_presentations~attach") + for _item in obj["request_presentations~attach"] ] if obj.get("request_presentations~attach") is not None else None diff --git a/aries_cloudcontroller/models/v20_pres_request_by_format.py b/aries_cloudcontroller/models/v20_pres_request_by_format.py index b33141d7..910cb28b 100644 --- a/aries_cloudcontroller/models/v20_pres_request_by_format.py +++ b/aries_cloudcontroller/models/v20_pres_request_by_format.py @@ -16,27 +16,27 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel +from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.dif_proof_request import DIFProofRequest from aries_cloudcontroller.models.indy_proof_request import IndyProofRequest from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresRequestByFormat(BaseModel): """ V20PresRequestByFormat """ # noqa: E501 - dif: Optional[DIFProofRequest] = None - indy: Optional[IndyProofRequest] = None + dif: Optional[DIFProofRequest] = Field( + default=None, description="Presentation request for DIF" + ) + indy: Optional[IndyProofRequest] = Field( + default=None, description="Presentation request for indy" + ) __properties: ClassVar[List[str]] = ["dif", "indy"] model_config = DEFAULT_PYDANTIC_MODEL_CONFIG @@ -50,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresRequestByFormat from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +64,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of dif @@ -78,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresRequestByFormat from a dict""" if obj is None: return None @@ -89,12 +91,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "dif": ( - DIFProofRequest.from_dict(obj.get("dif")) + DIFProofRequest.from_dict(obj["dif"]) if obj.get("dif") is not None else None ), "indy": ( - IndyProofRequest.from_dict(obj.get("indy")) + IndyProofRequest.from_dict(obj["indy"]) if obj.get("indy") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres_send_request_request.py b/aries_cloudcontroller/models/v20_pres_send_request_request.py index 148c0a0e..5defc4f2 100644 --- a/aries_cloudcontroller/models/v20_pres_send_request_request.py +++ b/aries_cloudcontroller/models/v20_pres_send_request_request.py @@ -16,20 +16,16 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.v20_pres_request_by_format import ( V20PresRequestByFormat, ) from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresSendRequestRequest(BaseModel): """ @@ -69,7 +65,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresSendRequestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,9 +79,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of presentation_request @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresSendRequestRequest from a dict""" if obj is None: return None @@ -114,7 +112,7 @@ def from_dict(cls, obj: Dict) -> Self: "comment": obj.get("comment"), "connection_id": obj.get("connection_id"), "presentation_request": ( - V20PresRequestByFormat.from_dict(obj.get("presentation_request")) + V20PresRequestByFormat.from_dict(obj["presentation_request"]) if obj.get("presentation_request") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_pres_spec_by_format_request.py b/aries_cloudcontroller/models/v20_pres_spec_by_format_request.py index 98162f0f..0a642874 100644 --- a/aries_cloudcontroller/models/v20_pres_spec_by_format_request.py +++ b/aries_cloudcontroller/models/v20_pres_spec_by_format_request.py @@ -16,19 +16,15 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.models.dif_pres_spec import DIFPresSpec from aries_cloudcontroller.models.indy_pres_spec import IndyPresSpec from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresSpecByFormatRequest(BaseModel): """ @@ -39,8 +35,13 @@ class V20PresSpecByFormatRequest(BaseModel): default=None, description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) - dif: Optional[DIFPresSpec] = None - indy: Optional[IndyPresSpec] = None + dif: Optional[DIFPresSpec] = Field( + default=None, + description="Optional Presentation specification for DIF, overrides the PresentationExchange record's PresRequest", + ) + indy: Optional[IndyPresSpec] = Field( + default=None, description="Presentation specification for indy" + ) trace: Optional[StrictBool] = Field( default=None, description="Record trace information, based on agent configuration", @@ -58,7 +59,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresSpecByFormatRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of dif @@ -86,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresSpecByFormatRequest from a dict""" if obj is None: return None @@ -98,12 +101,12 @@ def from_dict(cls, obj: Dict) -> Self: { "auto_remove": obj.get("auto_remove"), "dif": ( - DIFPresSpec.from_dict(obj.get("dif")) + DIFPresSpec.from_dict(obj["dif"]) if obj.get("dif") is not None else None ), "indy": ( - IndyPresSpec.from_dict(obj.get("indy")) + IndyPresSpec.from_dict(obj["indy"]) if obj.get("indy") is not None else None ), diff --git a/aries_cloudcontroller/models/v20_presentation_send_request_to_proposal.py b/aries_cloudcontroller/models/v20_presentation_send_request_to_proposal.py index 20a420c9..6b405658 100644 --- a/aries_cloudcontroller/models/v20_presentation_send_request_to_proposal.py +++ b/aries_cloudcontroller/models/v20_presentation_send_request_to_proposal.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class V20PresentationSendRequestToProposal(BaseModel): """ @@ -56,7 +52,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V20PresentationSendRequestToProposal from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,15 +66,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V20PresentationSendRequestToProposal from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/vc_record.py b/aries_cloudcontroller/models/vc_record.py index 51520ee1..137e93c7 100644 --- a/aries_cloudcontroller/models/vc_record.py +++ b/aries_cloudcontroller/models/vc_record.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class VCRecord(BaseModel): """ @@ -36,7 +31,7 @@ class VCRecord(BaseModel): contexts: Optional[List[Annotated[str, Field(strict=True)]]] = None cred_tags: Optional[Dict[str, StrictStr]] = None - cred_value: Optional[Union[str, Any]] = Field( + cred_value: Optional[Dict[str, Any]] = Field( default=None, description="(JSON-serializable) credential value" ) expanded_types: Optional[List[StrictStr]] = None @@ -76,7 +71,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of VCRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -90,15 +85,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of VCRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/vc_record_list.py b/aries_cloudcontroller/models/vc_record_list.py index 60f010d3..75c6c6c5 100644 --- a/aries_cloudcontroller/models/vc_record_list.py +++ b/aries_cloudcontroller/models/vc_record_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel +from typing_extensions import Self from aries_cloudcontroller.models.vc_record import VCRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class VCRecordList(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of VCRecordList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,9 +58,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -77,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of VCRecordList from a dict""" if obj is None: return None @@ -88,7 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [VCRecord.from_dict(_item) for _item in obj.get("results")] + [VCRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/verify_request.py b/aries_cloudcontroller/models/verify_request.py index 1fef43c5..536c9cff 100644 --- a/aries_cloudcontroller/models/verify_request.py +++ b/aries_cloudcontroller/models/verify_request.py @@ -16,25 +16,21 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr +from typing_extensions import Self from aries_cloudcontroller.models.signed_doc import SignedDoc from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class VerifyRequest(BaseModel): """ VerifyRequest """ # noqa: E501 - doc: Dict[str, Any] + doc: Dict[str, Any] = Field(description="Signed document") verkey: Optional[StrictStr] = Field( default=None, description="Verkey to use for doc verification" ) @@ -51,7 +47,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of VerifyRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,15 +61,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of VerifyRequest from a dict""" if obj is None: return None @@ -84,7 +82,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "doc": ( - SignedDoc.from_dict(obj.get("doc")) + SignedDoc.from_dict(obj["doc"]) if obj.get("doc") is not None else None ), diff --git a/aries_cloudcontroller/models/verify_response.py b/aries_cloudcontroller/models/verify_response.py index e7074517..28b5cc18 100644 --- a/aries_cloudcontroller/models/verify_response.py +++ b/aries_cloudcontroller/models/verify_response.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class VerifyResponse(BaseModel): """ @@ -48,7 +44,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of VerifyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,15 +58,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of VerifyResponse from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/w3_c_credentials_list_request.py b/aries_cloudcontroller/models/w3_c_credentials_list_request.py index 9bf22243..688b5a72 100644 --- a/aries_cloudcontroller/models/w3_c_credentials_list_request.py +++ b/aries_cloudcontroller/models/w3_c_credentials_list_request.py @@ -16,18 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictInt, StrictStr -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class W3CCredentialsListRequest(BaseModel): """ @@ -78,7 +73,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of W3CCredentialsListRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -92,15 +87,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of W3CCredentialsListRequest from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/wallet_list.py b/aries_cloudcontroller/models/wallet_list.py index 9c70899d..7a7b60cb 100644 --- a/aries_cloudcontroller/models/wallet_list.py +++ b/aries_cloudcontroller/models/wallet_list.py @@ -16,18 +16,14 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field +from typing_extensions import Self from aries_cloudcontroller.models.wallet_record import WalletRecord from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class WalletList(BaseModel): """ @@ -50,7 +46,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WalletList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,9 +60,11 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WalletList from a dict""" if obj is None: return None @@ -90,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "results": ( - [WalletRecord.from_dict(_item) for _item in obj.get("results")] + [WalletRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None ) diff --git a/aries_cloudcontroller/models/wallet_list_with_groups.py b/aries_cloudcontroller/models/wallet_list_with_groups.py index 0b8a7164..d977f804 100644 --- a/aries_cloudcontroller/models/wallet_list_with_groups.py +++ b/aries_cloudcontroller/models/wallet_list_with_groups.py @@ -2,22 +2,19 @@ from typing import Dict, List, Optional +from typing_extensions import Self + from aries_cloudcontroller.models.wallet_list import WalletList from aries_cloudcontroller.models.wallet_record_with_groups import ( WalletRecordWithGroups, ) -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class WalletListWithGroups(WalletList): results: Optional[List[WalletRecordWithGroups]] = None @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WalletListWithGroups from a dict""" if obj is None: return None @@ -30,7 +27,7 @@ def from_dict(cls, obj: Dict) -> Self: "results": ( [ WalletRecordWithGroups.from_dict(_item) - for _item in obj.get("results") + for _item in obj["results"] ] if obj.get("results") is not None else None diff --git a/aries_cloudcontroller/models/wallet_record.py b/aries_cloudcontroller/models/wallet_record.py index 9ce87ca9..910e8ca0 100644 --- a/aries_cloudcontroller/models/wallet_record.py +++ b/aries_cloudcontroller/models/wallet_record.py @@ -17,18 +17,13 @@ import json import pprint import re -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, Field, StrictStr, field_validator -from typing_extensions import Annotated +from typing_extensions import Annotated, Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class WalletRecord(BaseModel): """ @@ -41,7 +36,7 @@ class WalletRecord(BaseModel): key_management_mode: StrictStr = Field( description="Mode regarding management of wallet key" ) - settings: Optional[Union[str, Any]] = Field( + settings: Optional[Dict[str, Any]] = Field( default=None, description="Settings for this wallet." ) state: Optional[StrictStr] = Field(default=None, description="Current record state") @@ -76,7 +71,7 @@ def created_at_validate_regular_expression(cls, value): @field_validator("key_management_mode") def key_management_mode_validate_enum(cls, value): """Validates the enum""" - if value not in ("managed", "unmanaged"): + if value not in set(["managed", "unmanaged"]): raise ValueError("must be one of enum values ('managed', 'unmanaged')") return value @@ -106,7 +101,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WalletRecord from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -120,15 +115,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WalletRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/wallet_record_with_groups.py b/aries_cloudcontroller/models/wallet_record_with_groups.py index 08a87db3..731c3a41 100644 --- a/aries_cloudcontroller/models/wallet_record_with_groups.py +++ b/aries_cloudcontroller/models/wallet_record_with_groups.py @@ -3,20 +3,16 @@ from typing import Dict, Optional from pydantic import Field +from typing_extensions import Self from aries_cloudcontroller.models.wallet_record import WalletRecord -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class WalletRecordWithGroups(WalletRecord): group_id: Optional[str] = Field(None, examples=["SomeGroupId"]) @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WalletRecord from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/models/write_ledger.py b/aries_cloudcontroller/models/write_ledger.py index 0d3c8de7..edd7e103 100644 --- a/aries_cloudcontroller/models/write_ledger.py +++ b/aries_cloudcontroller/models/write_ledger.py @@ -16,17 +16,13 @@ import json import pprint -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, StrictStr +from typing_extensions import Self from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG -try: - from typing import Self -except ImportError: - from typing_extensions import Self - class WriteLedger(BaseModel): """ @@ -47,7 +43,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WriteLedger from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,15 +57,17 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([]) + _dict = self.model_dump( by_alias=True, - exclude={}, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WriteLedger from a dict""" if obj is None: return None diff --git a/aries_cloudcontroller/rest.py b/aries_cloudcontroller/rest.py index 9e43f6b8..def98a5b 100644 --- a/aries_cloudcontroller/rest.py +++ b/aries_cloudcontroller/rest.py @@ -16,8 +16,10 @@ import json import re import ssl +from typing import Optional, Union import aiohttp +import aiohttp_retry from aries_cloudcontroller.configuration import Configuration from aries_cloudcontroller.exceptions import ApiException, ApiValueError @@ -33,8 +35,11 @@ default_configuration.cert_file, keyfile=default_configuration.key_file ) +ALLOW_RETRY_METHODS = frozenset({"DELETE", "GET", "HEAD", "OPTIONS", "PUT", "TRACE"}) + class RESTResponse(io.IOBase): + def __init__(self, resp) -> None: self.response = resp self.status = resp.status @@ -56,7 +61,9 @@ def getheader(self, name, default=None): class RESTClientObject: + def __init__(self, configuration) -> None: + # maxsize is number of requests to host that are allowed in parallel maxsize = configuration.connection_pool_maxsize @@ -78,8 +85,22 @@ def __init__(self, configuration) -> None: # https pool manager self.pool_manager = aiohttp.ClientSession(connector=connector, trust_env=True) + retries = configuration.retries + self.retry_client: Optional[aiohttp_retry.RetryClient] + if retries is not None: + self.retry_client = aiohttp_retry.RetryClient( + client_session=self.pool_manager, + retry_options=aiohttp_retry.ExponentialRetry( + attempts=retries, factor=0.0, start_timeout=0.0, max_timeout=120.0 + ), + ) + else: + self.retry_client = None + async def close(self): await self.pool_manager.close() + if self.retry_client is not None: + await self.retry_client.close() async def request( self, @@ -160,6 +181,12 @@ async def request( declared content type.""" raise ApiException(status=0, reason=msg) - r = await self.pool_manager.request(**args) + pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] + if self.retry_client is not None and method in ALLOW_RETRY_METHODS: + pool_manager = self.retry_client + else: + pool_manager = self.pool_manager + + r = await pool_manager.request(**args) return RESTResponse(r) diff --git a/generator/scripts/clean_validate_decorators.py b/generator/scripts/clean_validate_decorators.py new file mode 100644 index 00000000..74c4426c --- /dev/null +++ b/generator/scripts/clean_validate_decorators.py @@ -0,0 +1,36 @@ +import re +import sys + + +def clean_file(file_path): + """This method cleans up decorators in api modules that have unnecessary validate_call decorators""" + modified_lines = [] + + with open(file_path, "r") as file: + lines = file.readlines() + + i = 0 + while i < len(lines): + if ( + lines[i].strip() == "@validate_call" + and i + 1 < len(lines) + and re.search( + r"async def .*(?:_without_preload_content|_with_http_info)\(", + lines[i + 1], + ) + ): + pass # skip validate_call line because next line matches + else: + modified_lines.append(lines[i]) + i += 1 + + with open(file_path, "w") as file: + file.writelines(modified_lines) + + +if __name__ == "__main__": + # Expecting the first argument to be the file path + if len(sys.argv) > 1: + clean_file(sys.argv[1]) + else: + print("Usage: python clean_decorators.py ") diff --git a/generator/scripts/generate-client.sh b/generator/scripts/generate-client.sh index a89eeaf3..5c5dae95 100755 --- a/generator/scripts/generate-client.sh +++ b/generator/scripts/generate-client.sh @@ -30,3 +30,9 @@ java -ea -server -Duser.timezone=UTC -jar "$(pwd)/../../openapi-generator/module # Copy cd .. cp -r ./generated/aries_cloudcontroller/ . + +# autoflake again to remove newly unused imports +autoflake aries_cloudcontroller -i -r --remove-all-unused-imports --ignore-init-module-imports +# Black format and optimise imports +black aries_cloudcontroller +isort aries_cloudcontroller --profile black diff --git a/generator/scripts/postprocess-client.sh b/generator/scripts/postprocess-client.sh index 5f7e9dc5..7b9b5bc9 100755 --- a/generator/scripts/postprocess-client.sh +++ b/generator/scripts/postprocess-client.sh @@ -12,12 +12,11 @@ autoflake aries_cloudcontroller -i -r --remove-all-unused-imports --ignore-init- # Cleanup generated models for file in aries_cloudcontroller/models/*.py; do # Replace the model config with DEFAULT_PYDANTIC_MODEL_CONFIG - sed -i '/model_config = {/,/}/c\ model_config = DEFAULT_PYDANTIC_MODEL_CONFIG' "$file" + sed -i '/protected_namespaces=()/d' "$file" # first remove this line to make bracket matching easier + sed -i '/model_config = ConfigDict(/,/)/c\ model_config = DEFAULT_PYDANTIC_MODEL_CONFIG' "$file" # Add import statement for this default config, and re-add ClassVar, List imports, as autoflake mistakenly removes them - sed -i '/try:$/N;/try:\n from typing import Self/i \ -from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG\ -from typing import ClassVar, List' "$file" + sed -i '/from typing_extensions import Self/i from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG' "$file" # Replace the TODO lines sed -i '/# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead/N; s/# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead\n return json.dumps(self.to_dict())/return self.model_dump_json(by_alias=True, exclude_unset=True)/' "$file" @@ -26,6 +25,12 @@ from typing import ClassVar, List' "$file" sed -i 's/Field(le=-1,/Field(le=18446744073709551615,/g' "$file" done +echo "Removing redundant validate_call decorators" +for file in aries_cloudcontroller/api/*.py; do + # Use python script to clean unnecessary validate_call decorators + python ../generator/scripts/clean_validate_decorators.py "$file" +done + # Deduplication for __init__.py -- just helps get SonarCloud duplication report to be under threshold! sed -i -E 's/from aries_cloudcontroller\.(\w+)\.\w+ /from aries_cloudcontroller.\1 /g' aries_cloudcontroller/__init__.py @@ -68,9 +73,3 @@ sed -i '/# override the default output from pydantic by calling `to_dict()` of d # Additionally, the API Client we modify so that query_params are converted from bool to str, before being submitted to ACA-Py # This change impacts multiple lines, calling `sanitize_for_serialization` - -# autoflake again to remove newly unused imports -autoflake aries_cloudcontroller -i -r --remove-all-unused-imports --ignore-init-module-imports -# Black format and optimise imports -black aries_cloudcontroller -isort aries_cloudcontroller --profile black diff --git a/requirements.dev.txt b/requirements.dev.txt index 619baf5e..16a4c28c 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,6 +1,6 @@ anyio~=4.3.0 autoflake~=2.3.1 -black~=24.3.0 +black~=24.4.0 isort~=5.13.2 pytest~=8.1.1 -pytest-mock~=3.12.0 +pytest-mock~=3.14.0 diff --git a/requirements.txt b/requirements.txt index ecc569d8..0528fa4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ aiohttp>=3.9.2,<4.0 +aiohttp_retry~=2.8.3 pydantic>=2.6,<3.0 python-dateutil>=2 typing-extensions>=4,<5.0 diff --git a/setup.py b/setup.py index c4a42e6c..2dc5cd80 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def parse_requirements(filename: str): if __name__ == "__main__": setup( name=PACKAGE_NAME, - version="0.11.0-rev3", + version="0.11.0-rev4", description="A simple python client for controlling an ACA-Py agent", long_description=long_description, long_description_content_type="text/markdown",