restpki-ng-python-client 0.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. restpki_ng_python_client/__init__.py +200 -0
  2. restpki_ng_python_client/api/__init__.py +17 -0
  3. restpki_ng_python_client/api/authentication_api.py +2041 -0
  4. restpki_ng_python_client/api/cades_signature_api.py +2376 -0
  5. restpki_ng_python_client/api/document_keys_api.py +1199 -0
  6. restpki_ng_python_client/api/documents_api.py +868 -0
  7. restpki_ng_python_client/api/pades_signature_api.py +1797 -0
  8. restpki_ng_python_client/api/pades_visual_positioning_presets_api.py +869 -0
  9. restpki_ng_python_client/api/pdf_api.py +334 -0
  10. restpki_ng_python_client/api/signature_api.py +624 -0
  11. restpki_ng_python_client/api/signature_inspection_api.py +337 -0
  12. restpki_ng_python_client/api/signature_sessions_api.py +891 -0
  13. restpki_ng_python_client/api/timestamp_api.py +654 -0
  14. restpki_ng_python_client/api/upload_api.py +1124 -0
  15. restpki_ng_python_client/api/xml_signature_api.py +1781 -0
  16. restpki_ng_python_client/api_client.py +741 -0
  17. restpki_ng_python_client/api_response.py +21 -0
  18. restpki_ng_python_client/configuration.py +426 -0
  19. restpki_ng_python_client/exceptions.py +166 -0
  20. restpki_ng_python_client/file_utils.py +122 -0
  21. restpki_ng_python_client/models/__init__.py +165 -0
  22. restpki_ng_python_client/models/allocate_document_key_batch_request.py +96 -0
  23. restpki_ng_python_client/models/allocate_document_key_request.py +93 -0
  24. restpki_ng_python_client/models/attribute_certificate_model.py +141 -0
  25. restpki_ng_python_client/models/audit_package_options.py +90 -0
  26. restpki_ng_python_client/models/authentication_failures.py +45 -0
  27. restpki_ng_python_client/models/authentication_get_response.py +92 -0
  28. restpki_ng_python_client/models/authentication_post_request.py +116 -0
  29. restpki_ng_python_client/models/authentication_post_response.py +98 -0
  30. restpki_ng_python_client/models/authentications_post_request.py +95 -0
  31. restpki_ng_python_client/models/authentications_post_response.py +114 -0
  32. restpki_ng_python_client/models/authentications_post_signed_bytes_request.py +99 -0
  33. restpki_ng_python_client/models/authentications_post_signed_bytes_response.py +98 -0
  34. restpki_ng_python_client/models/auto_positioning_horizontal_directions.py +45 -0
  35. restpki_ng_python_client/models/auto_positioning_vertical_directions.py +45 -0
  36. restpki_ng_python_client/models/blockchains.py +45 -0
  37. restpki_ng_python_client/models/cades_signature_model.py +123 -0
  38. restpki_ng_python_client/models/cades_signature_post_request_v1.py +137 -0
  39. restpki_ng_python_client/models/cades_signature_post_request_v2.py +152 -0
  40. restpki_ng_python_client/models/cades_signature_post_request_v3.py +149 -0
  41. restpki_ng_python_client/models/cades_signature_post_response.py +120 -0
  42. restpki_ng_python_client/models/cades_signature_post_signed_bytes_request.py +92 -0
  43. restpki_ng_python_client/models/cades_signature_post_signed_bytes_response.py +106 -0
  44. restpki_ng_python_client/models/cades_signer_model.py +159 -0
  45. restpki_ng_python_client/models/cades_timestamp_model.py +140 -0
  46. restpki_ng_python_client/models/certificate_model.py +197 -0
  47. restpki_ng_python_client/models/certificate_reference_model.py +99 -0
  48. restpki_ng_python_client/models/certificate_requirement.py +95 -0
  49. restpki_ng_python_client/models/certificate_requirement_types.py +45 -0
  50. restpki_ng_python_client/models/certificate_summary.py +142 -0
  51. restpki_ng_python_client/models/certified_attribute_model.py +94 -0
  52. restpki_ng_python_client/models/certified_attribute_types.py +44 -0
  53. restpki_ng_python_client/models/cms_content_types.py +50 -0
  54. restpki_ng_python_client/models/cms_signature_options.py +109 -0
  55. restpki_ng_python_client/models/color_model.py +98 -0
  56. restpki_ng_python_client/models/commitment_type_model.py +99 -0
  57. restpki_ng_python_client/models/complete_authentication_request.py +93 -0
  58. restpki_ng_python_client/models/complete_authentication_response.py +103 -0
  59. restpki_ng_python_client/models/complete_signature_request.py +95 -0
  60. restpki_ng_python_client/models/complete_signature_request_v2.py +91 -0
  61. restpki_ng_python_client/models/create_signature_session_request.py +161 -0
  62. restpki_ng_python_client/models/create_signature_session_response.py +95 -0
  63. restpki_ng_python_client/models/digest_algorithm_and_value_model.py +103 -0
  64. restpki_ng_python_client/models/digest_algorithms.py +49 -0
  65. restpki_ng_python_client/models/document_file_model.py +137 -0
  66. restpki_ng_python_client/models/document_key_model.py +100 -0
  67. restpki_ng_python_client/models/document_key_query_response.py +110 -0
  68. restpki_ng_python_client/models/document_key_summary.py +100 -0
  69. restpki_ng_python_client/models/document_model.py +150 -0
  70. restpki_ng_python_client/models/document_query_response.py +93 -0
  71. restpki_ng_python_client/models/document_status.py +47 -0
  72. restpki_ng_python_client/models/document_summary.py +128 -0
  73. restpki_ng_python_client/models/error_model_v2.py +120 -0
  74. restpki_ng_python_client/models/file_model.py +114 -0
  75. restpki_ng_python_client/models/file_reference_model.py +137 -0
  76. restpki_ng_python_client/models/full_xml_signature_post_request.py +136 -0
  77. restpki_ng_python_client/models/general_name_choices.py +52 -0
  78. restpki_ng_python_client/models/general_name_model.py +108 -0
  79. restpki_ng_python_client/models/holder_types.py +45 -0
  80. restpki_ng_python_client/models/inspect_signature_failures.py +44 -0
  81. restpki_ng_python_client/models/inspect_signature_request.py +127 -0
  82. restpki_ng_python_client/models/inspect_signature_response.py +131 -0
  83. restpki_ng_python_client/models/multipart_upload_begin_response.py +95 -0
  84. restpki_ng_python_client/models/multipart_upload_end_request.py +95 -0
  85. restpki_ng_python_client/models/name_model.py +205 -0
  86. restpki_ng_python_client/models/namespace_model.py +99 -0
  87. restpki_ng_python_client/models/open_cades_signature_request_model.py +147 -0
  88. restpki_ng_python_client/models/open_signature_request_model.py +145 -0
  89. restpki_ng_python_client/models/open_xml_signature_request_model.py +151 -0
  90. restpki_ng_python_client/models/other_name_model.py +107 -0
  91. restpki_ng_python_client/models/pades_certification_level.py +47 -0
  92. restpki_ng_python_client/models/pades_horizontal_align.py +46 -0
  93. restpki_ng_python_client/models/pades_measurement_units.py +45 -0
  94. restpki_ng_python_client/models/pades_page_optimization_model.py +98 -0
  95. restpki_ng_python_client/models/pades_signature_model.py +113 -0
  96. restpki_ng_python_client/models/pades_signature_post_request_v1.py +167 -0
  97. restpki_ng_python_client/models/pades_signature_post_request_v2.py +171 -0
  98. restpki_ng_python_client/models/pades_signature_post_response.py +120 -0
  99. restpki_ng_python_client/models/pades_signature_post_signed_bytes_request.py +92 -0
  100. restpki_ng_python_client/models/pades_signature_post_signed_bytes_response.py +106 -0
  101. restpki_ng_python_client/models/pades_signer_model.py +168 -0
  102. restpki_ng_python_client/models/pades_size_model.py +89 -0
  103. restpki_ng_python_client/models/pades_text_horizontal_align.py +45 -0
  104. restpki_ng_python_client/models/pades_vertical_align.py +46 -0
  105. restpki_ng_python_client/models/pades_visual_auto_positioning_model.py +106 -0
  106. restpki_ng_python_client/models/pades_visual_image_model.py +105 -0
  107. restpki_ng_python_client/models/pades_visual_positioning_model.py +109 -0
  108. restpki_ng_python_client/models/pades_visual_rectangle_model.py +127 -0
  109. restpki_ng_python_client/models/pades_visual_representation_model.py +103 -0
  110. restpki_ng_python_client/models/pades_visual_text_model.py +111 -0
  111. restpki_ng_python_client/models/page_orientations.py +46 -0
  112. restpki_ng_python_client/models/paper_sizes.py +56 -0
  113. restpki_ng_python_client/models/pdf_add_marks_request.py +117 -0
  114. restpki_ng_python_client/models/pdf_add_marks_response.py +91 -0
  115. restpki_ng_python_client/models/pdf_container_definition.py +208 -0
  116. restpki_ng_python_client/models/pdf_helper.py +43 -0
  117. restpki_ng_python_client/models/pdf_mark_element_model.py +230 -0
  118. restpki_ng_python_client/models/pdf_mark_element_type.py +46 -0
  119. restpki_ng_python_client/models/pdf_mark_image_model.py +98 -0
  120. restpki_ng_python_client/models/pdf_mark_model.py +168 -0
  121. restpki_ng_python_client/models/pdf_mark_page_options.py +47 -0
  122. restpki_ng_python_client/models/pdf_signature_options.py +101 -0
  123. restpki_ng_python_client/models/pdf_text_section_model.py +125 -0
  124. restpki_ng_python_client/models/pdf_text_style.py +46 -0
  125. restpki_ng_python_client/models/pki_brazil_certificate_model.py +159 -0
  126. restpki_ng_python_client/models/pki_brazil_certificate_types.py +54 -0
  127. restpki_ng_python_client/models/pki_italy_certificate_model.py +103 -0
  128. restpki_ng_python_client/models/pki_italy_certificate_types.py +46 -0
  129. restpki_ng_python_client/models/prepare_authentication_request.py +100 -0
  130. restpki_ng_python_client/models/prepare_authentication_response.py +99 -0
  131. restpki_ng_python_client/models/prepare_signature_failures.py +46 -0
  132. restpki_ng_python_client/models/prepare_signature_request.py +133 -0
  133. restpki_ng_python_client/models/prepare_signature_response.py +116 -0
  134. restpki_ng_python_client/models/resource_content_or_reference.py +107 -0
  135. restpki_ng_python_client/models/role_attribute_model.py +114 -0
  136. restpki_ng_python_client/models/session_completion_status.py +89 -0
  137. restpki_ng_python_client/models/signature_algorithm_and_value_model.py +106 -0
  138. restpki_ng_python_client/models/signature_algorithm_identifier.py +88 -0
  139. restpki_ng_python_client/models/signature_algorithms.py +48 -0
  140. restpki_ng_python_client/models/signature_b_stamp_model.py +135 -0
  141. restpki_ng_python_client/models/signature_policy_identifier_model.py +105 -0
  142. restpki_ng_python_client/models/signature_result_model.py +105 -0
  143. restpki_ng_python_client/models/signature_session_document_data.py +128 -0
  144. restpki_ng_python_client/models/signature_session_document_summary.py +138 -0
  145. restpki_ng_python_client/models/signature_session_model.py +126 -0
  146. restpki_ng_python_client/models/signature_session_status.py +49 -0
  147. restpki_ng_python_client/models/signature_types.py +46 -0
  148. restpki_ng_python_client/models/signer_b_stamp_model.py +132 -0
  149. restpki_ng_python_client/models/signer_model.py +187 -0
  150. restpki_ng_python_client/models/signer_summary.py +94 -0
  151. restpki_ng_python_client/models/timestamp_issue_response.py +99 -0
  152. restpki_ng_python_client/models/validation_item_model.py +111 -0
  153. restpki_ng_python_client/models/validation_item_types.py +91 -0
  154. restpki_ng_python_client/models/validation_results_model.py +131 -0
  155. restpki_ng_python_client/models/webhook_event_model.py +94 -0
  156. restpki_ng_python_client/models/webhook_event_types.py +44 -0
  157. restpki_ng_python_client/models/xml_attribute_model.py +107 -0
  158. restpki_ng_python_client/models/xml_element_location_model.py +111 -0
  159. restpki_ng_python_client/models/xml_element_model.py +115 -0
  160. restpki_ng_python_client/models/xml_element_signature_post_request.py +145 -0
  161. restpki_ng_python_client/models/xml_id_attribute_model.py +96 -0
  162. restpki_ng_python_client/models/xml_id_resolution_table_model.py +123 -0
  163. restpki_ng_python_client/models/xml_insertion_options.py +47 -0
  164. restpki_ng_python_client/models/xml_node_name_model.py +96 -0
  165. restpki_ng_python_client/models/xml_signature_model.py +154 -0
  166. restpki_ng_python_client/models/xml_signature_options.py +102 -0
  167. restpki_ng_python_client/models/xml_signature_post_response.py +120 -0
  168. restpki_ng_python_client/models/xml_signature_post_signed_bytes_request.py +92 -0
  169. restpki_ng_python_client/models/xml_signature_post_signed_bytes_response.py +106 -0
  170. restpki_ng_python_client/models/xml_signature_response_model.py +113 -0
  171. restpki_ng_python_client/models/xml_signature_types.py +47 -0
  172. restpki_ng_python_client/models/xml_signed_entity_types.py +46 -0
  173. restpki_ng_python_client/py.typed +0 -0
  174. restpki_ng_python_client/rest.py +231 -0
  175. restpki_ng_python_client/restpki_ng_client.py +458 -0
  176. restpki_ng_python_client/standard_signature_policies.py +24 -0
  177. restpki_ng_python_client/utils.py +80 -0
  178. restpki_ng_python_client-0.9.0.dist-info/METADATA +16 -0
  179. restpki_ng_python_client-0.9.0.dist-info/RECORD +181 -0
  180. restpki_ng_python_client-0.9.0.dist-info/WHEEL +5 -0
  181. restpki_ng_python_client-0.9.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2041 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rest PKI Core API
5
+
6
+ <b><i>Para Português, <a href=\"https://docs.lacunasoftware.com/pt-br/articles/rest-pki/core/integration/get-started\">clique aqui</a></i></b> <p> <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/\">Rest PKI Core</a> is an upcoming version of <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/\">Rest PKI</a> that will have extended compatibility with environments and databases. </p> <p> In addition to Windows Server (which is already supported by Rest PKI), Rest PKI Core will also run on <b>Linux</b> (Debian- and RedHat-based distributions) and on <b>Docker</b>. As for database servers, in addition to SQL Server, <b>PostgreSQL</b> will also be supported. </p> <p> <b>Before getting started, see the integration overview on the <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/integration/\">Integration Guide</a></b> </p> <p> For questions regarding the usage of this API, please reach us at <a href=\"https://lacuna.help/\">lacuna.help</a> </p> <h2>Parameters</h2> <p> You will need the following parameters: </p> <ul> <li><b>Endpoint</b>: address of the Rest PKI Core instance that will be used</li> <li><b>API Key</b>: authorization key for using the API</li> </ul> <p> The <span class=\"model\">endpoint</span> must be prefixed to all relative URLs mentioned here. As for the <span class=\"model\">API Key</span>, see how to use it below. </p> <h2>Authentication</h2> <p> The API key must be sent on the <span class=\"model\">X-Api-Key</span> header on each request: </p> <!-- unfortunately, class \"example microlight\" doesn't seem to work here --> <pre style=\"font-size: 12px; padding: 10px; border-radius: 4px; background: #41444e; font-weight: 600; color: #fff;\"> X-Api-Key: yourapp|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </pre> <h2>HTTP Codes</h2> <p> The APIs will return the following HTTP codes: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong class=\"model-title\">200 (OK)</strong></td> <td>Request processed successfully. The response is different for each API, please refer to the operation's documentation</td> </tr> <tr> <td><strong class=\"model-title\">400 (Bad Request)</strong></td> <td>Syntax error. For instance, when a required field was not provided</td> </tr> <tr> <td><strong class=\"model-title\">401 (Unauthorized)</strong></td> <td>API key not provided or invalid</td> </tr> <tr> <td><strong class=\"model-title\">403 (Forbidden)</strong></td> <td>API key is valid, but the application has insufficient permissions to complete the requested operation</td> </tr> <tr> <td><strong class=\"model-title\">422 (Unprocessable Entity)</strong></td> <td>API error. The response body is an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> </tr> <tr> <td><strong class=\"model-title\">500 (Internal Server Error)</strong></td> <td>An unexpected error occurred. The <span class=\"model\">exceptionCode</span> contained on the response body may be of help for our support team during diagnostic.</td> </tr> </tbody> </table> <h3>Error Codes</h3> <p> Some of the error codes returned in the <span class=\"model\">code</span> field of an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> (body of responses with HTTP status code 422) are provided below*: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td class=\"model\">DocumentNotFound</td> <td>A referenced document was not found (check the document ID)</td> </tr> <tr> <td class=\"model\">SecurityContextNotFound</td> <td>A referenced security context was not found (check the security context ID)</td> </tr> <tr> <td class=\"model\">SignatureSessionNotFound</td> <td>A referenced signature session was not found (check the signature session ID)</td> </tr> <tr> <td class=\"model\">BadSignatureSessionOperation</td> <td>The operation is invalid for the current signature session or document status. For instance, trying to await the session's completion if it is still <span class=\"model\">Pending</span> results in this error</td> </tr> <tr> <td class=\"model\">BackgroundProcessing</td> <td>The operation cannot be completed at this time because the resource is being processed in background</td> </tr> <tr> <td class=\"model\">SignatureSessionTokenRequired</td> <td>The signature session token was not passed on the <span class=\"model\">X-Signature-Session-Token</span> request header</td> </tr> <tr> <td class=\"model\">BadSignatureSessionToken</td> <td>An invalid signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Check your application for possible corruption of the session token, which may contain characters <span class=\"code\">-</span> (hyphen) and <span class=\"code\">_</span> (underscore)</td> </tr> <tr> <td class=\"model\">ExpiredSignatureSessionToken</td> <td>An expired signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Signature session tokens are normally valid for 4 hours.</td> </tr> </tbody> </table> <p style=\"font-size: 0.9em\"> *The codes shown above are the most common error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning. </p> <h2>Culture / Internationalization (i18n)</h2> <p>The <span class=\"model\">Accept-Language</span> request header is observed by this API. The following cultures are supported:</p> <ul> <li><span class=\"code\">en-US</span> (or simply <span class=\"code\">en</span>)</li> <li><span class=\"code\">pt-BR</span> (or simply <span class=\"code\">pt</span>)</li> </ul> <p><i>Notice: error messages are not affected by this header and therefore should not be displayed to users, being better suited for logging.</i></p>
7
+
8
+ The version of the OpenAPI document: 2.1.2
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import io
16
+ import warnings
17
+
18
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
19
+ from typing import Dict, List, Optional, Tuple, Union, Any
20
+
21
+ try:
22
+ from typing import Annotated
23
+ except ImportError:
24
+ from typing_extensions import Annotated
25
+
26
+ from pydantic import StrictStr
27
+
28
+ from typing import Optional
29
+
30
+ from restpki_ng_python_client.models.authentication_get_response import AuthenticationGetResponse
31
+ from restpki_ng_python_client.models.authentication_post_request import AuthenticationPostRequest
32
+ from restpki_ng_python_client.models.authentication_post_response import AuthenticationPostResponse
33
+ from restpki_ng_python_client.models.authentications_post_request import AuthenticationsPostRequest
34
+ from restpki_ng_python_client.models.authentications_post_response import AuthenticationsPostResponse
35
+ from restpki_ng_python_client.models.authentications_post_signed_bytes_request import AuthenticationsPostSignedBytesRequest
36
+ from restpki_ng_python_client.models.authentications_post_signed_bytes_response import AuthenticationsPostSignedBytesResponse
37
+ from restpki_ng_python_client.models.complete_authentication_request import CompleteAuthenticationRequest
38
+ from restpki_ng_python_client.models.complete_authentication_response import CompleteAuthenticationResponse
39
+ from restpki_ng_python_client.models.prepare_authentication_request import PrepareAuthenticationRequest
40
+ from restpki_ng_python_client.models.prepare_authentication_response import PrepareAuthenticationResponse
41
+
42
+ from restpki_ng_python_client.api_client import ApiClient
43
+ from restpki_ng_python_client.api_response import ApiResponse
44
+ from restpki_ng_python_client.rest import RESTResponseType
45
+
46
+
47
+ class AuthenticationApi:
48
+ """NOTE: This class is auto generated by OpenAPI Generator
49
+ Ref: https://openapi-generator.tech
50
+
51
+ Do not edit the class manually.
52
+ """
53
+
54
+ def __init__(self, api_client=None) -> None:
55
+ if api_client is None:
56
+ api_client = ApiClient.get_default()
57
+ self.api_client = api_client
58
+
59
+
60
+ @validate_call
61
+ def api_authentication_get(
62
+ self,
63
+ _request_timeout: Union[
64
+ None,
65
+ Annotated[StrictFloat, Field(gt=0)],
66
+ Tuple[
67
+ Annotated[StrictFloat, Field(gt=0)],
68
+ Annotated[StrictFloat, Field(gt=0)]
69
+ ]
70
+ ] = None,
71
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
72
+ _content_type: Optional[StrictStr] = None,
73
+ _headers: Optional[Dict[StrictStr, Any]] = None,
74
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
75
+ ) -> AuthenticationGetResponse:
76
+ """api_authentication_get
77
+
78
+
79
+ :param _request_timeout: timeout setting for this request. If one
80
+ number provided, it will be total request
81
+ timeout. It can also be a pair (tuple) of
82
+ (connection, read) timeouts.
83
+ :type _request_timeout: int, tuple(int, int), optional
84
+ :param _request_auth: set to override the auth_settings for an a single
85
+ request; this effectively ignores the
86
+ authentication in the spec for a single request.
87
+ :type _request_auth: dict, optional
88
+ :param _content_type: force content-type for the request.
89
+ :type _content_type: str, Optional
90
+ :param _headers: set to override the headers for a single
91
+ request; this effectively ignores the headers
92
+ in the spec for a single request.
93
+ :type _headers: dict, optional
94
+ :param _host_index: set to override the host_index for a single
95
+ request; this effectively ignores the host_index
96
+ in the spec for a single request.
97
+ :type _host_index: int, optional
98
+ :return: Returns the result object.
99
+ """ # noqa: E501
100
+
101
+ _param = self._api_authentication_get_serialize(
102
+ _request_auth=_request_auth,
103
+ _content_type=_content_type,
104
+ _headers=_headers,
105
+ _host_index=_host_index
106
+ )
107
+
108
+ _response_types_map: Dict[str, Optional[str]] = {
109
+ '200': "AuthenticationGetResponse",
110
+ '400': None,
111
+ '401': None,
112
+ '403': None,
113
+ '422': None
114
+
115
+ }
116
+ response_data = self.api_client.call_api(
117
+ *_param,
118
+ _request_timeout=_request_timeout
119
+ )
120
+ response_data.read()
121
+ return self.api_client.response_deserialize(
122
+ response_data=response_data,
123
+ response_types_map=_response_types_map,
124
+ ).data
125
+
126
+
127
+ @validate_call
128
+ def api_authentication_get_with_http_info(
129
+ self,
130
+ _request_timeout: Union[
131
+ None,
132
+ Annotated[StrictFloat, Field(gt=0)],
133
+ Tuple[
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Annotated[StrictFloat, Field(gt=0)]
136
+ ]
137
+ ] = None,
138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
139
+ _content_type: Optional[StrictStr] = None,
140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
142
+ ) -> ApiResponse[AuthenticationGetResponse]:
143
+ """api_authentication_get
144
+
145
+
146
+ :param _request_timeout: timeout setting for this request. If one
147
+ number provided, it will be total request
148
+ timeout. It can also be a pair (tuple) of
149
+ (connection, read) timeouts.
150
+ :type _request_timeout: int, tuple(int, int), optional
151
+ :param _request_auth: set to override the auth_settings for an a single
152
+ request; this effectively ignores the
153
+ authentication in the spec for a single request.
154
+ :type _request_auth: dict, optional
155
+ :param _content_type: force content-type for the request.
156
+ :type _content_type: str, Optional
157
+ :param _headers: set to override the headers for a single
158
+ request; this effectively ignores the headers
159
+ in the spec for a single request.
160
+ :type _headers: dict, optional
161
+ :param _host_index: set to override the host_index for a single
162
+ request; this effectively ignores the host_index
163
+ in the spec for a single request.
164
+ :type _host_index: int, optional
165
+ :return: Returns the result object.
166
+ """ # noqa: E501
167
+
168
+ _param = self._api_authentication_get_serialize(
169
+ _request_auth=_request_auth,
170
+ _content_type=_content_type,
171
+ _headers=_headers,
172
+ _host_index=_host_index
173
+ )
174
+
175
+ _response_types_map: Dict[str, Optional[str]] = {
176
+ '200': "AuthenticationGetResponse",
177
+ '400': None,
178
+ '401': None,
179
+ '403': None,
180
+ '422': None
181
+
182
+ }
183
+ response_data = self.api_client.call_api(
184
+ *_param,
185
+ _request_timeout=_request_timeout
186
+ )
187
+ response_data.read()
188
+ return self.api_client.response_deserialize(
189
+ response_data=response_data,
190
+ response_types_map=_response_types_map,
191
+ )
192
+
193
+
194
+ @validate_call
195
+ def api_authentication_get_without_preload_content(
196
+ self,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """api_authentication_get
211
+
212
+
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._api_authentication_get_serialize(
236
+ _request_auth=_request_auth,
237
+ _content_type=_content_type,
238
+ _headers=_headers,
239
+ _host_index=_host_index
240
+ )
241
+
242
+ _response_types_map: Dict[str, Optional[str]] = {
243
+ '200': "AuthenticationGetResponse",
244
+ '400': None,
245
+ '401': None,
246
+ '403': None,
247
+ '422': None
248
+
249
+ }
250
+ response_data = self.api_client.call_api(
251
+ *_param,
252
+ _request_timeout=_request_timeout
253
+ )
254
+ return response_data.response
255
+
256
+
257
+ def _api_authentication_get_serialize(
258
+ self,
259
+ _request_auth,
260
+ _content_type,
261
+ _headers,
262
+ _host_index,
263
+ ) -> Tuple:
264
+
265
+ _host = None
266
+
267
+ _collection_formats: Dict[str, str] = {
268
+
269
+ }
270
+
271
+ _path_params: Dict[str, str] = {}
272
+ _query_params: List[Tuple[str, str]] = []
273
+ _header_params: Dict[str, Optional[str]] = _headers or {}
274
+ _form_params: List[Tuple[str, str]] = []
275
+ _files: Dict[str, str] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ # process the query parameters
280
+ # process the header parameters
281
+ # process the form parameters
282
+ # process the body parameter
283
+
284
+
285
+ # set the HTTP header `Accept`
286
+ _header_params['Accept'] = self.api_client.select_header_accept(
287
+ [
288
+ 'text/plain',
289
+ 'application/json',
290
+ 'text/json'
291
+ ]
292
+ )
293
+
294
+
295
+ # authentication setting
296
+ _auth_settings: List[str] = [
297
+ ]
298
+
299
+ return self.api_client.param_serialize(
300
+ method='GET',
301
+ resource_path='/Api/Authentication',
302
+ path_params=_path_params,
303
+ query_params=_query_params,
304
+ header_params=_header_params,
305
+ body=_body_params,
306
+ post_params=_form_params,
307
+ files=_files,
308
+ auth_settings=_auth_settings,
309
+ collection_formats=_collection_formats,
310
+ _host=_host,
311
+ _request_auth=_request_auth
312
+ )
313
+
314
+
315
+
316
+
317
+ @validate_call
318
+ def api_authentication_post(
319
+ self,
320
+ authentication_post_request: Optional[AuthenticationPostRequest] = None,
321
+ _request_timeout: Union[
322
+ None,
323
+ Annotated[StrictFloat, Field(gt=0)],
324
+ Tuple[
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Annotated[StrictFloat, Field(gt=0)]
327
+ ]
328
+ ] = None,
329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
330
+ _content_type: Optional[StrictStr] = None,
331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
333
+ ) -> AuthenticationPostResponse:
334
+ """api_authentication_post
335
+
336
+
337
+ :param authentication_post_request:
338
+ :type authentication_post_request: AuthenticationPostRequest
339
+ :param _request_timeout: timeout setting for this request. If one
340
+ number provided, it will be total request
341
+ timeout. It can also be a pair (tuple) of
342
+ (connection, read) timeouts.
343
+ :type _request_timeout: int, tuple(int, int), optional
344
+ :param _request_auth: set to override the auth_settings for an a single
345
+ request; this effectively ignores the
346
+ authentication in the spec for a single request.
347
+ :type _request_auth: dict, optional
348
+ :param _content_type: force content-type for the request.
349
+ :type _content_type: str, Optional
350
+ :param _headers: set to override the headers for a single
351
+ request; this effectively ignores the headers
352
+ in the spec for a single request.
353
+ :type _headers: dict, optional
354
+ :param _host_index: set to override the host_index for a single
355
+ request; this effectively ignores the host_index
356
+ in the spec for a single request.
357
+ :type _host_index: int, optional
358
+ :return: Returns the result object.
359
+ """ # noqa: E501
360
+
361
+ _param = self._api_authentication_post_serialize(
362
+ authentication_post_request=authentication_post_request,
363
+ _request_auth=_request_auth,
364
+ _content_type=_content_type,
365
+ _headers=_headers,
366
+ _host_index=_host_index
367
+ )
368
+
369
+ _response_types_map: Dict[str, Optional[str]] = {
370
+ '200': "AuthenticationPostResponse",
371
+ '400': None,
372
+ '401': None,
373
+ '403': None,
374
+ '422': None
375
+
376
+ }
377
+ response_data = self.api_client.call_api(
378
+ *_param,
379
+ _request_timeout=_request_timeout
380
+ )
381
+ response_data.read()
382
+ return self.api_client.response_deserialize(
383
+ response_data=response_data,
384
+ response_types_map=_response_types_map,
385
+ ).data
386
+
387
+
388
+ @validate_call
389
+ def api_authentication_post_with_http_info(
390
+ self,
391
+ authentication_post_request: Optional[AuthenticationPostRequest] = None,
392
+ _request_timeout: Union[
393
+ None,
394
+ Annotated[StrictFloat, Field(gt=0)],
395
+ Tuple[
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Annotated[StrictFloat, Field(gt=0)]
398
+ ]
399
+ ] = None,
400
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
401
+ _content_type: Optional[StrictStr] = None,
402
+ _headers: Optional[Dict[StrictStr, Any]] = None,
403
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
404
+ ) -> ApiResponse[AuthenticationPostResponse]:
405
+ """api_authentication_post
406
+
407
+
408
+ :param authentication_post_request:
409
+ :type authentication_post_request: AuthenticationPostRequest
410
+ :param _request_timeout: timeout setting for this request. If one
411
+ number provided, it will be total request
412
+ timeout. It can also be a pair (tuple) of
413
+ (connection, read) timeouts.
414
+ :type _request_timeout: int, tuple(int, int), optional
415
+ :param _request_auth: set to override the auth_settings for an a single
416
+ request; this effectively ignores the
417
+ authentication in the spec for a single request.
418
+ :type _request_auth: dict, optional
419
+ :param _content_type: force content-type for the request.
420
+ :type _content_type: str, Optional
421
+ :param _headers: set to override the headers for a single
422
+ request; this effectively ignores the headers
423
+ in the spec for a single request.
424
+ :type _headers: dict, optional
425
+ :param _host_index: set to override the host_index for a single
426
+ request; this effectively ignores the host_index
427
+ in the spec for a single request.
428
+ :type _host_index: int, optional
429
+ :return: Returns the result object.
430
+ """ # noqa: E501
431
+
432
+ _param = self._api_authentication_post_serialize(
433
+ authentication_post_request=authentication_post_request,
434
+ _request_auth=_request_auth,
435
+ _content_type=_content_type,
436
+ _headers=_headers,
437
+ _host_index=_host_index
438
+ )
439
+
440
+ _response_types_map: Dict[str, Optional[str]] = {
441
+ '200': "AuthenticationPostResponse",
442
+ '400': None,
443
+ '401': None,
444
+ '403': None,
445
+ '422': None
446
+
447
+ }
448
+ response_data = self.api_client.call_api(
449
+ *_param,
450
+ _request_timeout=_request_timeout
451
+ )
452
+ response_data.read()
453
+ return self.api_client.response_deserialize(
454
+ response_data=response_data,
455
+ response_types_map=_response_types_map,
456
+ )
457
+
458
+
459
+ @validate_call
460
+ def api_authentication_post_without_preload_content(
461
+ self,
462
+ authentication_post_request: Optional[AuthenticationPostRequest] = None,
463
+ _request_timeout: Union[
464
+ None,
465
+ Annotated[StrictFloat, Field(gt=0)],
466
+ Tuple[
467
+ Annotated[StrictFloat, Field(gt=0)],
468
+ Annotated[StrictFloat, Field(gt=0)]
469
+ ]
470
+ ] = None,
471
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
472
+ _content_type: Optional[StrictStr] = None,
473
+ _headers: Optional[Dict[StrictStr, Any]] = None,
474
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
475
+ ) -> RESTResponseType:
476
+ """api_authentication_post
477
+
478
+
479
+ :param authentication_post_request:
480
+ :type authentication_post_request: AuthenticationPostRequest
481
+ :param _request_timeout: timeout setting for this request. If one
482
+ number provided, it will be total request
483
+ timeout. It can also be a pair (tuple) of
484
+ (connection, read) timeouts.
485
+ :type _request_timeout: int, tuple(int, int), optional
486
+ :param _request_auth: set to override the auth_settings for an a single
487
+ request; this effectively ignores the
488
+ authentication in the spec for a single request.
489
+ :type _request_auth: dict, optional
490
+ :param _content_type: force content-type for the request.
491
+ :type _content_type: str, Optional
492
+ :param _headers: set to override the headers for a single
493
+ request; this effectively ignores the headers
494
+ in the spec for a single request.
495
+ :type _headers: dict, optional
496
+ :param _host_index: set to override the host_index for a single
497
+ request; this effectively ignores the host_index
498
+ in the spec for a single request.
499
+ :type _host_index: int, optional
500
+ :return: Returns the result object.
501
+ """ # noqa: E501
502
+
503
+ _param = self._api_authentication_post_serialize(
504
+ authentication_post_request=authentication_post_request,
505
+ _request_auth=_request_auth,
506
+ _content_type=_content_type,
507
+ _headers=_headers,
508
+ _host_index=_host_index
509
+ )
510
+
511
+ _response_types_map: Dict[str, Optional[str]] = {
512
+ '200': "AuthenticationPostResponse",
513
+ '400': None,
514
+ '401': None,
515
+ '403': None,
516
+ '422': None
517
+
518
+ }
519
+ response_data = self.api_client.call_api(
520
+ *_param,
521
+ _request_timeout=_request_timeout
522
+ )
523
+ return response_data.response
524
+
525
+
526
+ def _api_authentication_post_serialize(
527
+ self,
528
+ authentication_post_request,
529
+ _request_auth,
530
+ _content_type,
531
+ _headers,
532
+ _host_index,
533
+ ) -> Tuple:
534
+
535
+ _host = None
536
+
537
+ _collection_formats: Dict[str, str] = {
538
+
539
+ }
540
+
541
+ _path_params: Dict[str, str] = {}
542
+ _query_params: List[Tuple[str, str]] = []
543
+ _header_params: Dict[str, Optional[str]] = _headers or {}
544
+ _form_params: List[Tuple[str, str]] = []
545
+ _files: Dict[str, str] = {}
546
+ _body_params: Optional[bytes] = None
547
+
548
+ # process the path parameters
549
+ # process the query parameters
550
+ # process the header parameters
551
+ # process the form parameters
552
+ # process the body parameter
553
+ if authentication_post_request is not None:
554
+ _body_params = authentication_post_request
555
+
556
+
557
+ # set the HTTP header `Accept`
558
+ _header_params['Accept'] = self.api_client.select_header_accept(
559
+ [
560
+ 'text/plain',
561
+ 'application/json',
562
+ 'text/json'
563
+ ]
564
+ )
565
+
566
+ # set the HTTP header `Content-Type`
567
+ if _content_type:
568
+ _header_params['Content-Type'] = _content_type
569
+ else:
570
+ _default_content_type = (
571
+ self.api_client.select_header_content_type(
572
+ [
573
+ 'application/json-patch+json',
574
+ 'application/json',
575
+ 'text/json',
576
+ 'application/*+json'
577
+ ]
578
+ )
579
+ )
580
+ if _default_content_type is not None:
581
+ _header_params['Content-Type'] = _default_content_type
582
+
583
+ # authentication setting
584
+ _auth_settings: List[str] = [
585
+ ]
586
+
587
+ return self.api_client.param_serialize(
588
+ method='POST',
589
+ resource_path='/Api/Authentication',
590
+ path_params=_path_params,
591
+ query_params=_query_params,
592
+ header_params=_header_params,
593
+ body=_body_params,
594
+ post_params=_form_params,
595
+ files=_files,
596
+ auth_settings=_auth_settings,
597
+ collection_formats=_collection_formats,
598
+ _host=_host,
599
+ _request_auth=_request_auth
600
+ )
601
+
602
+
603
+
604
+
605
+ @validate_call
606
+ def api_authentications_post(
607
+ self,
608
+ authentications_post_request: Optional[AuthenticationsPostRequest] = None,
609
+ _request_timeout: Union[
610
+ None,
611
+ Annotated[StrictFloat, Field(gt=0)],
612
+ Tuple[
613
+ Annotated[StrictFloat, Field(gt=0)],
614
+ Annotated[StrictFloat, Field(gt=0)]
615
+ ]
616
+ ] = None,
617
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
618
+ _content_type: Optional[StrictStr] = None,
619
+ _headers: Optional[Dict[StrictStr, Any]] = None,
620
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
621
+ ) -> AuthenticationsPostResponse:
622
+ """api_authentications_post
623
+
624
+
625
+ :param authentications_post_request:
626
+ :type authentications_post_request: AuthenticationsPostRequest
627
+ :param _request_timeout: timeout setting for this request. If one
628
+ number provided, it will be total request
629
+ timeout. It can also be a pair (tuple) of
630
+ (connection, read) timeouts.
631
+ :type _request_timeout: int, tuple(int, int), optional
632
+ :param _request_auth: set to override the auth_settings for an a single
633
+ request; this effectively ignores the
634
+ authentication in the spec for a single request.
635
+ :type _request_auth: dict, optional
636
+ :param _content_type: force content-type for the request.
637
+ :type _content_type: str, Optional
638
+ :param _headers: set to override the headers for a single
639
+ request; this effectively ignores the headers
640
+ in the spec for a single request.
641
+ :type _headers: dict, optional
642
+ :param _host_index: set to override the host_index for a single
643
+ request; this effectively ignores the host_index
644
+ in the spec for a single request.
645
+ :type _host_index: int, optional
646
+ :return: Returns the result object.
647
+ """ # noqa: E501
648
+
649
+ _param = self._api_authentications_post_serialize(
650
+ authentications_post_request=authentications_post_request,
651
+ _request_auth=_request_auth,
652
+ _content_type=_content_type,
653
+ _headers=_headers,
654
+ _host_index=_host_index
655
+ )
656
+
657
+ _response_types_map: Dict[str, Optional[str]] = {
658
+ '200': "AuthenticationsPostResponse",
659
+ '400': None,
660
+ '401': None,
661
+ '403': None,
662
+ '422': None
663
+
664
+ }
665
+ response_data = self.api_client.call_api(
666
+ *_param,
667
+ _request_timeout=_request_timeout
668
+ )
669
+ response_data.read()
670
+ return self.api_client.response_deserialize(
671
+ response_data=response_data,
672
+ response_types_map=_response_types_map,
673
+ ).data
674
+
675
+
676
+ @validate_call
677
+ def api_authentications_post_with_http_info(
678
+ self,
679
+ authentications_post_request: Optional[AuthenticationsPostRequest] = None,
680
+ _request_timeout: Union[
681
+ None,
682
+ Annotated[StrictFloat, Field(gt=0)],
683
+ Tuple[
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Annotated[StrictFloat, Field(gt=0)]
686
+ ]
687
+ ] = None,
688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
+ _content_type: Optional[StrictStr] = None,
690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
+ ) -> ApiResponse[AuthenticationsPostResponse]:
693
+ """api_authentications_post
694
+
695
+
696
+ :param authentications_post_request:
697
+ :type authentications_post_request: AuthenticationsPostRequest
698
+ :param _request_timeout: timeout setting for this request. If one
699
+ number provided, it will be total request
700
+ timeout. It can also be a pair (tuple) of
701
+ (connection, read) timeouts.
702
+ :type _request_timeout: int, tuple(int, int), optional
703
+ :param _request_auth: set to override the auth_settings for an a single
704
+ request; this effectively ignores the
705
+ authentication in the spec for a single request.
706
+ :type _request_auth: dict, optional
707
+ :param _content_type: force content-type for the request.
708
+ :type _content_type: str, Optional
709
+ :param _headers: set to override the headers for a single
710
+ request; this effectively ignores the headers
711
+ in the spec for a single request.
712
+ :type _headers: dict, optional
713
+ :param _host_index: set to override the host_index for a single
714
+ request; this effectively ignores the host_index
715
+ in the spec for a single request.
716
+ :type _host_index: int, optional
717
+ :return: Returns the result object.
718
+ """ # noqa: E501
719
+
720
+ _param = self._api_authentications_post_serialize(
721
+ authentications_post_request=authentications_post_request,
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ '200': "AuthenticationsPostResponse",
730
+ '400': None,
731
+ '401': None,
732
+ '403': None,
733
+ '422': None
734
+
735
+ }
736
+ response_data = self.api_client.call_api(
737
+ *_param,
738
+ _request_timeout=_request_timeout
739
+ )
740
+ response_data.read()
741
+ return self.api_client.response_deserialize(
742
+ response_data=response_data,
743
+ response_types_map=_response_types_map,
744
+ )
745
+
746
+
747
+ @validate_call
748
+ def api_authentications_post_without_preload_content(
749
+ self,
750
+ authentications_post_request: Optional[AuthenticationsPostRequest] = None,
751
+ _request_timeout: Union[
752
+ None,
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Tuple[
755
+ Annotated[StrictFloat, Field(gt=0)],
756
+ Annotated[StrictFloat, Field(gt=0)]
757
+ ]
758
+ ] = None,
759
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
760
+ _content_type: Optional[StrictStr] = None,
761
+ _headers: Optional[Dict[StrictStr, Any]] = None,
762
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
763
+ ) -> RESTResponseType:
764
+ """api_authentications_post
765
+
766
+
767
+ :param authentications_post_request:
768
+ :type authentications_post_request: AuthenticationsPostRequest
769
+ :param _request_timeout: timeout setting for this request. If one
770
+ number provided, it will be total request
771
+ timeout. It can also be a pair (tuple) of
772
+ (connection, read) timeouts.
773
+ :type _request_timeout: int, tuple(int, int), optional
774
+ :param _request_auth: set to override the auth_settings for an a single
775
+ request; this effectively ignores the
776
+ authentication in the spec for a single request.
777
+ :type _request_auth: dict, optional
778
+ :param _content_type: force content-type for the request.
779
+ :type _content_type: str, Optional
780
+ :param _headers: set to override the headers for a single
781
+ request; this effectively ignores the headers
782
+ in the spec for a single request.
783
+ :type _headers: dict, optional
784
+ :param _host_index: set to override the host_index for a single
785
+ request; this effectively ignores the host_index
786
+ in the spec for a single request.
787
+ :type _host_index: int, optional
788
+ :return: Returns the result object.
789
+ """ # noqa: E501
790
+
791
+ _param = self._api_authentications_post_serialize(
792
+ authentications_post_request=authentications_post_request,
793
+ _request_auth=_request_auth,
794
+ _content_type=_content_type,
795
+ _headers=_headers,
796
+ _host_index=_host_index
797
+ )
798
+
799
+ _response_types_map: Dict[str, Optional[str]] = {
800
+ '200': "AuthenticationsPostResponse",
801
+ '400': None,
802
+ '401': None,
803
+ '403': None,
804
+ '422': None
805
+
806
+ }
807
+ response_data = self.api_client.call_api(
808
+ *_param,
809
+ _request_timeout=_request_timeout
810
+ )
811
+ return response_data.response
812
+
813
+
814
+ def _api_authentications_post_serialize(
815
+ self,
816
+ authentications_post_request,
817
+ _request_auth,
818
+ _content_type,
819
+ _headers,
820
+ _host_index,
821
+ ) -> Tuple:
822
+
823
+ _host = None
824
+
825
+ _collection_formats: Dict[str, str] = {
826
+
827
+ }
828
+
829
+ _path_params: Dict[str, str] = {}
830
+ _query_params: List[Tuple[str, str]] = []
831
+ _header_params: Dict[str, Optional[str]] = _headers or {}
832
+ _form_params: List[Tuple[str, str]] = []
833
+ _files: Dict[str, str] = {}
834
+ _body_params: Optional[bytes] = None
835
+
836
+ # process the path parameters
837
+ # process the query parameters
838
+ # process the header parameters
839
+ # process the form parameters
840
+ # process the body parameter
841
+ if authentications_post_request is not None:
842
+ _body_params = authentications_post_request
843
+
844
+
845
+ # set the HTTP header `Accept`
846
+ _header_params['Accept'] = self.api_client.select_header_accept(
847
+ [
848
+ 'text/plain',
849
+ 'application/json',
850
+ 'text/json'
851
+ ]
852
+ )
853
+
854
+ # set the HTTP header `Content-Type`
855
+ if _content_type:
856
+ _header_params['Content-Type'] = _content_type
857
+ else:
858
+ _default_content_type = (
859
+ self.api_client.select_header_content_type(
860
+ [
861
+ 'application/json-patch+json',
862
+ 'application/json',
863
+ 'text/json',
864
+ 'application/*+json'
865
+ ]
866
+ )
867
+ )
868
+ if _default_content_type is not None:
869
+ _header_params['Content-Type'] = _default_content_type
870
+
871
+ # authentication setting
872
+ _auth_settings: List[str] = [
873
+ ]
874
+
875
+ return self.api_client.param_serialize(
876
+ method='POST',
877
+ resource_path='/Api/Authentications',
878
+ path_params=_path_params,
879
+ query_params=_query_params,
880
+ header_params=_header_params,
881
+ body=_body_params,
882
+ post_params=_form_params,
883
+ files=_files,
884
+ auth_settings=_auth_settings,
885
+ collection_formats=_collection_formats,
886
+ _host=_host,
887
+ _request_auth=_request_auth
888
+ )
889
+
890
+
891
+
892
+
893
+ @validate_call
894
+ def api_authentications_token_finalize_post(
895
+ self,
896
+ token: StrictStr,
897
+ _request_timeout: Union[
898
+ None,
899
+ Annotated[StrictFloat, Field(gt=0)],
900
+ Tuple[
901
+ Annotated[StrictFloat, Field(gt=0)],
902
+ Annotated[StrictFloat, Field(gt=0)]
903
+ ]
904
+ ] = None,
905
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
906
+ _content_type: Optional[StrictStr] = None,
907
+ _headers: Optional[Dict[StrictStr, Any]] = None,
908
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
909
+ ) -> AuthenticationPostResponse:
910
+ """api_authentications_token_finalize_post
911
+
912
+
913
+ :param token: (required)
914
+ :type token: str
915
+ :param _request_timeout: timeout setting for this request. If one
916
+ number provided, it will be total request
917
+ timeout. It can also be a pair (tuple) of
918
+ (connection, read) timeouts.
919
+ :type _request_timeout: int, tuple(int, int), optional
920
+ :param _request_auth: set to override the auth_settings for an a single
921
+ request; this effectively ignores the
922
+ authentication in the spec for a single request.
923
+ :type _request_auth: dict, optional
924
+ :param _content_type: force content-type for the request.
925
+ :type _content_type: str, Optional
926
+ :param _headers: set to override the headers for a single
927
+ request; this effectively ignores the headers
928
+ in the spec for a single request.
929
+ :type _headers: dict, optional
930
+ :param _host_index: set to override the host_index for a single
931
+ request; this effectively ignores the host_index
932
+ in the spec for a single request.
933
+ :type _host_index: int, optional
934
+ :return: Returns the result object.
935
+ """ # noqa: E501
936
+
937
+ _param = self._api_authentications_token_finalize_post_serialize(
938
+ token=token,
939
+ _request_auth=_request_auth,
940
+ _content_type=_content_type,
941
+ _headers=_headers,
942
+ _host_index=_host_index
943
+ )
944
+
945
+ _response_types_map: Dict[str, Optional[str]] = {
946
+ '200': "AuthenticationPostResponse",
947
+ '400': None,
948
+ '401': None,
949
+ '403': None,
950
+ '422': None
951
+
952
+ }
953
+ response_data = self.api_client.call_api(
954
+ *_param,
955
+ _request_timeout=_request_timeout
956
+ )
957
+ response_data.read()
958
+ return self.api_client.response_deserialize(
959
+ response_data=response_data,
960
+ response_types_map=_response_types_map,
961
+ ).data
962
+
963
+
964
+ @validate_call
965
+ def api_authentications_token_finalize_post_with_http_info(
966
+ self,
967
+ token: StrictStr,
968
+ _request_timeout: Union[
969
+ None,
970
+ Annotated[StrictFloat, Field(gt=0)],
971
+ Tuple[
972
+ Annotated[StrictFloat, Field(gt=0)],
973
+ Annotated[StrictFloat, Field(gt=0)]
974
+ ]
975
+ ] = None,
976
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
977
+ _content_type: Optional[StrictStr] = None,
978
+ _headers: Optional[Dict[StrictStr, Any]] = None,
979
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
980
+ ) -> ApiResponse[AuthenticationPostResponse]:
981
+ """api_authentications_token_finalize_post
982
+
983
+
984
+ :param token: (required)
985
+ :type token: str
986
+ :param _request_timeout: timeout setting for this request. If one
987
+ number provided, it will be total request
988
+ timeout. It can also be a pair (tuple) of
989
+ (connection, read) timeouts.
990
+ :type _request_timeout: int, tuple(int, int), optional
991
+ :param _request_auth: set to override the auth_settings for an a single
992
+ request; this effectively ignores the
993
+ authentication in the spec for a single request.
994
+ :type _request_auth: dict, optional
995
+ :param _content_type: force content-type for the request.
996
+ :type _content_type: str, Optional
997
+ :param _headers: set to override the headers for a single
998
+ request; this effectively ignores the headers
999
+ in the spec for a single request.
1000
+ :type _headers: dict, optional
1001
+ :param _host_index: set to override the host_index for a single
1002
+ request; this effectively ignores the host_index
1003
+ in the spec for a single request.
1004
+ :type _host_index: int, optional
1005
+ :return: Returns the result object.
1006
+ """ # noqa: E501
1007
+
1008
+ _param = self._api_authentications_token_finalize_post_serialize(
1009
+ token=token,
1010
+ _request_auth=_request_auth,
1011
+ _content_type=_content_type,
1012
+ _headers=_headers,
1013
+ _host_index=_host_index
1014
+ )
1015
+
1016
+ _response_types_map: Dict[str, Optional[str]] = {
1017
+ '200': "AuthenticationPostResponse",
1018
+ '400': None,
1019
+ '401': None,
1020
+ '403': None,
1021
+ '422': None
1022
+
1023
+ }
1024
+ response_data = self.api_client.call_api(
1025
+ *_param,
1026
+ _request_timeout=_request_timeout
1027
+ )
1028
+ response_data.read()
1029
+ return self.api_client.response_deserialize(
1030
+ response_data=response_data,
1031
+ response_types_map=_response_types_map,
1032
+ )
1033
+
1034
+
1035
+ @validate_call
1036
+ def api_authentications_token_finalize_post_without_preload_content(
1037
+ self,
1038
+ token: StrictStr,
1039
+ _request_timeout: Union[
1040
+ None,
1041
+ Annotated[StrictFloat, Field(gt=0)],
1042
+ Tuple[
1043
+ Annotated[StrictFloat, Field(gt=0)],
1044
+ Annotated[StrictFloat, Field(gt=0)]
1045
+ ]
1046
+ ] = None,
1047
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1048
+ _content_type: Optional[StrictStr] = None,
1049
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1050
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1051
+ ) -> RESTResponseType:
1052
+ """api_authentications_token_finalize_post
1053
+
1054
+
1055
+ :param token: (required)
1056
+ :type token: str
1057
+ :param _request_timeout: timeout setting for this request. If one
1058
+ number provided, it will be total request
1059
+ timeout. It can also be a pair (tuple) of
1060
+ (connection, read) timeouts.
1061
+ :type _request_timeout: int, tuple(int, int), optional
1062
+ :param _request_auth: set to override the auth_settings for an a single
1063
+ request; this effectively ignores the
1064
+ authentication in the spec for a single request.
1065
+ :type _request_auth: dict, optional
1066
+ :param _content_type: force content-type for the request.
1067
+ :type _content_type: str, Optional
1068
+ :param _headers: set to override the headers for a single
1069
+ request; this effectively ignores the headers
1070
+ in the spec for a single request.
1071
+ :type _headers: dict, optional
1072
+ :param _host_index: set to override the host_index for a single
1073
+ request; this effectively ignores the host_index
1074
+ in the spec for a single request.
1075
+ :type _host_index: int, optional
1076
+ :return: Returns the result object.
1077
+ """ # noqa: E501
1078
+
1079
+ _param = self._api_authentications_token_finalize_post_serialize(
1080
+ token=token,
1081
+ _request_auth=_request_auth,
1082
+ _content_type=_content_type,
1083
+ _headers=_headers,
1084
+ _host_index=_host_index
1085
+ )
1086
+
1087
+ _response_types_map: Dict[str, Optional[str]] = {
1088
+ '200': "AuthenticationPostResponse",
1089
+ '400': None,
1090
+ '401': None,
1091
+ '403': None,
1092
+ '422': None
1093
+
1094
+ }
1095
+ response_data = self.api_client.call_api(
1096
+ *_param,
1097
+ _request_timeout=_request_timeout
1098
+ )
1099
+ return response_data.response
1100
+
1101
+
1102
+ def _api_authentications_token_finalize_post_serialize(
1103
+ self,
1104
+ token,
1105
+ _request_auth,
1106
+ _content_type,
1107
+ _headers,
1108
+ _host_index,
1109
+ ) -> Tuple:
1110
+
1111
+ _host = None
1112
+
1113
+ _collection_formats: Dict[str, str] = {
1114
+
1115
+ }
1116
+
1117
+ _path_params: Dict[str, str] = {}
1118
+ _query_params: List[Tuple[str, str]] = []
1119
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1120
+ _form_params: List[Tuple[str, str]] = []
1121
+ _files: Dict[str, str] = {}
1122
+ _body_params: Optional[bytes] = None
1123
+
1124
+ # process the path parameters
1125
+ if token is not None:
1126
+ _path_params['token'] = token
1127
+ # process the query parameters
1128
+ # process the header parameters
1129
+ # process the form parameters
1130
+ # process the body parameter
1131
+
1132
+
1133
+ # set the HTTP header `Accept`
1134
+ _header_params['Accept'] = self.api_client.select_header_accept(
1135
+ [
1136
+ 'text/plain',
1137
+ 'application/json',
1138
+ 'text/json'
1139
+ ]
1140
+ )
1141
+
1142
+
1143
+ # authentication setting
1144
+ _auth_settings: List[str] = [
1145
+ ]
1146
+
1147
+ return self.api_client.param_serialize(
1148
+ method='POST',
1149
+ resource_path='/Api/Authentications/{token}/Finalize',
1150
+ path_params=_path_params,
1151
+ query_params=_query_params,
1152
+ header_params=_header_params,
1153
+ body=_body_params,
1154
+ post_params=_form_params,
1155
+ files=_files,
1156
+ auth_settings=_auth_settings,
1157
+ collection_formats=_collection_formats,
1158
+ _host=_host,
1159
+ _request_auth=_request_auth
1160
+ )
1161
+
1162
+
1163
+
1164
+
1165
+ @validate_call
1166
+ def api_authentications_token_signed_bytes_post(
1167
+ self,
1168
+ token: StrictStr,
1169
+ authentications_post_signed_bytes_request: Optional[AuthenticationsPostSignedBytesRequest] = None,
1170
+ _request_timeout: Union[
1171
+ None,
1172
+ Annotated[StrictFloat, Field(gt=0)],
1173
+ Tuple[
1174
+ Annotated[StrictFloat, Field(gt=0)],
1175
+ Annotated[StrictFloat, Field(gt=0)]
1176
+ ]
1177
+ ] = None,
1178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1179
+ _content_type: Optional[StrictStr] = None,
1180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1182
+ ) -> AuthenticationsPostSignedBytesResponse:
1183
+ """api_authentications_token_signed_bytes_post
1184
+
1185
+
1186
+ :param token: (required)
1187
+ :type token: str
1188
+ :param authentications_post_signed_bytes_request:
1189
+ :type authentications_post_signed_bytes_request: AuthenticationsPostSignedBytesRequest
1190
+ :param _request_timeout: timeout setting for this request. If one
1191
+ number provided, it will be total request
1192
+ timeout. It can also be a pair (tuple) of
1193
+ (connection, read) timeouts.
1194
+ :type _request_timeout: int, tuple(int, int), optional
1195
+ :param _request_auth: set to override the auth_settings for an a single
1196
+ request; this effectively ignores the
1197
+ authentication in the spec for a single request.
1198
+ :type _request_auth: dict, optional
1199
+ :param _content_type: force content-type for the request.
1200
+ :type _content_type: str, Optional
1201
+ :param _headers: set to override the headers for a single
1202
+ request; this effectively ignores the headers
1203
+ in the spec for a single request.
1204
+ :type _headers: dict, optional
1205
+ :param _host_index: set to override the host_index for a single
1206
+ request; this effectively ignores the host_index
1207
+ in the spec for a single request.
1208
+ :type _host_index: int, optional
1209
+ :return: Returns the result object.
1210
+ """ # noqa: E501
1211
+
1212
+ _param = self._api_authentications_token_signed_bytes_post_serialize(
1213
+ token=token,
1214
+ authentications_post_signed_bytes_request=authentications_post_signed_bytes_request,
1215
+ _request_auth=_request_auth,
1216
+ _content_type=_content_type,
1217
+ _headers=_headers,
1218
+ _host_index=_host_index
1219
+ )
1220
+
1221
+ _response_types_map: Dict[str, Optional[str]] = {
1222
+ '200': "AuthenticationsPostSignedBytesResponse",
1223
+ '400': None,
1224
+ '401': None,
1225
+ '403': None,
1226
+ '422': None
1227
+
1228
+ }
1229
+ response_data = self.api_client.call_api(
1230
+ *_param,
1231
+ _request_timeout=_request_timeout
1232
+ )
1233
+ response_data.read()
1234
+ return self.api_client.response_deserialize(
1235
+ response_data=response_data,
1236
+ response_types_map=_response_types_map,
1237
+ ).data
1238
+
1239
+
1240
+ @validate_call
1241
+ def api_authentications_token_signed_bytes_post_with_http_info(
1242
+ self,
1243
+ token: StrictStr,
1244
+ authentications_post_signed_bytes_request: Optional[AuthenticationsPostSignedBytesRequest] = None,
1245
+ _request_timeout: Union[
1246
+ None,
1247
+ Annotated[StrictFloat, Field(gt=0)],
1248
+ Tuple[
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Annotated[StrictFloat, Field(gt=0)]
1251
+ ]
1252
+ ] = None,
1253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1254
+ _content_type: Optional[StrictStr] = None,
1255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1257
+ ) -> ApiResponse[AuthenticationsPostSignedBytesResponse]:
1258
+ """api_authentications_token_signed_bytes_post
1259
+
1260
+
1261
+ :param token: (required)
1262
+ :type token: str
1263
+ :param authentications_post_signed_bytes_request:
1264
+ :type authentications_post_signed_bytes_request: AuthenticationsPostSignedBytesRequest
1265
+ :param _request_timeout: timeout setting for this request. If one
1266
+ number provided, it will be total request
1267
+ timeout. It can also be a pair (tuple) of
1268
+ (connection, read) timeouts.
1269
+ :type _request_timeout: int, tuple(int, int), optional
1270
+ :param _request_auth: set to override the auth_settings for an a single
1271
+ request; this effectively ignores the
1272
+ authentication in the spec for a single request.
1273
+ :type _request_auth: dict, optional
1274
+ :param _content_type: force content-type for the request.
1275
+ :type _content_type: str, Optional
1276
+ :param _headers: set to override the headers for a single
1277
+ request; this effectively ignores the headers
1278
+ in the spec for a single request.
1279
+ :type _headers: dict, optional
1280
+ :param _host_index: set to override the host_index for a single
1281
+ request; this effectively ignores the host_index
1282
+ in the spec for a single request.
1283
+ :type _host_index: int, optional
1284
+ :return: Returns the result object.
1285
+ """ # noqa: E501
1286
+
1287
+ _param = self._api_authentications_token_signed_bytes_post_serialize(
1288
+ token=token,
1289
+ authentications_post_signed_bytes_request=authentications_post_signed_bytes_request,
1290
+ _request_auth=_request_auth,
1291
+ _content_type=_content_type,
1292
+ _headers=_headers,
1293
+ _host_index=_host_index
1294
+ )
1295
+
1296
+ _response_types_map: Dict[str, Optional[str]] = {
1297
+ '200': "AuthenticationsPostSignedBytesResponse",
1298
+ '400': None,
1299
+ '401': None,
1300
+ '403': None,
1301
+ '422': None
1302
+
1303
+ }
1304
+ response_data = self.api_client.call_api(
1305
+ *_param,
1306
+ _request_timeout=_request_timeout
1307
+ )
1308
+ response_data.read()
1309
+ return self.api_client.response_deserialize(
1310
+ response_data=response_data,
1311
+ response_types_map=_response_types_map,
1312
+ )
1313
+
1314
+
1315
+ @validate_call
1316
+ def api_authentications_token_signed_bytes_post_without_preload_content(
1317
+ self,
1318
+ token: StrictStr,
1319
+ authentications_post_signed_bytes_request: Optional[AuthenticationsPostSignedBytesRequest] = None,
1320
+ _request_timeout: Union[
1321
+ None,
1322
+ Annotated[StrictFloat, Field(gt=0)],
1323
+ Tuple[
1324
+ Annotated[StrictFloat, Field(gt=0)],
1325
+ Annotated[StrictFloat, Field(gt=0)]
1326
+ ]
1327
+ ] = None,
1328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1329
+ _content_type: Optional[StrictStr] = None,
1330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1332
+ ) -> RESTResponseType:
1333
+ """api_authentications_token_signed_bytes_post
1334
+
1335
+
1336
+ :param token: (required)
1337
+ :type token: str
1338
+ :param authentications_post_signed_bytes_request:
1339
+ :type authentications_post_signed_bytes_request: AuthenticationsPostSignedBytesRequest
1340
+ :param _request_timeout: timeout setting for this request. If one
1341
+ number provided, it will be total request
1342
+ timeout. It can also be a pair (tuple) of
1343
+ (connection, read) timeouts.
1344
+ :type _request_timeout: int, tuple(int, int), optional
1345
+ :param _request_auth: set to override the auth_settings for an a single
1346
+ request; this effectively ignores the
1347
+ authentication in the spec for a single request.
1348
+ :type _request_auth: dict, optional
1349
+ :param _content_type: force content-type for the request.
1350
+ :type _content_type: str, Optional
1351
+ :param _headers: set to override the headers for a single
1352
+ request; this effectively ignores the headers
1353
+ in the spec for a single request.
1354
+ :type _headers: dict, optional
1355
+ :param _host_index: set to override the host_index for a single
1356
+ request; this effectively ignores the host_index
1357
+ in the spec for a single request.
1358
+ :type _host_index: int, optional
1359
+ :return: Returns the result object.
1360
+ """ # noqa: E501
1361
+
1362
+ _param = self._api_authentications_token_signed_bytes_post_serialize(
1363
+ token=token,
1364
+ authentications_post_signed_bytes_request=authentications_post_signed_bytes_request,
1365
+ _request_auth=_request_auth,
1366
+ _content_type=_content_type,
1367
+ _headers=_headers,
1368
+ _host_index=_host_index
1369
+ )
1370
+
1371
+ _response_types_map: Dict[str, Optional[str]] = {
1372
+ '200': "AuthenticationsPostSignedBytesResponse",
1373
+ '400': None,
1374
+ '401': None,
1375
+ '403': None,
1376
+ '422': None
1377
+
1378
+ }
1379
+ response_data = self.api_client.call_api(
1380
+ *_param,
1381
+ _request_timeout=_request_timeout
1382
+ )
1383
+ return response_data.response
1384
+
1385
+
1386
+ def _api_authentications_token_signed_bytes_post_serialize(
1387
+ self,
1388
+ token,
1389
+ authentications_post_signed_bytes_request,
1390
+ _request_auth,
1391
+ _content_type,
1392
+ _headers,
1393
+ _host_index,
1394
+ ) -> Tuple:
1395
+
1396
+ _host = None
1397
+
1398
+ _collection_formats: Dict[str, str] = {
1399
+
1400
+ }
1401
+
1402
+ _path_params: Dict[str, str] = {}
1403
+ _query_params: List[Tuple[str, str]] = []
1404
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1405
+ _form_params: List[Tuple[str, str]] = []
1406
+ _files: Dict[str, str] = {}
1407
+ _body_params: Optional[bytes] = None
1408
+
1409
+ # process the path parameters
1410
+ if token is not None:
1411
+ _path_params['token'] = token
1412
+ # process the query parameters
1413
+ # process the header parameters
1414
+ # process the form parameters
1415
+ # process the body parameter
1416
+ if authentications_post_signed_bytes_request is not None:
1417
+ _body_params = authentications_post_signed_bytes_request
1418
+
1419
+
1420
+ # set the HTTP header `Accept`
1421
+ _header_params['Accept'] = self.api_client.select_header_accept(
1422
+ [
1423
+ 'text/plain',
1424
+ 'application/json',
1425
+ 'text/json'
1426
+ ]
1427
+ )
1428
+
1429
+ # set the HTTP header `Content-Type`
1430
+ if _content_type:
1431
+ _header_params['Content-Type'] = _content_type
1432
+ else:
1433
+ _default_content_type = (
1434
+ self.api_client.select_header_content_type(
1435
+ [
1436
+ 'application/json-patch+json',
1437
+ 'application/json',
1438
+ 'text/json',
1439
+ 'application/*+json'
1440
+ ]
1441
+ )
1442
+ )
1443
+ if _default_content_type is not None:
1444
+ _header_params['Content-Type'] = _default_content_type
1445
+
1446
+ # authentication setting
1447
+ _auth_settings: List[str] = [
1448
+ ]
1449
+
1450
+ return self.api_client.param_serialize(
1451
+ method='POST',
1452
+ resource_path='/Api/Authentications/{token}/SignedBytes',
1453
+ path_params=_path_params,
1454
+ query_params=_query_params,
1455
+ header_params=_header_params,
1456
+ body=_body_params,
1457
+ post_params=_form_params,
1458
+ files=_files,
1459
+ auth_settings=_auth_settings,
1460
+ collection_formats=_collection_formats,
1461
+ _host=_host,
1462
+ _request_auth=_request_auth
1463
+ )
1464
+
1465
+
1466
+
1467
+
1468
+ @validate_call
1469
+ def api_v2_authentication_completion_post(
1470
+ self,
1471
+ complete_authentication_request: Optional[CompleteAuthenticationRequest] = None,
1472
+ _request_timeout: Union[
1473
+ None,
1474
+ Annotated[StrictFloat, Field(gt=0)],
1475
+ Tuple[
1476
+ Annotated[StrictFloat, Field(gt=0)],
1477
+ Annotated[StrictFloat, Field(gt=0)]
1478
+ ]
1479
+ ] = None,
1480
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1481
+ _content_type: Optional[StrictStr] = None,
1482
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1483
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1484
+ ) -> CompleteAuthenticationResponse:
1485
+ """Completes a certificate authentication
1486
+
1487
+
1488
+ :param complete_authentication_request:
1489
+ :type complete_authentication_request: CompleteAuthenticationRequest
1490
+ :param _request_timeout: timeout setting for this request. If one
1491
+ number provided, it will be total request
1492
+ timeout. It can also be a pair (tuple) of
1493
+ (connection, read) timeouts.
1494
+ :type _request_timeout: int, tuple(int, int), optional
1495
+ :param _request_auth: set to override the auth_settings for an a single
1496
+ request; this effectively ignores the
1497
+ authentication in the spec for a single request.
1498
+ :type _request_auth: dict, optional
1499
+ :param _content_type: force content-type for the request.
1500
+ :type _content_type: str, Optional
1501
+ :param _headers: set to override the headers for a single
1502
+ request; this effectively ignores the headers
1503
+ in the spec for a single request.
1504
+ :type _headers: dict, optional
1505
+ :param _host_index: set to override the host_index for a single
1506
+ request; this effectively ignores the host_index
1507
+ in the spec for a single request.
1508
+ :type _host_index: int, optional
1509
+ :return: Returns the result object.
1510
+ """ # noqa: E501
1511
+
1512
+ _param = self._api_v2_authentication_completion_post_serialize(
1513
+ complete_authentication_request=complete_authentication_request,
1514
+ _request_auth=_request_auth,
1515
+ _content_type=_content_type,
1516
+ _headers=_headers,
1517
+ _host_index=_host_index
1518
+ )
1519
+
1520
+ _response_types_map: Dict[str, Optional[str]] = {
1521
+ '200': "CompleteAuthenticationResponse",
1522
+ '400': None,
1523
+ '401': None,
1524
+ '403': None,
1525
+ '422': None
1526
+
1527
+ }
1528
+ response_data = self.api_client.call_api(
1529
+ *_param,
1530
+ _request_timeout=_request_timeout
1531
+ )
1532
+ response_data.read()
1533
+ return self.api_client.response_deserialize(
1534
+ response_data=response_data,
1535
+ response_types_map=_response_types_map,
1536
+ ).data
1537
+
1538
+
1539
+ @validate_call
1540
+ def api_v2_authentication_completion_post_with_http_info(
1541
+ self,
1542
+ complete_authentication_request: Optional[CompleteAuthenticationRequest] = None,
1543
+ _request_timeout: Union[
1544
+ None,
1545
+ Annotated[StrictFloat, Field(gt=0)],
1546
+ Tuple[
1547
+ Annotated[StrictFloat, Field(gt=0)],
1548
+ Annotated[StrictFloat, Field(gt=0)]
1549
+ ]
1550
+ ] = None,
1551
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1552
+ _content_type: Optional[StrictStr] = None,
1553
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1554
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1555
+ ) -> ApiResponse[CompleteAuthenticationResponse]:
1556
+ """Completes a certificate authentication
1557
+
1558
+
1559
+ :param complete_authentication_request:
1560
+ :type complete_authentication_request: CompleteAuthenticationRequest
1561
+ :param _request_timeout: timeout setting for this request. If one
1562
+ number provided, it will be total request
1563
+ timeout. It can also be a pair (tuple) of
1564
+ (connection, read) timeouts.
1565
+ :type _request_timeout: int, tuple(int, int), optional
1566
+ :param _request_auth: set to override the auth_settings for an a single
1567
+ request; this effectively ignores the
1568
+ authentication in the spec for a single request.
1569
+ :type _request_auth: dict, optional
1570
+ :param _content_type: force content-type for the request.
1571
+ :type _content_type: str, Optional
1572
+ :param _headers: set to override the headers for a single
1573
+ request; this effectively ignores the headers
1574
+ in the spec for a single request.
1575
+ :type _headers: dict, optional
1576
+ :param _host_index: set to override the host_index for a single
1577
+ request; this effectively ignores the host_index
1578
+ in the spec for a single request.
1579
+ :type _host_index: int, optional
1580
+ :return: Returns the result object.
1581
+ """ # noqa: E501
1582
+
1583
+ _param = self._api_v2_authentication_completion_post_serialize(
1584
+ complete_authentication_request=complete_authentication_request,
1585
+ _request_auth=_request_auth,
1586
+ _content_type=_content_type,
1587
+ _headers=_headers,
1588
+ _host_index=_host_index
1589
+ )
1590
+
1591
+ _response_types_map: Dict[str, Optional[str]] = {
1592
+ '200': "CompleteAuthenticationResponse",
1593
+ '400': None,
1594
+ '401': None,
1595
+ '403': None,
1596
+ '422': None
1597
+
1598
+ }
1599
+ response_data = self.api_client.call_api(
1600
+ *_param,
1601
+ _request_timeout=_request_timeout
1602
+ )
1603
+ response_data.read()
1604
+ return self.api_client.response_deserialize(
1605
+ response_data=response_data,
1606
+ response_types_map=_response_types_map,
1607
+ )
1608
+
1609
+
1610
+ @validate_call
1611
+ def api_v2_authentication_completion_post_without_preload_content(
1612
+ self,
1613
+ complete_authentication_request: Optional[CompleteAuthenticationRequest] = None,
1614
+ _request_timeout: Union[
1615
+ None,
1616
+ Annotated[StrictFloat, Field(gt=0)],
1617
+ Tuple[
1618
+ Annotated[StrictFloat, Field(gt=0)],
1619
+ Annotated[StrictFloat, Field(gt=0)]
1620
+ ]
1621
+ ] = None,
1622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1623
+ _content_type: Optional[StrictStr] = None,
1624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1626
+ ) -> RESTResponseType:
1627
+ """Completes a certificate authentication
1628
+
1629
+
1630
+ :param complete_authentication_request:
1631
+ :type complete_authentication_request: CompleteAuthenticationRequest
1632
+ :param _request_timeout: timeout setting for this request. If one
1633
+ number provided, it will be total request
1634
+ timeout. It can also be a pair (tuple) of
1635
+ (connection, read) timeouts.
1636
+ :type _request_timeout: int, tuple(int, int), optional
1637
+ :param _request_auth: set to override the auth_settings for an a single
1638
+ request; this effectively ignores the
1639
+ authentication in the spec for a single request.
1640
+ :type _request_auth: dict, optional
1641
+ :param _content_type: force content-type for the request.
1642
+ :type _content_type: str, Optional
1643
+ :param _headers: set to override the headers for a single
1644
+ request; this effectively ignores the headers
1645
+ in the spec for a single request.
1646
+ :type _headers: dict, optional
1647
+ :param _host_index: set to override the host_index for a single
1648
+ request; this effectively ignores the host_index
1649
+ in the spec for a single request.
1650
+ :type _host_index: int, optional
1651
+ :return: Returns the result object.
1652
+ """ # noqa: E501
1653
+
1654
+ _param = self._api_v2_authentication_completion_post_serialize(
1655
+ complete_authentication_request=complete_authentication_request,
1656
+ _request_auth=_request_auth,
1657
+ _content_type=_content_type,
1658
+ _headers=_headers,
1659
+ _host_index=_host_index
1660
+ )
1661
+
1662
+ _response_types_map: Dict[str, Optional[str]] = {
1663
+ '200': "CompleteAuthenticationResponse",
1664
+ '400': None,
1665
+ '401': None,
1666
+ '403': None,
1667
+ '422': None
1668
+
1669
+ }
1670
+ response_data = self.api_client.call_api(
1671
+ *_param,
1672
+ _request_timeout=_request_timeout
1673
+ )
1674
+ return response_data.response
1675
+
1676
+
1677
+ def _api_v2_authentication_completion_post_serialize(
1678
+ self,
1679
+ complete_authentication_request,
1680
+ _request_auth,
1681
+ _content_type,
1682
+ _headers,
1683
+ _host_index,
1684
+ ) -> Tuple:
1685
+
1686
+ _host = None
1687
+
1688
+ _collection_formats: Dict[str, str] = {
1689
+
1690
+ }
1691
+
1692
+ _path_params: Dict[str, str] = {}
1693
+ _query_params: List[Tuple[str, str]] = []
1694
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1695
+ _form_params: List[Tuple[str, str]] = []
1696
+ _files: Dict[str, str] = {}
1697
+ _body_params: Optional[bytes] = None
1698
+
1699
+ # process the path parameters
1700
+ # process the query parameters
1701
+ # process the header parameters
1702
+ # process the form parameters
1703
+ # process the body parameter
1704
+ if complete_authentication_request is not None:
1705
+ _body_params = complete_authentication_request
1706
+
1707
+
1708
+ # set the HTTP header `Accept`
1709
+ _header_params['Accept'] = self.api_client.select_header_accept(
1710
+ [
1711
+ 'text/plain',
1712
+ 'application/json',
1713
+ 'text/json'
1714
+ ]
1715
+ )
1716
+
1717
+ # set the HTTP header `Content-Type`
1718
+ if _content_type:
1719
+ _header_params['Content-Type'] = _content_type
1720
+ else:
1721
+ _default_content_type = (
1722
+ self.api_client.select_header_content_type(
1723
+ [
1724
+ 'application/json-patch+json',
1725
+ 'application/json',
1726
+ 'text/json',
1727
+ 'application/*+json'
1728
+ ]
1729
+ )
1730
+ )
1731
+ if _default_content_type is not None:
1732
+ _header_params['Content-Type'] = _default_content_type
1733
+
1734
+ # authentication setting
1735
+ _auth_settings: List[str] = [
1736
+ ]
1737
+
1738
+ return self.api_client.param_serialize(
1739
+ method='POST',
1740
+ resource_path='/api/v2/authentication/completion',
1741
+ path_params=_path_params,
1742
+ query_params=_query_params,
1743
+ header_params=_header_params,
1744
+ body=_body_params,
1745
+ post_params=_form_params,
1746
+ files=_files,
1747
+ auth_settings=_auth_settings,
1748
+ collection_formats=_collection_formats,
1749
+ _host=_host,
1750
+ _request_auth=_request_auth
1751
+ )
1752
+
1753
+
1754
+
1755
+
1756
+ @validate_call
1757
+ def api_v2_authentication_post(
1758
+ self,
1759
+ prepare_authentication_request: Optional[PrepareAuthenticationRequest] = None,
1760
+ _request_timeout: Union[
1761
+ None,
1762
+ Annotated[StrictFloat, Field(gt=0)],
1763
+ Tuple[
1764
+ Annotated[StrictFloat, Field(gt=0)],
1765
+ Annotated[StrictFloat, Field(gt=0)]
1766
+ ]
1767
+ ] = None,
1768
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1769
+ _content_type: Optional[StrictStr] = None,
1770
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1771
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1772
+ ) -> PrepareAuthenticationResponse:
1773
+ """Prepares for a certificate authentication
1774
+
1775
+
1776
+ :param prepare_authentication_request:
1777
+ :type prepare_authentication_request: PrepareAuthenticationRequest
1778
+ :param _request_timeout: timeout setting for this request. If one
1779
+ number provided, it will be total request
1780
+ timeout. It can also be a pair (tuple) of
1781
+ (connection, read) timeouts.
1782
+ :type _request_timeout: int, tuple(int, int), optional
1783
+ :param _request_auth: set to override the auth_settings for an a single
1784
+ request; this effectively ignores the
1785
+ authentication in the spec for a single request.
1786
+ :type _request_auth: dict, optional
1787
+ :param _content_type: force content-type for the request.
1788
+ :type _content_type: str, Optional
1789
+ :param _headers: set to override the headers for a single
1790
+ request; this effectively ignores the headers
1791
+ in the spec for a single request.
1792
+ :type _headers: dict, optional
1793
+ :param _host_index: set to override the host_index for a single
1794
+ request; this effectively ignores the host_index
1795
+ in the spec for a single request.
1796
+ :type _host_index: int, optional
1797
+ :return: Returns the result object.
1798
+ """ # noqa: E501
1799
+
1800
+ _param = self._api_v2_authentication_post_serialize(
1801
+ prepare_authentication_request=prepare_authentication_request,
1802
+ _request_auth=_request_auth,
1803
+ _content_type=_content_type,
1804
+ _headers=_headers,
1805
+ _host_index=_host_index
1806
+ )
1807
+
1808
+ _response_types_map: Dict[str, Optional[str]] = {
1809
+ '200': "PrepareAuthenticationResponse",
1810
+ '400': None,
1811
+ '401': None,
1812
+ '403': None,
1813
+ '422': None
1814
+
1815
+ }
1816
+ response_data = self.api_client.call_api(
1817
+ *_param,
1818
+ _request_timeout=_request_timeout
1819
+ )
1820
+ response_data.read()
1821
+ return self.api_client.response_deserialize(
1822
+ response_data=response_data,
1823
+ response_types_map=_response_types_map,
1824
+ ).data
1825
+
1826
+
1827
+ @validate_call
1828
+ def api_v2_authentication_post_with_http_info(
1829
+ self,
1830
+ prepare_authentication_request: Optional[PrepareAuthenticationRequest] = None,
1831
+ _request_timeout: Union[
1832
+ None,
1833
+ Annotated[StrictFloat, Field(gt=0)],
1834
+ Tuple[
1835
+ Annotated[StrictFloat, Field(gt=0)],
1836
+ Annotated[StrictFloat, Field(gt=0)]
1837
+ ]
1838
+ ] = None,
1839
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1840
+ _content_type: Optional[StrictStr] = None,
1841
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1842
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1843
+ ) -> ApiResponse[PrepareAuthenticationResponse]:
1844
+ """Prepares for a certificate authentication
1845
+
1846
+
1847
+ :param prepare_authentication_request:
1848
+ :type prepare_authentication_request: PrepareAuthenticationRequest
1849
+ :param _request_timeout: timeout setting for this request. If one
1850
+ number provided, it will be total request
1851
+ timeout. It can also be a pair (tuple) of
1852
+ (connection, read) timeouts.
1853
+ :type _request_timeout: int, tuple(int, int), optional
1854
+ :param _request_auth: set to override the auth_settings for an a single
1855
+ request; this effectively ignores the
1856
+ authentication in the spec for a single request.
1857
+ :type _request_auth: dict, optional
1858
+ :param _content_type: force content-type for the request.
1859
+ :type _content_type: str, Optional
1860
+ :param _headers: set to override the headers for a single
1861
+ request; this effectively ignores the headers
1862
+ in the spec for a single request.
1863
+ :type _headers: dict, optional
1864
+ :param _host_index: set to override the host_index for a single
1865
+ request; this effectively ignores the host_index
1866
+ in the spec for a single request.
1867
+ :type _host_index: int, optional
1868
+ :return: Returns the result object.
1869
+ """ # noqa: E501
1870
+
1871
+ _param = self._api_v2_authentication_post_serialize(
1872
+ prepare_authentication_request=prepare_authentication_request,
1873
+ _request_auth=_request_auth,
1874
+ _content_type=_content_type,
1875
+ _headers=_headers,
1876
+ _host_index=_host_index
1877
+ )
1878
+
1879
+ _response_types_map: Dict[str, Optional[str]] = {
1880
+ '200': "PrepareAuthenticationResponse",
1881
+ '400': None,
1882
+ '401': None,
1883
+ '403': None,
1884
+ '422': None
1885
+
1886
+ }
1887
+ response_data = self.api_client.call_api(
1888
+ *_param,
1889
+ _request_timeout=_request_timeout
1890
+ )
1891
+ response_data.read()
1892
+ return self.api_client.response_deserialize(
1893
+ response_data=response_data,
1894
+ response_types_map=_response_types_map,
1895
+ )
1896
+
1897
+
1898
+ @validate_call
1899
+ def api_v2_authentication_post_without_preload_content(
1900
+ self,
1901
+ prepare_authentication_request: Optional[PrepareAuthenticationRequest] = None,
1902
+ _request_timeout: Union[
1903
+ None,
1904
+ Annotated[StrictFloat, Field(gt=0)],
1905
+ Tuple[
1906
+ Annotated[StrictFloat, Field(gt=0)],
1907
+ Annotated[StrictFloat, Field(gt=0)]
1908
+ ]
1909
+ ] = None,
1910
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1911
+ _content_type: Optional[StrictStr] = None,
1912
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1913
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1914
+ ) -> RESTResponseType:
1915
+ """Prepares for a certificate authentication
1916
+
1917
+
1918
+ :param prepare_authentication_request:
1919
+ :type prepare_authentication_request: PrepareAuthenticationRequest
1920
+ :param _request_timeout: timeout setting for this request. If one
1921
+ number provided, it will be total request
1922
+ timeout. It can also be a pair (tuple) of
1923
+ (connection, read) timeouts.
1924
+ :type _request_timeout: int, tuple(int, int), optional
1925
+ :param _request_auth: set to override the auth_settings for an a single
1926
+ request; this effectively ignores the
1927
+ authentication in the spec for a single request.
1928
+ :type _request_auth: dict, optional
1929
+ :param _content_type: force content-type for the request.
1930
+ :type _content_type: str, Optional
1931
+ :param _headers: set to override the headers for a single
1932
+ request; this effectively ignores the headers
1933
+ in the spec for a single request.
1934
+ :type _headers: dict, optional
1935
+ :param _host_index: set to override the host_index for a single
1936
+ request; this effectively ignores the host_index
1937
+ in the spec for a single request.
1938
+ :type _host_index: int, optional
1939
+ :return: Returns the result object.
1940
+ """ # noqa: E501
1941
+
1942
+ _param = self._api_v2_authentication_post_serialize(
1943
+ prepare_authentication_request=prepare_authentication_request,
1944
+ _request_auth=_request_auth,
1945
+ _content_type=_content_type,
1946
+ _headers=_headers,
1947
+ _host_index=_host_index
1948
+ )
1949
+
1950
+ _response_types_map: Dict[str, Optional[str]] = {
1951
+ '200': "PrepareAuthenticationResponse",
1952
+ '400': None,
1953
+ '401': None,
1954
+ '403': None,
1955
+ '422': None
1956
+
1957
+ }
1958
+ response_data = self.api_client.call_api(
1959
+ *_param,
1960
+ _request_timeout=_request_timeout
1961
+ )
1962
+ return response_data.response
1963
+
1964
+
1965
+ def _api_v2_authentication_post_serialize(
1966
+ self,
1967
+ prepare_authentication_request,
1968
+ _request_auth,
1969
+ _content_type,
1970
+ _headers,
1971
+ _host_index,
1972
+ ) -> Tuple:
1973
+
1974
+ _host = None
1975
+
1976
+ _collection_formats: Dict[str, str] = {
1977
+
1978
+ }
1979
+
1980
+ _path_params: Dict[str, str] = {}
1981
+ _query_params: List[Tuple[str, str]] = []
1982
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1983
+ _form_params: List[Tuple[str, str]] = []
1984
+ _files: Dict[str, str] = {}
1985
+ _body_params: Optional[bytes] = None
1986
+
1987
+ # process the path parameters
1988
+ # process the query parameters
1989
+ # process the header parameters
1990
+ # process the form parameters
1991
+ # process the body parameter
1992
+ if prepare_authentication_request is not None:
1993
+ _body_params = prepare_authentication_request
1994
+
1995
+
1996
+ # set the HTTP header `Accept`
1997
+ _header_params['Accept'] = self.api_client.select_header_accept(
1998
+ [
1999
+ 'text/plain',
2000
+ 'application/json',
2001
+ 'text/json'
2002
+ ]
2003
+ )
2004
+
2005
+ # set the HTTP header `Content-Type`
2006
+ if _content_type:
2007
+ _header_params['Content-Type'] = _content_type
2008
+ else:
2009
+ _default_content_type = (
2010
+ self.api_client.select_header_content_type(
2011
+ [
2012
+ 'application/json-patch+json',
2013
+ 'application/json',
2014
+ 'text/json',
2015
+ 'application/*+json'
2016
+ ]
2017
+ )
2018
+ )
2019
+ if _default_content_type is not None:
2020
+ _header_params['Content-Type'] = _default_content_type
2021
+
2022
+ # authentication setting
2023
+ _auth_settings: List[str] = [
2024
+ ]
2025
+
2026
+ return self.api_client.param_serialize(
2027
+ method='POST',
2028
+ resource_path='/api/v2/authentication',
2029
+ path_params=_path_params,
2030
+ query_params=_query_params,
2031
+ header_params=_header_params,
2032
+ body=_body_params,
2033
+ post_params=_form_params,
2034
+ files=_files,
2035
+ auth_settings=_auth_settings,
2036
+ collection_formats=_collection_formats,
2037
+ _host=_host,
2038
+ _request_auth=_request_auth
2039
+ )
2040
+
2041
+