regula-facesdk-webclient 7.2.388.dev0__py3-none-any.whl → 8.1.433.dev0__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 (227) hide show
  1. regula/facesdk/webclient/__init__.py +5 -5
  2. regula/facesdk/webclient/ext/api/group_api.py +2 -27
  3. regula/facesdk/webclient/ext/api/match_api.py +3 -29
  4. regula/facesdk/webclient/ext/api/person_api.py +8 -34
  5. regula/facesdk/webclient/ext/api/sdk.py +5 -3
  6. regula/facesdk/webclient/ext/api/search_api.py +2 -6
  7. regula/facesdk/webclient/ext/models/detect_request.py +6 -5
  8. regula/facesdk/webclient/ext/models/match_image.py +3 -3
  9. regula/facesdk/webclient/ext/models/match_request.py +7 -5
  10. regula/facesdk/webclient/gen/__init__.py +349 -18
  11. regula/facesdk/webclient/gen/api/__init__.py +30 -3
  12. regula/facesdk/webclient/gen/api/group_api.py +1854 -799
  13. regula/facesdk/webclient/gen/api/healthcheck_api.py +475 -215
  14. regula/facesdk/webclient/gen/api/liveness20_api.py +565 -0
  15. regula/facesdk/webclient/gen/api/match_api.py +801 -355
  16. regula/facesdk/webclient/gen/api/person_api.py +2399 -1039
  17. regula/facesdk/webclient/gen/api/search_api.py +286 -130
  18. regula/facesdk/webclient/gen/api_client.py +577 -476
  19. regula/facesdk/webclient/gen/api_response.py +21 -0
  20. regula/facesdk/webclient/gen/configuration.py +231 -105
  21. regula/facesdk/webclient/gen/exceptions.py +82 -33
  22. regula/facesdk/webclient/gen/models/__init__.py +202 -95
  23. regula/facesdk/webclient/gen/models/add_image_to_person_request.py +96 -0
  24. regula/facesdk/webclient/gen/models/add_image_to_person_request_data.py +92 -0
  25. regula/facesdk/webclient/gen/models/add_image_to_person_request_image.py +92 -0
  26. regula/facesdk/webclient/gen/models/add_image_to_person_response.py +92 -0
  27. regula/facesdk/webclient/gen/models/attribute_config.py +83 -0
  28. regula/facesdk/webclient/gen/models/attributes_data.py +82 -0
  29. regula/facesdk/webclient/gen/models/crop.py +88 -0
  30. regula/facesdk/webclient/gen/models/detail_item.py +136 -0
  31. regula/facesdk/webclient/gen/models/detect_attributes_details.py +84 -0
  32. regula/facesdk/webclient/gen/models/detect_details_meta.py +86 -0
  33. regula/facesdk/webclient/gen/models/detect_meta_data.py +84 -0
  34. regula/facesdk/webclient/gen/models/detect_request.py +94 -0
  35. regula/facesdk/webclient/gen/models/detect_request_data.py +90 -0
  36. regula/facesdk/webclient/gen/models/detect_response.py +89 -0
  37. regula/facesdk/webclient/gen/models/detect_response_results.py +86 -0
  38. regula/facesdk/webclient/gen/models/detect_result.py +98 -0
  39. regula/facesdk/webclient/gen/models/detection.py +98 -0
  40. regula/facesdk/webclient/gen/models/detection_attributes.py +92 -0
  41. regula/facesdk/webclient/gen/models/detection_attributes_details_inner.py +132 -0
  42. regula/facesdk/webclient/gen/models/detection_face.py +90 -0
  43. regula/facesdk/webclient/gen/models/detection_quality.py +107 -0
  44. regula/facesdk/webclient/gen/models/device_info.py +111 -0
  45. regula/facesdk/webclient/gen/models/face_attribute.py +40 -0
  46. regula/facesdk/webclient/gen/models/face_image_quality_align_type.py +32 -0
  47. regula/facesdk/webclient/gen/models/face_image_quality_groups.py +35 -0
  48. regula/facesdk/webclient/gen/models/face_image_quality_groups_strings.py +35 -0
  49. regula/facesdk/webclient/gen/models/face_image_quality_status.py +30 -0
  50. regula/facesdk/webclient/gen/models/face_quality_config_name.py +75 -0
  51. regula/facesdk/webclient/gen/models/face_quality_scenarios.py +37 -0
  52. regula/facesdk/webclient/gen/models/face_sdk_result.py +83 -0
  53. regula/facesdk/webclient/gen/models/face_sdk_result_code.py +68 -0
  54. regula/facesdk/webclient/gen/models/faces_response.py +100 -0
  55. regula/facesdk/webclient/gen/models/faces_response_data.py +90 -0
  56. regula/facesdk/webclient/gen/models/filter_op.py +29 -0
  57. regula/facesdk/webclient/gen/models/filter_search_request.py +87 -0
  58. regula/facesdk/webclient/gen/models/group.py +89 -0
  59. regula/facesdk/webclient/gen/models/group_data.py +85 -0
  60. regula/facesdk/webclient/gen/models/group_page.py +94 -0
  61. regula/facesdk/webclient/gen/models/group_page_items.py +90 -0
  62. regula/facesdk/webclient/gen/models/group_response.py +84 -0
  63. regula/facesdk/webclient/gen/models/group_to_create.py +86 -0
  64. regula/facesdk/webclient/gen/models/image.py +96 -0
  65. regula/facesdk/webclient/gen/models/image_fields.py +100 -0
  66. regula/facesdk/webclient/gen/models/image_fields_image.py +92 -0
  67. regula/facesdk/webclient/gen/models/image_page.py +94 -0
  68. regula/facesdk/webclient/gen/models/image_page_items.py +90 -0
  69. regula/facesdk/webclient/gen/models/image_source.py +34 -0
  70. regula/facesdk/webclient/gen/models/liveness_type.py +29 -0
  71. regula/facesdk/webclient/gen/models/match_and_search_request.py +103 -0
  72. regula/facesdk/webclient/gen/models/match_and_search_request_images_item.py +87 -0
  73. regula/facesdk/webclient/gen/models/match_and_search_response.py +107 -0
  74. regula/facesdk/webclient/gen/models/match_and_search_response_data.py +104 -0
  75. regula/facesdk/webclient/gen/models/match_and_search_response_data_detections_item.py +95 -0
  76. regula/facesdk/webclient/gen/models/match_image.py +89 -0
  77. regula/facesdk/webclient/gen/models/match_image_detection.py +95 -0
  78. regula/facesdk/webclient/gen/models/match_image_result.py +97 -0
  79. regula/facesdk/webclient/gen/models/match_request.py +102 -0
  80. regula/facesdk/webclient/gen/models/match_request_data.py +98 -0
  81. regula/facesdk/webclient/gen/models/match_response.py +105 -0
  82. regula/facesdk/webclient/gen/models/match_response_data.py +102 -0
  83. regula/facesdk/webclient/gen/models/operation_log.py +88 -0
  84. regula/facesdk/webclient/gen/models/output_image_params.py +89 -0
  85. regula/facesdk/webclient/gen/models/page.py +84 -0
  86. regula/facesdk/webclient/gen/models/person.py +97 -0
  87. regula/facesdk/webclient/gen/models/person_data.py +87 -0
  88. regula/facesdk/webclient/gen/models/person_fields.py +91 -0
  89. regula/facesdk/webclient/gen/models/person_items.py +90 -0
  90. regula/facesdk/webclient/gen/models/person_to_update_fields.py +89 -0
  91. regula/facesdk/webclient/gen/models/person_with_images.py +107 -0
  92. regula/facesdk/webclient/gen/models/person_with_images_data.py +90 -0
  93. regula/facesdk/webclient/gen/models/persons_page.py +94 -0
  94. regula/facesdk/webclient/gen/models/process_param.py +103 -0
  95. regula/facesdk/webclient/gen/models/process_param_attributes.py +90 -0
  96. regula/facesdk/webclient/gen/models/quality_config.py +86 -0
  97. regula/facesdk/webclient/gen/models/quality_detail.py +94 -0
  98. regula/facesdk/webclient/gen/models/quality_details_groups.py +90 -0
  99. regula/facesdk/webclient/gen/models/quality_request.py +93 -0
  100. regula/facesdk/webclient/gen/models/recognize_image.py +100 -0
  101. regula/facesdk/webclient/gen/models/recognize_image_data.py +84 -0
  102. regula/facesdk/webclient/gen/models/resize_options.py +86 -0
  103. regula/facesdk/webclient/gen/models/search_bad_params.py +86 -0
  104. regula/facesdk/webclient/gen/models/search_detection.py +102 -0
  105. regula/facesdk/webclient/gen/models/search_parameters.py +95 -0
  106. regula/facesdk/webclient/gen/models/search_parameters_create_person.py +86 -0
  107. regula/facesdk/webclient/gen/models/search_person.py +113 -0
  108. regula/facesdk/webclient/gen/models/search_person_data.py +96 -0
  109. regula/facesdk/webclient/gen/models/search_request.py +119 -0
  110. regula/facesdk/webclient/gen/models/search_result.py +92 -0
  111. regula/facesdk/webclient/gen/models/transaction_info.py +99 -0
  112. regula/facesdk/webclient/gen/models/transaction_labels.py +84 -0
  113. regula/facesdk/webclient/gen/models/update_group.py +85 -0
  114. regula/facesdk/webclient/gen/py.typed +0 -0
  115. regula/facesdk/webclient/gen/rest.py +136 -232
  116. {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/METADATA +7 -4
  117. regula_facesdk_webclient-8.1.433.dev0.dist-info/RECORD +125 -0
  118. {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/WHEEL +1 -1
  119. regula/facesdk/webclient/gen/api/diagnostics_api.py +0 -162
  120. regula/facesdk/webclient/gen/api/liveness_2_0_api.py +0 -306
  121. regula/facesdk/webclient/gen/api/liveness_api.py +0 -424
  122. regula/facesdk/webclient/gen/apis/__init__.py +0 -22
  123. regula/facesdk/webclient/gen/model/__init__.py +0 -5
  124. regula/facesdk/webclient/gen/model/add_image_to_person_request.py +0 -261
  125. regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +0 -204
  126. regula/facesdk/webclient/gen/model/add_image_to_person_response.py +0 -262
  127. regula/facesdk/webclient/gen/model/attribute_config.py +0 -120
  128. regula/facesdk/webclient/gen/model/attribute_config_list.py +0 -92
  129. regula/facesdk/webclient/gen/model/crop.py +0 -180
  130. regula/facesdk/webclient/gen/model/detect_attributes_details.py +0 -150
  131. regula/facesdk/webclient/gen/model/detect_details_meta.py +0 -178
  132. regula/facesdk/webclient/gen/model/detect_request.py +0 -232
  133. regula/facesdk/webclient/gen/model/detect_request_attributes.py +0 -120
  134. regula/facesdk/webclient/gen/model/detect_response.py +0 -147
  135. regula/facesdk/webclient/gen/model/detect_response_all_of.py +0 -120
  136. regula/facesdk/webclient/gen/model/detect_result.py +0 -235
  137. regula/facesdk/webclient/gen/model/detection.py +0 -230
  138. regula/facesdk/webclient/gen/model/detection_attributes.py +0 -150
  139. regula/facesdk/webclient/gen/model/detection_face.py +0 -232
  140. regula/facesdk/webclient/gen/model/detection_quality.py +0 -234
  141. regula/facesdk/webclient/gen/model/device_info.py +0 -231
  142. regula/facesdk/webclient/gen/model/face_align_type_quality.py +0 -109
  143. regula/facesdk/webclient/gen/model/face_attribute.py +0 -133
  144. regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +0 -109
  145. regula/facesdk/webclient/gen/model/face_image_quality_groups.py +0 -118
  146. regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +0 -118
  147. regula/facesdk/webclient/gen/model/face_image_quality_status.py +0 -103
  148. regula/facesdk/webclient/gen/model/face_quality_config_name.py +0 -238
  149. regula/facesdk/webclient/gen/model/face_quality_scenarios.py +0 -124
  150. regula/facesdk/webclient/gen/model/face_quality_status.py +0 -103
  151. regula/facesdk/webclient/gen/model/face_rectangular.py +0 -92
  152. regula/facesdk/webclient/gen/model/face_sdk_result.py +0 -121
  153. regula/facesdk/webclient/gen/model/face_sdk_result_code.py +0 -217
  154. regula/facesdk/webclient/gen/model/faces_response.py +0 -258
  155. regula/facesdk/webclient/gen/model/faces_response_all_of.py +0 -148
  156. regula/facesdk/webclient/gen/model/filter_op.py +0 -100
  157. regula/facesdk/webclient/gen/model/filter_search_request.py +0 -176
  158. regula/facesdk/webclient/gen/model/group.py +0 -206
  159. regula/facesdk/webclient/gen/model/group_all_of.py +0 -150
  160. regula/facesdk/webclient/gen/model/group_page.py +0 -178
  161. regula/facesdk/webclient/gen/model/group_page_all_of.py +0 -122
  162. regula/facesdk/webclient/gen/model/group_response.py +0 -150
  163. regula/facesdk/webclient/gen/model/group_to_create.py +0 -180
  164. regula/facesdk/webclient/gen/model/image.py +0 -318
  165. regula/facesdk/webclient/gen/model/image_fields.py +0 -258
  166. regula/facesdk/webclient/gen/model/image_fields_image.py +0 -204
  167. regula/facesdk/webclient/gen/model/image_page.py +0 -176
  168. regula/facesdk/webclient/gen/model/image_page_all_of.py +0 -120
  169. regula/facesdk/webclient/gen/model/image_source.py +0 -115
  170. regula/facesdk/webclient/gen/model/liveness_transaction.py +0 -334
  171. regula/facesdk/webclient/gen/model/liveness_type.py +0 -100
  172. regula/facesdk/webclient/gen/model/match_and_search_request.py +0 -290
  173. regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +0 -234
  174. regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +0 -148
  175. regula/facesdk/webclient/gen/model/match_and_search_request_images.py +0 -176
  176. regula/facesdk/webclient/gen/model/match_and_search_response.py +0 -233
  177. regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +0 -206
  178. regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +0 -176
  179. regula/facesdk/webclient/gen/model/match_image.py +0 -205
  180. regula/facesdk/webclient/gen/model/match_image_detection.py +0 -178
  181. regula/facesdk/webclient/gen/model/match_image_result.py +0 -316
  182. regula/facesdk/webclient/gen/model/match_request.py +0 -233
  183. regula/facesdk/webclient/gen/model/match_request_output_image_params.py +0 -148
  184. regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +0 -212
  185. regula/facesdk/webclient/gen/model/match_response.py +0 -205
  186. regula/facesdk/webclient/gen/model/match_response_all_of.py +0 -178
  187. regula/facesdk/webclient/gen/model/operation_log.py +0 -206
  188. regula/facesdk/webclient/gen/model/output_image_params.py +0 -146
  189. regula/facesdk/webclient/gen/model/page.py +0 -150
  190. regula/facesdk/webclient/gen/model/person.py +0 -319
  191. regula/facesdk/webclient/gen/model/person_all_of.py +0 -206
  192. regula/facesdk/webclient/gen/model/person_created_response.py +0 -178
  193. regula/facesdk/webclient/gen/model/person_fields.py +0 -235
  194. regula/facesdk/webclient/gen/model/person_to_update_fields.py +0 -206
  195. regula/facesdk/webclient/gen/model/person_with_images.py +0 -347
  196. regula/facesdk/webclient/gen/model/person_with_images_all_of.py +0 -122
  197. regula/facesdk/webclient/gen/model/persons_page.py +0 -176
  198. regula/facesdk/webclient/gen/model/persons_page_all_of.py +0 -120
  199. regula/facesdk/webclient/gen/model/persons_request.py +0 -291
  200. regula/facesdk/webclient/gen/model/persons_request_all_of.py +0 -150
  201. regula/facesdk/webclient/gen/model/process_param.py +0 -226
  202. regula/facesdk/webclient/gen/model/process_param_attributes.py +0 -120
  203. regula/facesdk/webclient/gen/model/quality_config.py +0 -154
  204. regula/facesdk/webclient/gen/model/quality_config_list.py +0 -92
  205. regula/facesdk/webclient/gen/model/quality_detail.py +0 -234
  206. regula/facesdk/webclient/gen/model/quality_details_groups.py +0 -202
  207. regula/facesdk/webclient/gen/model/quality_request.py +0 -146
  208. regula/facesdk/webclient/gen/model/recognize_image.py +0 -374
  209. regula/facesdk/webclient/gen/model/recognize_image_all_of.py +0 -150
  210. regula/facesdk/webclient/gen/model/resize_options.py +0 -178
  211. regula/facesdk/webclient/gen/model/rgb.py +0 -92
  212. regula/facesdk/webclient/gen/model/search_bad_params.py +0 -172
  213. regula/facesdk/webclient/gen/model/search_detection.py +0 -398
  214. regula/facesdk/webclient/gen/model/search_parameters.py +0 -174
  215. regula/facesdk/webclient/gen/model/search_parameters_create_person.py +0 -177
  216. regula/facesdk/webclient/gen/model/search_person.py +0 -373
  217. regula/facesdk/webclient/gen/model/search_person_all_of.py +0 -148
  218. regula/facesdk/webclient/gen/model/search_request.py +0 -394
  219. regula/facesdk/webclient/gen/model/search_request_all_of.py +0 -150
  220. regula/facesdk/webclient/gen/model/search_result.py +0 -150
  221. regula/facesdk/webclient/gen/model/search_result_all_of.py +0 -122
  222. regula/facesdk/webclient/gen/model/transaction_config.py +0 -92
  223. regula/facesdk/webclient/gen/model/transaction_info.py +0 -344
  224. regula/facesdk/webclient/gen/model/update_group.py +0 -150
  225. regula/facesdk/webclient/gen/model_utils.py +0 -2037
  226. regula_facesdk_webclient-7.2.388.dev0.dist-info/RECORD +0 -138
  227. {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/top_level.txt +0 -0
@@ -1,463 +1,909 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- Regula Face SDK Web API
5
-
6
- <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
7
-
8
- The version of the OpenAPI document: 7.2.0
9
4
  Generated by: https://openapi-generator.tech
10
5
  """
11
-
12
-
13
- from __future__ import absolute_import
14
-
15
- import re # noqa: F401
16
-
17
- # python 2 and python 3 compatibility library
18
- import six
19
-
20
- from regula.facesdk.webclient.gen.api_client import ApiClient
21
- from regula.facesdk.webclient.gen.exceptions import ( # noqa: F401
22
- ApiTypeError,
23
- ApiValueError
24
- )
25
-
26
-
27
- class MatchApi(object):
6
+ import warnings
7
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
8
+ from typing import Any, Dict, List, Optional, Tuple, Union
9
+ from typing_extensions import Annotated
10
+
11
+ from pydantic import Field, StrictStr
12
+ from typing import Optional
13
+ from typing_extensions import Annotated
14
+ from regula.facesdk.webclient.gen.models.detect_request import DetectRequest
15
+ from regula.facesdk.webclient.gen.models.detect_response import DetectResponse
16
+ from regula.facesdk.webclient.gen.models.match_and_search_request import MatchAndSearchRequest
17
+ from regula.facesdk.webclient.gen.models.match_and_search_response import MatchAndSearchResponse
18
+ from regula.facesdk.webclient.gen.models.match_request import MatchRequest
19
+ from regula.facesdk.webclient.gen.models.match_response import MatchResponse
20
+
21
+ from regula.facesdk.webclient.gen.api_client import ApiClient, RequestSerialized
22
+ from regula.facesdk.webclient.gen.api_response import ApiResponse
23
+ from regula.facesdk.webclient.gen.rest import RESTResponseType
24
+
25
+
26
+ class MatchApi:
28
27
  """NOTE: This class is auto generated by OpenAPI Generator
29
28
  Ref: https://openapi-generator.tech
30
29
 
31
30
  Do not edit the class manually.
32
31
  """
33
32
 
34
- def __init__(self, api_client=None):
33
+ def __init__(self, api_client=None) -> None:
35
34
  if api_client is None:
36
- api_client = ApiClient()
35
+ api_client = ApiClient.get_default()
37
36
  self.api_client = api_client
38
37
 
39
- def detect(self, detect_request, **kwargs): # noqa: E501
40
- """detect and check quality # noqa: E501
41
38
 
42
- Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/). # noqa: E501
43
- This method makes a synchronous HTTP request by default. To make an
44
- asynchronous HTTP request, please pass async_req=True
39
+ @validate_call
40
+ def detect(
41
+ self,
42
+ detect_request: DetectRequest,
43
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Annotated[StrictFloat, Field(gt=0)]
50
+ ]
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> DetectResponse:
57
+ """detect and check quality
58
+
59
+ Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/).
60
+
61
+ :param detect_request: (required)
62
+ :type detect_request: DetectRequest
63
+ :param x_request_id: Request header label.
64
+ :type x_request_id: str
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._detect_serialize(
88
+ detect_request=detect_request,
89
+ x_request_id=x_request_id,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "DetectResponse",
98
+ '403': None,
99
+ }
100
+ response_data = self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ def detect_with_http_info(
113
+ self,
114
+ detect_request: DetectRequest,
115
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[DetectResponse]:
129
+ """detect and check quality
45
130
 
46
- >>> thread = api.detect(detect_request, async_req=True)
47
- >>> result = thread.get()
131
+ Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/).
48
132
 
49
133
  :param detect_request: (required)
50
134
  :type detect_request: DetectRequest
51
135
  :param x_request_id: Request header label.
52
136
  :type x_request_id: str
53
- :param async_req: Whether to execute the request asynchronously.
54
- :type async_req: bool, optional
55
- :param _preload_content: if False, the urllib3.HTTPResponse object will
56
- be returned without reading/decoding response
57
- data. Default is True.
58
- :type _preload_content: bool, optional
59
137
  :param _request_timeout: timeout setting for this request. If one
60
138
  number provided, it will be total request
61
139
  timeout. It can also be a pair (tuple) of
62
140
  (connection, read) timeouts.
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
63
156
  :return: Returns the result object.
64
- If the method is called asynchronously,
65
- returns the request thread.
66
- :rtype: DetectResponse
67
- """
68
- kwargs['_return_http_data_only'] = True
69
- return self.detect_with_http_info(detect_request, **kwargs) # noqa: E501
157
+ """ # noqa: E501
158
+
159
+ _param = self._detect_serialize(
160
+ detect_request=detect_request,
161
+ x_request_id=x_request_id,
162
+ _request_auth=_request_auth,
163
+ _content_type=_content_type,
164
+ _headers=_headers,
165
+ _host_index=_host_index
166
+ )
167
+
168
+ _response_types_map: Dict[str, Optional[str]] = {
169
+ '200': "DetectResponse",
170
+ '403': None,
171
+ }
172
+ response_data = self.api_client.call_api(
173
+ *_param,
174
+ _request_timeout=_request_timeout
175
+ )
176
+ response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
70
181
 
71
- def detect_with_http_info(self, detect_request, **kwargs): # noqa: E501
72
- """detect and check quality # noqa: E501
73
182
 
74
- Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/). # noqa: E501
75
- This method makes a synchronous HTTP request by default. To make an
76
- asynchronous HTTP request, please pass async_req=True
183
+ @validate_call
184
+ def detect_without_preload_content(
185
+ self,
186
+ detect_request: DetectRequest,
187
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)],
193
+ Annotated[StrictFloat, Field(gt=0)]
194
+ ]
195
+ ] = None,
196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
197
+ _content_type: Optional[StrictStr] = None,
198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
200
+ ) -> RESTResponseType:
201
+ """detect and check quality
77
202
 
78
- >>> thread = api.detect_with_http_info(detect_request, async_req=True)
79
- >>> result = thread.get()
203
+ Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/).
80
204
 
81
205
  :param detect_request: (required)
82
206
  :type detect_request: DetectRequest
83
207
  :param x_request_id: Request header label.
84
208
  :type x_request_id: str
85
- :param async_req: Whether to execute the request asynchronously.
86
- :type async_req: bool, optional
87
- :param _return_http_data_only: response data without head status code
88
- and headers
89
- :type _return_http_data_only: bool, optional
90
- :param _preload_content: if False, the urllib3.HTTPResponse object will
91
- be returned without reading/decoding response
92
- data. Default is True.
93
- :type _preload_content: bool, optional
94
209
  :param _request_timeout: timeout setting for this request. If one
95
210
  number provided, it will be total request
96
211
  timeout. It can also be a pair (tuple) of
97
212
  (connection, read) timeouts.
213
+ :type _request_timeout: int, tuple(int, int), optional
98
214
  :param _request_auth: set to override the auth_settings for an a single
99
- request; this effectively ignores the authentication
100
- in the spec for a single request.
215
+ request; this effectively ignores the
216
+ authentication in the spec for a single request.
101
217
  :type _request_auth: dict, optional
218
+ :param _content_type: force content-type for the request.
219
+ :type _content_type: str, Optional
220
+ :param _headers: set to override the headers for a single
221
+ request; this effectively ignores the headers
222
+ in the spec for a single request.
223
+ :type _headers: dict, optional
224
+ :param _host_index: set to override the host_index for a single
225
+ request; this effectively ignores the host_index
226
+ in the spec for a single request.
227
+ :type _host_index: int, optional
102
228
  :return: Returns the result object.
103
- If the method is called asynchronously,
104
- returns the request thread.
105
- :rtype: tuple(DetectResponse, status_code(int), headers(HTTPHeaderDict))
106
- """
229
+ """ # noqa: E501
230
+
231
+ _param = self._detect_serialize(
232
+ detect_request=detect_request,
233
+ x_request_id=x_request_id,
234
+ _request_auth=_request_auth,
235
+ _content_type=_content_type,
236
+ _headers=_headers,
237
+ _host_index=_host_index
238
+ )
107
239
 
108
- local_var_params = locals()
240
+ _response_types_map: Dict[str, Optional[str]] = {
241
+ '200': "DetectResponse",
242
+ '403': None,
243
+ }
244
+ response_data = self.api_client.call_api(
245
+ *_param,
246
+ _request_timeout=_request_timeout
247
+ )
248
+ return response_data.response
249
+
250
+
251
+ def _detect_serialize(
252
+ self,
253
+ detect_request,
254
+ x_request_id,
255
+ _request_auth,
256
+ _content_type,
257
+ _headers,
258
+ _host_index,
259
+ ) -> RequestSerialized:
260
+
261
+ _host = None
262
+
263
+ _collection_formats: Dict[str, str] = {
264
+ }
265
+
266
+ _path_params: Dict[str, str] = {}
267
+ _query_params: List[Tuple[str, str]] = []
268
+ _header_params: Dict[str, Optional[str]] = _headers or {}
269
+ _form_params: List[Tuple[str, str]] = []
270
+ _files: Dict[
271
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
272
+ ] = {}
273
+ _body_params: Optional[bytes] = None
274
+
275
+ # process the path parameters
276
+ # process the query parameters
277
+ # process the header parameters
278
+ if x_request_id is not None:
279
+ _header_params['X-RequestID'] = x_request_id
280
+ # process the form parameters
281
+ # process the body parameter
282
+ if detect_request is not None:
283
+ _body_params = detect_request
284
+
285
+
286
+ # set the HTTP header `Accept`
287
+ if 'Accept' not in _header_params:
288
+ _header_params['Accept'] = self.api_client.select_header_accept(
289
+ [
290
+ 'application/json'
291
+ ]
292
+ )
293
+
294
+ # set the HTTP header `Content-Type`
295
+ if _content_type:
296
+ _header_params['Content-Type'] = _content_type
297
+ else:
298
+ _default_content_type = (
299
+ self.api_client.select_header_content_type(
300
+ [
301
+ 'application/json'
302
+ ]
303
+ )
304
+ )
305
+ if _default_content_type is not None:
306
+ _header_params['Content-Type'] = _default_content_type
109
307
 
110
- all_params = [
111
- 'detect_request',
112
- 'x_request_id',
308
+ # authentication setting
309
+ _auth_settings: List[str] = [
113
310
  ]
114
- all_params.extend(
115
- [
116
- 'async_req',
117
- '_return_http_data_only',
118
- '_preload_content',
119
- '_request_timeout',
120
- '_request_auth'
311
+
312
+ return self.api_client.param_serialize(
313
+ method='POST',
314
+ resource_path='/api/detect',
315
+ path_params=_path_params,
316
+ query_params=_query_params,
317
+ header_params=_header_params,
318
+ body=_body_params,
319
+ post_params=_form_params,
320
+ files=_files,
321
+ auth_settings=_auth_settings,
322
+ collection_formats=_collection_formats,
323
+ _host=_host,
324
+ _request_auth=_request_auth
325
+ )
326
+
327
+
328
+
329
+
330
+ @validate_call
331
+ def match(
332
+ self,
333
+ match_request: MatchRequest,
334
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
335
+ _request_timeout: Union[
336
+ None,
337
+ Annotated[StrictFloat, Field(gt=0)],
338
+ Tuple[
339
+ Annotated[StrictFloat, Field(gt=0)],
340
+ Annotated[StrictFloat, Field(gt=0)]
121
341
  ]
342
+ ] = None,
343
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
344
+ _content_type: Optional[StrictStr] = None,
345
+ _headers: Optional[Dict[StrictStr, Any]] = None,
346
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
347
+ ) -> MatchResponse:
348
+ """compare faces (1:1)
349
+
350
+ To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
351
+
352
+ :param match_request: (required)
353
+ :type match_request: MatchRequest
354
+ :param x_request_id: Request header label.
355
+ :type x_request_id: str
356
+ :param _request_timeout: timeout setting for this request. If one
357
+ number provided, it will be total request
358
+ timeout. It can also be a pair (tuple) of
359
+ (connection, read) timeouts.
360
+ :type _request_timeout: int, tuple(int, int), optional
361
+ :param _request_auth: set to override the auth_settings for an a single
362
+ request; this effectively ignores the
363
+ authentication in the spec for a single request.
364
+ :type _request_auth: dict, optional
365
+ :param _content_type: force content-type for the request.
366
+ :type _content_type: str, Optional
367
+ :param _headers: set to override the headers for a single
368
+ request; this effectively ignores the headers
369
+ in the spec for a single request.
370
+ :type _headers: dict, optional
371
+ :param _host_index: set to override the host_index for a single
372
+ request; this effectively ignores the host_index
373
+ in the spec for a single request.
374
+ :type _host_index: int, optional
375
+ :return: Returns the result object.
376
+ """ # noqa: E501
377
+
378
+ _param = self._match_serialize(
379
+ match_request=match_request,
380
+ x_request_id=x_request_id,
381
+ _request_auth=_request_auth,
382
+ _content_type=_content_type,
383
+ _headers=_headers,
384
+ _host_index=_host_index
122
385
  )
123
386
 
124
- for key, val in six.iteritems(local_var_params['kwargs']):
125
- if key not in all_params:
126
- raise ApiTypeError(
127
- "Got an unexpected keyword argument '%s'"
128
- " to method detect" % key
129
- )
130
- local_var_params[key] = val
131
- del local_var_params['kwargs']
132
- # verify the required parameter 'detect_request' is set
133
- if self.api_client.client_side_validation and ('detect_request' not in local_var_params or # noqa: E501
134
- local_var_params['detect_request'] is None): # noqa: E501
135
- raise ApiValueError("Missing the required parameter `detect_request` when calling `detect`") # noqa: E501
136
-
137
- collection_formats = {}
138
-
139
- path_params = {}
140
-
141
- query_params = []
142
-
143
- header_params = {}
144
- if 'x_request_id' in local_var_params:
145
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
146
-
147
- form_params = []
148
- local_var_files = {}
149
-
150
- body_params = None
151
- if 'detect_request' in local_var_params:
152
- body_params = local_var_params['detect_request']
153
- # HTTP header `Accept`
154
- header_params['Accept'] = self.api_client.select_header_accept(
155
- ['application/json']) # noqa: E501
156
-
157
- # HTTP header `Content-Type`
158
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
159
- ['application/json']) # noqa: E501
160
-
161
- # Authentication setting
162
- auth_settings = [] # noqa: E501
163
-
164
- return self.api_client.call_api(
165
- '/api/detect', 'POST',
166
- path_params,
167
- query_params,
168
- header_params,
169
- body=body_params,
170
- post_params=form_params,
171
- files=local_var_files,
172
- response_type='DetectResponse', # noqa: E501
173
- auth_settings=auth_settings,
174
- async_req=local_var_params.get('async_req'),
175
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
176
- _preload_content=local_var_params.get('_preload_content', True),
177
- _request_timeout=local_var_params.get('_request_timeout'),
178
- collection_formats=collection_formats,
179
- _request_auth=local_var_params.get('_request_auth'))
180
-
181
- def match(self, match_request, **kwargs): # noqa: E501
182
- """compare faces (1:1) # noqa: E501
183
-
184
- To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1` # noqa: E501
185
- This method makes a synchronous HTTP request by default. To make an
186
- asynchronous HTTP request, please pass async_req=True
187
-
188
- >>> thread = api.match(match_request, async_req=True)
189
- >>> result = thread.get()
387
+ _response_types_map: Dict[str, Optional[str]] = {
388
+ '200': "MatchResponse",
389
+ '403': None,
390
+ }
391
+ response_data = self.api_client.call_api(
392
+ *_param,
393
+ _request_timeout=_request_timeout
394
+ )
395
+ response_data.read()
396
+ return self.api_client.response_deserialize(
397
+ response_data=response_data,
398
+ response_types_map=_response_types_map,
399
+ ).data
400
+
401
+
402
+ @validate_call
403
+ def match_with_http_info(
404
+ self,
405
+ match_request: MatchRequest,
406
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
407
+ _request_timeout: Union[
408
+ None,
409
+ Annotated[StrictFloat, Field(gt=0)],
410
+ Tuple[
411
+ Annotated[StrictFloat, Field(gt=0)],
412
+ Annotated[StrictFloat, Field(gt=0)]
413
+ ]
414
+ ] = None,
415
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
416
+ _content_type: Optional[StrictStr] = None,
417
+ _headers: Optional[Dict[StrictStr, Any]] = None,
418
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
419
+ ) -> ApiResponse[MatchResponse]:
420
+ """compare faces (1:1)
421
+
422
+ To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
190
423
 
191
424
  :param match_request: (required)
192
425
  :type match_request: MatchRequest
193
426
  :param x_request_id: Request header label.
194
427
  :type x_request_id: str
195
- :param async_req: Whether to execute the request asynchronously.
196
- :type async_req: bool, optional
197
- :param _preload_content: if False, the urllib3.HTTPResponse object will
198
- be returned without reading/decoding response
199
- data. Default is True.
200
- :type _preload_content: bool, optional
201
428
  :param _request_timeout: timeout setting for this request. If one
202
429
  number provided, it will be total request
203
430
  timeout. It can also be a pair (tuple) of
204
431
  (connection, read) timeouts.
432
+ :type _request_timeout: int, tuple(int, int), optional
433
+ :param _request_auth: set to override the auth_settings for an a single
434
+ request; this effectively ignores the
435
+ authentication in the spec for a single request.
436
+ :type _request_auth: dict, optional
437
+ :param _content_type: force content-type for the request.
438
+ :type _content_type: str, Optional
439
+ :param _headers: set to override the headers for a single
440
+ request; this effectively ignores the headers
441
+ in the spec for a single request.
442
+ :type _headers: dict, optional
443
+ :param _host_index: set to override the host_index for a single
444
+ request; this effectively ignores the host_index
445
+ in the spec for a single request.
446
+ :type _host_index: int, optional
205
447
  :return: Returns the result object.
206
- If the method is called asynchronously,
207
- returns the request thread.
208
- :rtype: MatchResponse
209
- """
210
- kwargs['_return_http_data_only'] = True
211
- return self.match_with_http_info(match_request, **kwargs) # noqa: E501
448
+ """ # noqa: E501
449
+
450
+ _param = self._match_serialize(
451
+ match_request=match_request,
452
+ x_request_id=x_request_id,
453
+ _request_auth=_request_auth,
454
+ _content_type=_content_type,
455
+ _headers=_headers,
456
+ _host_index=_host_index
457
+ )
212
458
 
213
- def match_with_http_info(self, match_request, **kwargs): # noqa: E501
214
- """compare faces (1:1) # noqa: E501
459
+ _response_types_map: Dict[str, Optional[str]] = {
460
+ '200': "MatchResponse",
461
+ '403': None,
462
+ }
463
+ response_data = self.api_client.call_api(
464
+ *_param,
465
+ _request_timeout=_request_timeout
466
+ )
467
+ response_data.read()
468
+ return self.api_client.response_deserialize(
469
+ response_data=response_data,
470
+ response_types_map=_response_types_map,
471
+ )
215
472
 
216
- To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1` # noqa: E501
217
- This method makes a synchronous HTTP request by default. To make an
218
- asynchronous HTTP request, please pass async_req=True
219
473
 
220
- >>> thread = api.match_with_http_info(match_request, async_req=True)
221
- >>> result = thread.get()
474
+ @validate_call
475
+ def match_without_preload_content(
476
+ self,
477
+ match_request: MatchRequest,
478
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
479
+ _request_timeout: Union[
480
+ None,
481
+ Annotated[StrictFloat, Field(gt=0)],
482
+ Tuple[
483
+ Annotated[StrictFloat, Field(gt=0)],
484
+ Annotated[StrictFloat, Field(gt=0)]
485
+ ]
486
+ ] = None,
487
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
488
+ _content_type: Optional[StrictStr] = None,
489
+ _headers: Optional[Dict[StrictStr, Any]] = None,
490
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
491
+ ) -> RESTResponseType:
492
+ """compare faces (1:1)
493
+
494
+ To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
222
495
 
223
496
  :param match_request: (required)
224
497
  :type match_request: MatchRequest
225
498
  :param x_request_id: Request header label.
226
499
  :type x_request_id: str
227
- :param async_req: Whether to execute the request asynchronously.
228
- :type async_req: bool, optional
229
- :param _return_http_data_only: response data without head status code
230
- and headers
231
- :type _return_http_data_only: bool, optional
232
- :param _preload_content: if False, the urllib3.HTTPResponse object will
233
- be returned without reading/decoding response
234
- data. Default is True.
235
- :type _preload_content: bool, optional
236
500
  :param _request_timeout: timeout setting for this request. If one
237
501
  number provided, it will be total request
238
502
  timeout. It can also be a pair (tuple) of
239
503
  (connection, read) timeouts.
504
+ :type _request_timeout: int, tuple(int, int), optional
240
505
  :param _request_auth: set to override the auth_settings for an a single
241
- request; this effectively ignores the authentication
242
- in the spec for a single request.
506
+ request; this effectively ignores the
507
+ authentication in the spec for a single request.
243
508
  :type _request_auth: dict, optional
509
+ :param _content_type: force content-type for the request.
510
+ :type _content_type: str, Optional
511
+ :param _headers: set to override the headers for a single
512
+ request; this effectively ignores the headers
513
+ in the spec for a single request.
514
+ :type _headers: dict, optional
515
+ :param _host_index: set to override the host_index for a single
516
+ request; this effectively ignores the host_index
517
+ in the spec for a single request.
518
+ :type _host_index: int, optional
244
519
  :return: Returns the result object.
245
- If the method is called asynchronously,
246
- returns the request thread.
247
- :rtype: tuple(MatchResponse, status_code(int), headers(HTTPHeaderDict))
248
- """
520
+ """ # noqa: E501
521
+
522
+ _param = self._match_serialize(
523
+ match_request=match_request,
524
+ x_request_id=x_request_id,
525
+ _request_auth=_request_auth,
526
+ _content_type=_content_type,
527
+ _headers=_headers,
528
+ _host_index=_host_index
529
+ )
249
530
 
250
- local_var_params = locals()
531
+ _response_types_map: Dict[str, Optional[str]] = {
532
+ '200': "MatchResponse",
533
+ '403': None,
534
+ }
535
+ response_data = self.api_client.call_api(
536
+ *_param,
537
+ _request_timeout=_request_timeout
538
+ )
539
+ return response_data.response
540
+
541
+
542
+ def _match_serialize(
543
+ self,
544
+ match_request,
545
+ x_request_id,
546
+ _request_auth,
547
+ _content_type,
548
+ _headers,
549
+ _host_index,
550
+ ) -> RequestSerialized:
551
+
552
+ _host = None
553
+
554
+ _collection_formats: Dict[str, str] = {
555
+ }
556
+
557
+ _path_params: Dict[str, str] = {}
558
+ _query_params: List[Tuple[str, str]] = []
559
+ _header_params: Dict[str, Optional[str]] = _headers or {}
560
+ _form_params: List[Tuple[str, str]] = []
561
+ _files: Dict[
562
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
563
+ ] = {}
564
+ _body_params: Optional[bytes] = None
565
+
566
+ # process the path parameters
567
+ # process the query parameters
568
+ # process the header parameters
569
+ if x_request_id is not None:
570
+ _header_params['X-RequestID'] = x_request_id
571
+ # process the form parameters
572
+ # process the body parameter
573
+ if match_request is not None:
574
+ _body_params = match_request
575
+
576
+
577
+ # set the HTTP header `Accept`
578
+ if 'Accept' not in _header_params:
579
+ _header_params['Accept'] = self.api_client.select_header_accept(
580
+ [
581
+ 'application/json'
582
+ ]
583
+ )
584
+
585
+ # set the HTTP header `Content-Type`
586
+ if _content_type:
587
+ _header_params['Content-Type'] = _content_type
588
+ else:
589
+ _default_content_type = (
590
+ self.api_client.select_header_content_type(
591
+ [
592
+ 'application/json'
593
+ ]
594
+ )
595
+ )
596
+ if _default_content_type is not None:
597
+ _header_params['Content-Type'] = _default_content_type
251
598
 
252
- all_params = [
253
- 'match_request',
254
- 'x_request_id',
599
+ # authentication setting
600
+ _auth_settings: List[str] = [
255
601
  ]
256
- all_params.extend(
257
- [
258
- 'async_req',
259
- '_return_http_data_only',
260
- '_preload_content',
261
- '_request_timeout',
262
- '_request_auth'
602
+
603
+ return self.api_client.param_serialize(
604
+ method='POST',
605
+ resource_path='/api/match',
606
+ path_params=_path_params,
607
+ query_params=_query_params,
608
+ header_params=_header_params,
609
+ body=_body_params,
610
+ post_params=_form_params,
611
+ files=_files,
612
+ auth_settings=_auth_settings,
613
+ collection_formats=_collection_formats,
614
+ _host=_host,
615
+ _request_auth=_request_auth
616
+ )
617
+
618
+
619
+
620
+
621
+ @validate_call
622
+ def match_and_search(
623
+ self,
624
+ match_and_search_request: MatchAndSearchRequest,
625
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
626
+ _request_timeout: Union[
627
+ None,
628
+ Annotated[StrictFloat, Field(gt=0)],
629
+ Tuple[
630
+ Annotated[StrictFloat, Field(gt=0)],
631
+ Annotated[StrictFloat, Field(gt=0)]
263
632
  ]
633
+ ] = None,
634
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
635
+ _content_type: Optional[StrictStr] = None,
636
+ _headers: Optional[Dict[StrictStr, Any]] = None,
637
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
638
+ ) -> MatchAndSearchResponse:
639
+ """match and search (1:1 + 1:N)
640
+
641
+ To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out.
642
+
643
+ :param match_and_search_request: (required)
644
+ :type match_and_search_request: MatchAndSearchRequest
645
+ :param x_request_id: Request header label.
646
+ :type x_request_id: str
647
+ :param _request_timeout: timeout setting for this request. If one
648
+ number provided, it will be total request
649
+ timeout. It can also be a pair (tuple) of
650
+ (connection, read) timeouts.
651
+ :type _request_timeout: int, tuple(int, int), optional
652
+ :param _request_auth: set to override the auth_settings for an a single
653
+ request; this effectively ignores the
654
+ authentication in the spec for a single request.
655
+ :type _request_auth: dict, optional
656
+ :param _content_type: force content-type for the request.
657
+ :type _content_type: str, Optional
658
+ :param _headers: set to override the headers for a single
659
+ request; this effectively ignores the headers
660
+ in the spec for a single request.
661
+ :type _headers: dict, optional
662
+ :param _host_index: set to override the host_index for a single
663
+ request; this effectively ignores the host_index
664
+ in the spec for a single request.
665
+ :type _host_index: int, optional
666
+ :return: Returns the result object.
667
+ """ # noqa: E501
668
+
669
+ _param = self._match_and_search_serialize(
670
+ match_and_search_request=match_and_search_request,
671
+ x_request_id=x_request_id,
672
+ _request_auth=_request_auth,
673
+ _content_type=_content_type,
674
+ _headers=_headers,
675
+ _host_index=_host_index
264
676
  )
265
677
 
266
- for key, val in six.iteritems(local_var_params['kwargs']):
267
- if key not in all_params:
268
- raise ApiTypeError(
269
- "Got an unexpected keyword argument '%s'"
270
- " to method match" % key
271
- )
272
- local_var_params[key] = val
273
- del local_var_params['kwargs']
274
- # verify the required parameter 'match_request' is set
275
- if self.api_client.client_side_validation and ('match_request' not in local_var_params or # noqa: E501
276
- local_var_params['match_request'] is None): # noqa: E501
277
- raise ApiValueError("Missing the required parameter `match_request` when calling `match`") # noqa: E501
278
-
279
- collection_formats = {}
280
-
281
- path_params = {}
282
-
283
- query_params = []
284
-
285
- header_params = {}
286
- if 'x_request_id' in local_var_params:
287
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
288
-
289
- form_params = []
290
- local_var_files = {}
291
-
292
- body_params = None
293
- if 'match_request' in local_var_params:
294
- body_params = local_var_params['match_request']
295
- # HTTP header `Accept`
296
- header_params['Accept'] = self.api_client.select_header_accept(
297
- ['application/json']) # noqa: E501
298
-
299
- # HTTP header `Content-Type`
300
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
301
- ['application/json']) # noqa: E501
302
-
303
- # Authentication setting
304
- auth_settings = [] # noqa: E501
305
-
306
- return self.api_client.call_api(
307
- '/api/match', 'POST',
308
- path_params,
309
- query_params,
310
- header_params,
311
- body=body_params,
312
- post_params=form_params,
313
- files=local_var_files,
314
- response_type='MatchResponse', # noqa: E501
315
- auth_settings=auth_settings,
316
- async_req=local_var_params.get('async_req'),
317
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
318
- _preload_content=local_var_params.get('_preload_content', True),
319
- _request_timeout=local_var_params.get('_request_timeout'),
320
- collection_formats=collection_formats,
321
- _request_auth=local_var_params.get('_request_auth'))
322
-
323
- def match_and_search(self, match_and_search_request, **kwargs): # noqa: E501
324
- """match and search (1:1 + 1:N) # noqa: E501
325
-
326
- To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out. # noqa: E501
327
- This method makes a synchronous HTTP request by default. To make an
328
- asynchronous HTTP request, please pass async_req=True
329
-
330
- >>> thread = api.match_and_search(match_and_search_request, async_req=True)
331
- >>> result = thread.get()
678
+ _response_types_map: Dict[str, Optional[str]] = {
679
+ '200': "MatchAndSearchResponse",
680
+ '403': None,
681
+ }
682
+ response_data = self.api_client.call_api(
683
+ *_param,
684
+ _request_timeout=_request_timeout
685
+ )
686
+ response_data.read()
687
+ return self.api_client.response_deserialize(
688
+ response_data=response_data,
689
+ response_types_map=_response_types_map,
690
+ ).data
691
+
692
+
693
+ @validate_call
694
+ def match_and_search_with_http_info(
695
+ self,
696
+ match_and_search_request: MatchAndSearchRequest,
697
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
698
+ _request_timeout: Union[
699
+ None,
700
+ Annotated[StrictFloat, Field(gt=0)],
701
+ Tuple[
702
+ Annotated[StrictFloat, Field(gt=0)],
703
+ Annotated[StrictFloat, Field(gt=0)]
704
+ ]
705
+ ] = None,
706
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
707
+ _content_type: Optional[StrictStr] = None,
708
+ _headers: Optional[Dict[StrictStr, Any]] = None,
709
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
710
+ ) -> ApiResponse[MatchAndSearchResponse]:
711
+ """match and search (1:1 + 1:N)
712
+
713
+ To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out.
332
714
 
333
715
  :param match_and_search_request: (required)
334
716
  :type match_and_search_request: MatchAndSearchRequest
335
717
  :param x_request_id: Request header label.
336
718
  :type x_request_id: str
337
- :param async_req: Whether to execute the request asynchronously.
338
- :type async_req: bool, optional
339
- :param _preload_content: if False, the urllib3.HTTPResponse object will
340
- be returned without reading/decoding response
341
- data. Default is True.
342
- :type _preload_content: bool, optional
343
719
  :param _request_timeout: timeout setting for this request. If one
344
720
  number provided, it will be total request
345
721
  timeout. It can also be a pair (tuple) of
346
722
  (connection, read) timeouts.
723
+ :type _request_timeout: int, tuple(int, int), optional
724
+ :param _request_auth: set to override the auth_settings for an a single
725
+ request; this effectively ignores the
726
+ authentication in the spec for a single request.
727
+ :type _request_auth: dict, optional
728
+ :param _content_type: force content-type for the request.
729
+ :type _content_type: str, Optional
730
+ :param _headers: set to override the headers for a single
731
+ request; this effectively ignores the headers
732
+ in the spec for a single request.
733
+ :type _headers: dict, optional
734
+ :param _host_index: set to override the host_index for a single
735
+ request; this effectively ignores the host_index
736
+ in the spec for a single request.
737
+ :type _host_index: int, optional
347
738
  :return: Returns the result object.
348
- If the method is called asynchronously,
349
- returns the request thread.
350
- :rtype: MatchAndSearchResponse
351
- """
352
- kwargs['_return_http_data_only'] = True
353
- return self.match_and_search_with_http_info(match_and_search_request, **kwargs) # noqa: E501
739
+ """ # noqa: E501
740
+
741
+ _param = self._match_and_search_serialize(
742
+ match_and_search_request=match_and_search_request,
743
+ x_request_id=x_request_id,
744
+ _request_auth=_request_auth,
745
+ _content_type=_content_type,
746
+ _headers=_headers,
747
+ _host_index=_host_index
748
+ )
354
749
 
355
- def match_and_search_with_http_info(self, match_and_search_request, **kwargs): # noqa: E501
356
- """match and search (1:1 + 1:N) # noqa: E501
750
+ _response_types_map: Dict[str, Optional[str]] = {
751
+ '200': "MatchAndSearchResponse",
752
+ '403': None,
753
+ }
754
+ response_data = self.api_client.call_api(
755
+ *_param,
756
+ _request_timeout=_request_timeout
757
+ )
758
+ response_data.read()
759
+ return self.api_client.response_deserialize(
760
+ response_data=response_data,
761
+ response_types_map=_response_types_map,
762
+ )
357
763
 
358
- To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out. # noqa: E501
359
- This method makes a synchronous HTTP request by default. To make an
360
- asynchronous HTTP request, please pass async_req=True
361
764
 
362
- >>> thread = api.match_and_search_with_http_info(match_and_search_request, async_req=True)
363
- >>> result = thread.get()
765
+ @validate_call
766
+ def match_and_search_without_preload_content(
767
+ self,
768
+ match_and_search_request: MatchAndSearchRequest,
769
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
770
+ _request_timeout: Union[
771
+ None,
772
+ Annotated[StrictFloat, Field(gt=0)],
773
+ Tuple[
774
+ Annotated[StrictFloat, Field(gt=0)],
775
+ Annotated[StrictFloat, Field(gt=0)]
776
+ ]
777
+ ] = None,
778
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
779
+ _content_type: Optional[StrictStr] = None,
780
+ _headers: Optional[Dict[StrictStr, Any]] = None,
781
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
782
+ ) -> RESTResponseType:
783
+ """match and search (1:1 + 1:N)
784
+
785
+ To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out.
364
786
 
365
787
  :param match_and_search_request: (required)
366
788
  :type match_and_search_request: MatchAndSearchRequest
367
789
  :param x_request_id: Request header label.
368
790
  :type x_request_id: str
369
- :param async_req: Whether to execute the request asynchronously.
370
- :type async_req: bool, optional
371
- :param _return_http_data_only: response data without head status code
372
- and headers
373
- :type _return_http_data_only: bool, optional
374
- :param _preload_content: if False, the urllib3.HTTPResponse object will
375
- be returned without reading/decoding response
376
- data. Default is True.
377
- :type _preload_content: bool, optional
378
791
  :param _request_timeout: timeout setting for this request. If one
379
792
  number provided, it will be total request
380
793
  timeout. It can also be a pair (tuple) of
381
794
  (connection, read) timeouts.
795
+ :type _request_timeout: int, tuple(int, int), optional
382
796
  :param _request_auth: set to override the auth_settings for an a single
383
- request; this effectively ignores the authentication
384
- in the spec for a single request.
797
+ request; this effectively ignores the
798
+ authentication in the spec for a single request.
385
799
  :type _request_auth: dict, optional
800
+ :param _content_type: force content-type for the request.
801
+ :type _content_type: str, Optional
802
+ :param _headers: set to override the headers for a single
803
+ request; this effectively ignores the headers
804
+ in the spec for a single request.
805
+ :type _headers: dict, optional
806
+ :param _host_index: set to override the host_index for a single
807
+ request; this effectively ignores the host_index
808
+ in the spec for a single request.
809
+ :type _host_index: int, optional
386
810
  :return: Returns the result object.
387
- If the method is called asynchronously,
388
- returns the request thread.
389
- :rtype: tuple(MatchAndSearchResponse, status_code(int), headers(HTTPHeaderDict))
390
- """
811
+ """ # noqa: E501
812
+
813
+ _param = self._match_and_search_serialize(
814
+ match_and_search_request=match_and_search_request,
815
+ x_request_id=x_request_id,
816
+ _request_auth=_request_auth,
817
+ _content_type=_content_type,
818
+ _headers=_headers,
819
+ _host_index=_host_index
820
+ )
391
821
 
392
- local_var_params = locals()
822
+ _response_types_map: Dict[str, Optional[str]] = {
823
+ '200': "MatchAndSearchResponse",
824
+ '403': None,
825
+ }
826
+ response_data = self.api_client.call_api(
827
+ *_param,
828
+ _request_timeout=_request_timeout
829
+ )
830
+ return response_data.response
831
+
832
+
833
+ def _match_and_search_serialize(
834
+ self,
835
+ match_and_search_request,
836
+ x_request_id,
837
+ _request_auth,
838
+ _content_type,
839
+ _headers,
840
+ _host_index,
841
+ ) -> RequestSerialized:
842
+
843
+ _host = None
844
+
845
+ _collection_formats: Dict[str, str] = {
846
+ }
847
+
848
+ _path_params: Dict[str, str] = {}
849
+ _query_params: List[Tuple[str, str]] = []
850
+ _header_params: Dict[str, Optional[str]] = _headers or {}
851
+ _form_params: List[Tuple[str, str]] = []
852
+ _files: Dict[
853
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
854
+ ] = {}
855
+ _body_params: Optional[bytes] = None
856
+
857
+ # process the path parameters
858
+ # process the query parameters
859
+ # process the header parameters
860
+ if x_request_id is not None:
861
+ _header_params['X-RequestID'] = x_request_id
862
+ # process the form parameters
863
+ # process the body parameter
864
+ if match_and_search_request is not None:
865
+ _body_params = match_and_search_request
866
+
867
+
868
+ # set the HTTP header `Accept`
869
+ if 'Accept' not in _header_params:
870
+ _header_params['Accept'] = self.api_client.select_header_accept(
871
+ [
872
+ 'application/json'
873
+ ]
874
+ )
875
+
876
+ # set the HTTP header `Content-Type`
877
+ if _content_type:
878
+ _header_params['Content-Type'] = _content_type
879
+ else:
880
+ _default_content_type = (
881
+ self.api_client.select_header_content_type(
882
+ [
883
+ 'application/json'
884
+ ]
885
+ )
886
+ )
887
+ if _default_content_type is not None:
888
+ _header_params['Content-Type'] = _default_content_type
393
889
 
394
- all_params = [
395
- 'match_and_search_request',
396
- 'x_request_id',
890
+ # authentication setting
891
+ _auth_settings: List[str] = [
397
892
  ]
398
- all_params.extend(
399
- [
400
- 'async_req',
401
- '_return_http_data_only',
402
- '_preload_content',
403
- '_request_timeout',
404
- '_request_auth'
405
- ]
893
+
894
+ return self.api_client.param_serialize(
895
+ method='POST',
896
+ resource_path='/api/match_and_search',
897
+ path_params=_path_params,
898
+ query_params=_query_params,
899
+ header_params=_header_params,
900
+ body=_body_params,
901
+ post_params=_form_params,
902
+ files=_files,
903
+ auth_settings=_auth_settings,
904
+ collection_formats=_collection_formats,
905
+ _host=_host,
906
+ _request_auth=_request_auth
406
907
  )
407
908
 
408
- for key, val in six.iteritems(local_var_params['kwargs']):
409
- if key not in all_params:
410
- raise ApiTypeError(
411
- "Got an unexpected keyword argument '%s'"
412
- " to method match_and_search" % key
413
- )
414
- local_var_params[key] = val
415
- del local_var_params['kwargs']
416
- # verify the required parameter 'match_and_search_request' is set
417
- if self.api_client.client_side_validation and ('match_and_search_request' not in local_var_params or # noqa: E501
418
- local_var_params['match_and_search_request'] is None): # noqa: E501
419
- raise ApiValueError("Missing the required parameter `match_and_search_request` when calling `match_and_search`") # noqa: E501
420
-
421
- collection_formats = {}
422
-
423
- path_params = {}
424
-
425
- query_params = []
426
-
427
- header_params = {}
428
- if 'x_request_id' in local_var_params:
429
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
430
-
431
- form_params = []
432
- local_var_files = {}
433
-
434
- body_params = None
435
- if 'match_and_search_request' in local_var_params:
436
- body_params = local_var_params['match_and_search_request']
437
- # HTTP header `Accept`
438
- header_params['Accept'] = self.api_client.select_header_accept(
439
- ['application/json']) # noqa: E501
440
-
441
- # HTTP header `Content-Type`
442
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
443
- ['application/json']) # noqa: E501
444
-
445
- # Authentication setting
446
- auth_settings = [] # noqa: E501
447
-
448
- return self.api_client.call_api(
449
- '/api/match_and_search', 'POST',
450
- path_params,
451
- query_params,
452
- header_params,
453
- body=body_params,
454
- post_params=form_params,
455
- files=local_var_files,
456
- response_type='MatchAndSearchResponse', # noqa: E501
457
- auth_settings=auth_settings,
458
- async_req=local_var_params.get('async_req'),
459
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
460
- _preload_content=local_var_params.get('_preload_content', True),
461
- _request_timeout=local_var_params.get('_request_timeout'),
462
- collection_formats=collection_formats,
463
- _request_auth=local_var_params.get('_request_auth'))
909
+