huaweicloudsdkivs 3.1.160__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 (58) hide show
  1. huaweicloudsdkivs/__init__.py +0 -0
  2. huaweicloudsdkivs/v2/__init__.py +54 -0
  3. huaweicloudsdkivs/v2/ivs_async_client.py +485 -0
  4. huaweicloudsdkivs/v2/ivs_client.py +482 -0
  5. huaweicloudsdkivs/v2/model/__init__.py +51 -0
  6. huaweicloudsdkivs/v2/model/actions_list.py +142 -0
  7. huaweicloudsdkivs/v2/model/detect_extention_by_id_card_image_request.py +140 -0
  8. huaweicloudsdkivs/v2/model/detect_extention_by_id_card_image_response.py +162 -0
  9. huaweicloudsdkivs/v2/model/detect_extention_by_name_and_id_request.py +140 -0
  10. huaweicloudsdkivs/v2/model/detect_extention_by_name_and_id_response.py +162 -0
  11. huaweicloudsdkivs/v2/model/detect_standard_by_id_card_image_request.py +140 -0
  12. huaweicloudsdkivs/v2/model/detect_standard_by_id_card_image_response.py +162 -0
  13. huaweicloudsdkivs/v2/model/detect_standard_by_name_and_id_request.py +140 -0
  14. huaweicloudsdkivs/v2/model/detect_standard_by_name_and_id_response.py +162 -0
  15. huaweicloudsdkivs/v2/model/detect_standard_by_video_and_id_card_image_request.py +140 -0
  16. huaweicloudsdkivs/v2/model/detect_standard_by_video_and_id_card_image_response.py +162 -0
  17. huaweicloudsdkivs/v2/model/detect_standard_by_video_and_name_and_id_request.py +140 -0
  18. huaweicloudsdkivs/v2/model/detect_standard_by_video_and_name_and_id_response.py +162 -0
  19. huaweicloudsdkivs/v2/model/extention_req_data_by_id_card_image.py +143 -0
  20. huaweicloudsdkivs/v2/model/extention_req_data_by_name_and_id.py +142 -0
  21. huaweicloudsdkivs/v2/model/extention_resp_data_by_id_card_image.py +198 -0
  22. huaweicloudsdkivs/v2/model/extention_resp_data_by_name_and_id.py +173 -0
  23. huaweicloudsdkivs/v2/model/idcard_result.py +341 -0
  24. huaweicloudsdkivs/v2/model/ivs_extention_by_id_card_image_request_body.py +134 -0
  25. huaweicloudsdkivs/v2/model/ivs_extention_by_id_card_image_request_body_data.py +115 -0
  26. huaweicloudsdkivs/v2/model/ivs_extention_by_id_card_image_response_body_result.py +173 -0
  27. huaweicloudsdkivs/v2/model/ivs_extention_by_name_and_id_request_body.py +134 -0
  28. huaweicloudsdkivs/v2/model/ivs_extention_by_name_and_id_request_body_data.py +115 -0
  29. huaweicloudsdkivs/v2/model/ivs_extention_by_name_and_id_response_body_result.py +173 -0
  30. huaweicloudsdkivs/v2/model/ivs_standard_by_id_card_image_request_body.py +134 -0
  31. huaweicloudsdkivs/v2/model/ivs_standard_by_id_card_image_request_body_data.py +115 -0
  32. huaweicloudsdkivs/v2/model/ivs_standard_by_id_card_image_response_body_result.py +170 -0
  33. huaweicloudsdkivs/v2/model/ivs_standard_by_name_and_id_request_body.py +134 -0
  34. huaweicloudsdkivs/v2/model/ivs_standard_by_name_and_id_request_body_data.py +115 -0
  35. huaweicloudsdkivs/v2/model/ivs_standard_by_name_and_id_response_body_result.py +170 -0
  36. huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_id_card_image_request_body.py +134 -0
  37. huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_id_card_image_request_body_data.py +115 -0
  38. huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_id_card_image_response_body_result.py +170 -0
  39. huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_name_and_id_request_body.py +134 -0
  40. huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_name_and_id_request_body_data.py +115 -0
  41. huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_name_and_id_response_body_result.py +170 -0
  42. huaweicloudsdkivs/v2/model/meta.py +115 -0
  43. huaweicloudsdkivs/v2/model/req_data_by_id_card_image.py +229 -0
  44. huaweicloudsdkivs/v2/model/req_data_by_video_and_id_card_image.py +257 -0
  45. huaweicloudsdkivs/v2/model/resp_data_by_id_card_image.py +222 -0
  46. huaweicloudsdkivs/v2/model/resp_data_by_video_and_id_card_image.py +246 -0
  47. huaweicloudsdkivs/v2/model/standard_req_data_by_name_and_id.py +228 -0
  48. huaweicloudsdkivs/v2/model/standard_req_data_by_video_and_name_and_id.py +256 -0
  49. huaweicloudsdkivs/v2/model/standard_resp_data_by_name_and_id.py +198 -0
  50. huaweicloudsdkivs/v2/model/standard_resp_data_by_video_and_name_and_id.py +222 -0
  51. huaweicloudsdkivs/v2/model/video_result.py +170 -0
  52. huaweicloudsdkivs/v2/region/__init__.py +0 -0
  53. huaweicloudsdkivs/v2/region/ivs_region.py +34 -0
  54. huaweicloudsdkivs-3.1.160.dist-info/LICENSE +13 -0
  55. huaweicloudsdkivs-3.1.160.dist-info/METADATA +26 -0
  56. huaweicloudsdkivs-3.1.160.dist-info/RECORD +58 -0
  57. huaweicloudsdkivs-3.1.160.dist-info/WHEEL +5 -0
  58. huaweicloudsdkivs-3.1.160.dist-info/top_level.txt +1 -0
File without changes
@@ -0,0 +1,54 @@
1
+ # coding: utf-8
2
+
3
+ from __future__ import absolute_import
4
+
5
+ from huaweicloudsdkivs.v2.ivs_client import IvsClient
6
+ from huaweicloudsdkivs.v2.ivs_async_client import IvsAsyncClient
7
+
8
+ from huaweicloudsdkivs.v2.model.actions_list import ActionsList
9
+ from huaweicloudsdkivs.v2.model.detect_extention_by_id_card_image_request import DetectExtentionByIdCardImageRequest
10
+ from huaweicloudsdkivs.v2.model.detect_extention_by_id_card_image_response import DetectExtentionByIdCardImageResponse
11
+ from huaweicloudsdkivs.v2.model.detect_extention_by_name_and_id_request import DetectExtentionByNameAndIdRequest
12
+ from huaweicloudsdkivs.v2.model.detect_extention_by_name_and_id_response import DetectExtentionByNameAndIdResponse
13
+ from huaweicloudsdkivs.v2.model.detect_standard_by_id_card_image_request import DetectStandardByIdCardImageRequest
14
+ from huaweicloudsdkivs.v2.model.detect_standard_by_id_card_image_response import DetectStandardByIdCardImageResponse
15
+ from huaweicloudsdkivs.v2.model.detect_standard_by_name_and_id_request import DetectStandardByNameAndIdRequest
16
+ from huaweicloudsdkivs.v2.model.detect_standard_by_name_and_id_response import DetectStandardByNameAndIdResponse
17
+ from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_id_card_image_request import DetectStandardByVideoAndIdCardImageRequest
18
+ from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_id_card_image_response import DetectStandardByVideoAndIdCardImageResponse
19
+ from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_name_and_id_request import DetectStandardByVideoAndNameAndIdRequest
20
+ from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_name_and_id_response import DetectStandardByVideoAndNameAndIdResponse
21
+ from huaweicloudsdkivs.v2.model.extention_req_data_by_id_card_image import ExtentionReqDataByIdCardImage
22
+ from huaweicloudsdkivs.v2.model.extention_req_data_by_name_and_id import ExtentionReqDataByNameAndId
23
+ from huaweicloudsdkivs.v2.model.extention_resp_data_by_id_card_image import ExtentionRespDataByIdCardImage
24
+ from huaweicloudsdkivs.v2.model.extention_resp_data_by_name_and_id import ExtentionRespDataByNameAndId
25
+ from huaweicloudsdkivs.v2.model.idcard_result import IdcardResult
26
+ from huaweicloudsdkivs.v2.model.ivs_extention_by_id_card_image_request_body import IvsExtentionByIdCardImageRequestBody
27
+ from huaweicloudsdkivs.v2.model.ivs_extention_by_id_card_image_request_body_data import IvsExtentionByIdCardImageRequestBodyData
28
+ from huaweicloudsdkivs.v2.model.ivs_extention_by_id_card_image_response_body_result import IvsExtentionByIdCardImageResponseBodyResult
29
+ from huaweicloudsdkivs.v2.model.ivs_extention_by_name_and_id_request_body import IvsExtentionByNameAndIdRequestBody
30
+ from huaweicloudsdkivs.v2.model.ivs_extention_by_name_and_id_request_body_data import IvsExtentionByNameAndIdRequestBodyData
31
+ from huaweicloudsdkivs.v2.model.ivs_extention_by_name_and_id_response_body_result import IvsExtentionByNameAndIdResponseBodyResult
32
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_id_card_image_request_body import IvsStandardByIdCardImageRequestBody
33
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_id_card_image_request_body_data import IvsStandardByIdCardImageRequestBodyData
34
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_id_card_image_response_body_result import IvsStandardByIdCardImageResponseBodyResult
35
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_name_and_id_request_body import IvsStandardByNameAndIdRequestBody
36
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_name_and_id_request_body_data import IvsStandardByNameAndIdRequestBodyData
37
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_name_and_id_response_body_result import IvsStandardByNameAndIdResponseBodyResult
38
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_id_card_image_request_body import IvsStandardByVideoAndIdCardImageRequestBody
39
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_id_card_image_request_body_data import IvsStandardByVideoAndIdCardImageRequestBodyData
40
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_id_card_image_response_body_result import IvsStandardByVideoAndIdCardImageResponseBodyResult
41
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_name_and_id_request_body import IvsStandardByVideoAndNameAndIdRequestBody
42
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_name_and_id_request_body_data import IvsStandardByVideoAndNameAndIdRequestBodyData
43
+ from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_name_and_id_response_body_result import IvsStandardByVideoAndNameAndIdResponseBodyResult
44
+ from huaweicloudsdkivs.v2.model.meta import Meta
45
+ from huaweicloudsdkivs.v2.model.req_data_by_id_card_image import ReqDataByIdCardImage
46
+ from huaweicloudsdkivs.v2.model.req_data_by_video_and_id_card_image import ReqDataByVideoAndIdCardImage
47
+ from huaweicloudsdkivs.v2.model.resp_data_by_id_card_image import RespDataByIdCardImage
48
+ from huaweicloudsdkivs.v2.model.resp_data_by_video_and_id_card_image import RespDataByVideoAndIdCardImage
49
+ from huaweicloudsdkivs.v2.model.standard_req_data_by_name_and_id import StandardReqDataByNameAndId
50
+ from huaweicloudsdkivs.v2.model.standard_req_data_by_video_and_name_and_id import StandardReqDataByVideoAndNameAndId
51
+ from huaweicloudsdkivs.v2.model.standard_resp_data_by_name_and_id import StandardRespDataByNameAndId
52
+ from huaweicloudsdkivs.v2.model.standard_resp_data_by_video_and_name_and_id import StandardRespDataByVideoAndNameAndId
53
+ from huaweicloudsdkivs.v2.model.video_result import VideoResult
54
+
@@ -0,0 +1,485 @@
1
+ # coding: utf-8
2
+
3
+ from __future__ import absolute_import
4
+
5
+ import importlib
6
+ import warnings
7
+
8
+ from huaweicloudsdkcore.client import Client, ClientBuilder
9
+ from huaweicloudsdkcore.utils import http_utils
10
+ from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
11
+
12
+ try:
13
+ from huaweicloudsdkcore.invoker.invoker import AsyncInvoker
14
+ except ImportError as e:
15
+ warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkivs'")
16
+
17
+
18
+ class IvsAsyncClient(Client):
19
+ def __init__(self):
20
+ super(IvsAsyncClient, self).__init__()
21
+ self.model_package = importlib.import_module("huaweicloudsdkivs.v2.model")
22
+
23
+ @classmethod
24
+ def new_builder(cls, clazz=None):
25
+ if not clazz:
26
+ client_builder = ClientBuilder(cls)
27
+ else:
28
+ if clazz.__name__ != "IvsAsyncClient":
29
+ raise TypeError("client type error, support client type is IvsAsyncClient")
30
+ client_builder = ClientBuilder(clazz)
31
+
32
+
33
+
34
+ return client_builder
35
+
36
+ def detect_extention_by_id_card_image_async(self, request):
37
+ r"""人证核身证件版(二要素)
38
+
39
+ 使用姓名、身份证号码二要素进行身份审核。身份验证时,传入的数据为身份证信息。提取身份证信息时,可以使用身份证正反面图片,也可以直接输入姓名、身份证号文本。
40
+
41
+ Please refer to HUAWEI cloud API Explorer for details.
42
+
43
+
44
+ :param request: Request instance for DetectExtentionByIdCardImage
45
+ :type request: :class:`huaweicloudsdkivs.v2.DetectExtentionByIdCardImageRequest`
46
+ :rtype: :class:`huaweicloudsdkivs.v2.DetectExtentionByIdCardImageResponse`
47
+ """
48
+ http_info = self._detect_extention_by_id_card_image_http_info(request)
49
+ return self._call_api(**http_info)
50
+
51
+ def detect_extention_by_id_card_image_async_invoker(self, request):
52
+ http_info = self._detect_extention_by_id_card_image_http_info(request)
53
+ return AsyncInvoker(self, http_info)
54
+
55
+ def _detect_extention_by_id_card_image_http_info(self, request):
56
+ http_info = {
57
+ "method": "POST",
58
+ "resource_path": "/v2.0/ivs-idcard-extention",
59
+ "request_type": request.__class__.__name__,
60
+ "response_type": "DetectExtentionByIdCardImageResponse"
61
+ }
62
+
63
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
64
+
65
+ cname = None
66
+
67
+ collection_formats = {}
68
+
69
+ path_params = {}
70
+
71
+ query_params = []
72
+
73
+ header_params = {}
74
+ if 'enterprise_project_id' in local_var_params:
75
+ header_params['Enterprise-Project-Id'] = local_var_params['enterprise_project_id']
76
+
77
+ form_params = {}
78
+
79
+ body = None
80
+ if 'body' in local_var_params:
81
+ body = local_var_params['body']
82
+ if isinstance(request, SdkStreamRequest):
83
+ body = request.get_file_stream()
84
+
85
+ response_headers = ["X-Request-Id", ]
86
+
87
+ header_params['Content-Type'] = http_utils.select_header_content_type(
88
+ ['application/json'])
89
+
90
+ auth_settings = []
91
+
92
+ http_info["cname"] = cname
93
+ http_info["collection_formats"] = collection_formats
94
+ http_info["path_params"] = path_params
95
+ http_info["query_params"] = query_params
96
+ http_info["header_params"] = header_params
97
+ http_info["post_params"] = form_params
98
+ http_info["body"] = body
99
+ http_info["response_headers"] = response_headers
100
+
101
+ return http_info
102
+
103
+ def detect_extention_by_name_and_id_async(self, request):
104
+ r"""人证核身证件版(二要素)
105
+
106
+ 使用姓名、身份证号码二要素进行身份审核。身份验证时,传入的数据为身份证信息。提取身份证信息时,可以使用身份证正反面图片,也可以直接输入姓名、身份证号文本。
107
+
108
+ Please refer to HUAWEI cloud API Explorer for details.
109
+
110
+
111
+ :param request: Request instance for DetectExtentionByNameAndId
112
+ :type request: :class:`huaweicloudsdkivs.v2.DetectExtentionByNameAndIdRequest`
113
+ :rtype: :class:`huaweicloudsdkivs.v2.DetectExtentionByNameAndIdResponse`
114
+ """
115
+ http_info = self._detect_extention_by_name_and_id_http_info(request)
116
+ return self._call_api(**http_info)
117
+
118
+ def detect_extention_by_name_and_id_async_invoker(self, request):
119
+ http_info = self._detect_extention_by_name_and_id_http_info(request)
120
+ return AsyncInvoker(self, http_info)
121
+
122
+ def _detect_extention_by_name_and_id_http_info(self, request):
123
+ http_info = {
124
+ "method": "POST",
125
+ "resource_path": "/v2.0/ivs-idcard-extention",
126
+ "request_type": request.__class__.__name__,
127
+ "response_type": "DetectExtentionByNameAndIdResponse"
128
+ }
129
+
130
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
131
+
132
+ cname = None
133
+
134
+ collection_formats = {}
135
+
136
+ path_params = {}
137
+
138
+ query_params = []
139
+
140
+ header_params = {}
141
+ if 'enterprise_project_id' in local_var_params:
142
+ header_params['Enterprise-Project-Id'] = local_var_params['enterprise_project_id']
143
+
144
+ form_params = {}
145
+
146
+ body = None
147
+ if 'body' in local_var_params:
148
+ body = local_var_params['body']
149
+ if isinstance(request, SdkStreamRequest):
150
+ body = request.get_file_stream()
151
+
152
+ response_headers = ["X-Request-Id", ]
153
+
154
+ header_params['Content-Type'] = http_utils.select_header_content_type(
155
+ ['application/json'])
156
+
157
+ auth_settings = []
158
+
159
+ http_info["cname"] = cname
160
+ http_info["collection_formats"] = collection_formats
161
+ http_info["path_params"] = path_params
162
+ http_info["query_params"] = query_params
163
+ http_info["header_params"] = header_params
164
+ http_info["post_params"] = form_params
165
+ http_info["body"] = body
166
+ http_info["response_headers"] = response_headers
167
+
168
+ return http_info
169
+
170
+ def detect_standard_by_id_card_image_async(self, request):
171
+ r"""人证核身标准版(三要素)
172
+
173
+ 使用身份证正反面图片提取姓名和身份证号码,与人脸图片进行三要素身份审核。
174
+
175
+ Please refer to HUAWEI cloud API Explorer for details.
176
+
177
+
178
+ :param request: Request instance for DetectStandardByIdCardImage
179
+ :type request: :class:`huaweicloudsdkivs.v2.DetectStandardByIdCardImageRequest`
180
+ :rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByIdCardImageResponse`
181
+ """
182
+ http_info = self._detect_standard_by_id_card_image_http_info(request)
183
+ return self._call_api(**http_info)
184
+
185
+ def detect_standard_by_id_card_image_async_invoker(self, request):
186
+ http_info = self._detect_standard_by_id_card_image_http_info(request)
187
+ return AsyncInvoker(self, http_info)
188
+
189
+ def _detect_standard_by_id_card_image_http_info(self, request):
190
+ http_info = {
191
+ "method": "POST",
192
+ "resource_path": "/v2.0/ivs-standard",
193
+ "request_type": request.__class__.__name__,
194
+ "response_type": "DetectStandardByIdCardImageResponse"
195
+ }
196
+
197
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
198
+
199
+ cname = None
200
+
201
+ collection_formats = {}
202
+
203
+ path_params = {}
204
+
205
+ query_params = []
206
+
207
+ header_params = {}
208
+ if 'enterprise_project_id' in local_var_params:
209
+ header_params['Enterprise-Project-Id'] = local_var_params['enterprise_project_id']
210
+
211
+ form_params = {}
212
+
213
+ body = None
214
+ if 'body' in local_var_params:
215
+ body = local_var_params['body']
216
+ if isinstance(request, SdkStreamRequest):
217
+ body = request.get_file_stream()
218
+
219
+ response_headers = ["X-Request-Id", ]
220
+
221
+ header_params['Content-Type'] = http_utils.select_header_content_type(
222
+ ['application/json'])
223
+
224
+ auth_settings = []
225
+
226
+ http_info["cname"] = cname
227
+ http_info["collection_formats"] = collection_formats
228
+ http_info["path_params"] = path_params
229
+ http_info["query_params"] = query_params
230
+ http_info["header_params"] = header_params
231
+ http_info["post_params"] = form_params
232
+ http_info["body"] = body
233
+ http_info["response_headers"] = response_headers
234
+
235
+ return http_info
236
+
237
+ def detect_standard_by_name_and_id_async(self, request):
238
+ r"""人证核身标准版(三要素)
239
+
240
+ 使用姓名、身份证号文本和人脸图片进行三要素身份审核。
241
+
242
+ Please refer to HUAWEI cloud API Explorer for details.
243
+
244
+
245
+ :param request: Request instance for DetectStandardByNameAndId
246
+ :type request: :class:`huaweicloudsdkivs.v2.DetectStandardByNameAndIdRequest`
247
+ :rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByNameAndIdResponse`
248
+ """
249
+ http_info = self._detect_standard_by_name_and_id_http_info(request)
250
+ return self._call_api(**http_info)
251
+
252
+ def detect_standard_by_name_and_id_async_invoker(self, request):
253
+ http_info = self._detect_standard_by_name_and_id_http_info(request)
254
+ return AsyncInvoker(self, http_info)
255
+
256
+ def _detect_standard_by_name_and_id_http_info(self, request):
257
+ http_info = {
258
+ "method": "POST",
259
+ "resource_path": "/v2.0/ivs-standard",
260
+ "request_type": request.__class__.__name__,
261
+ "response_type": "DetectStandardByNameAndIdResponse"
262
+ }
263
+
264
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
265
+
266
+ cname = None
267
+
268
+ collection_formats = {}
269
+
270
+ path_params = {}
271
+
272
+ query_params = []
273
+
274
+ header_params = {}
275
+ if 'enterprise_project_id' in local_var_params:
276
+ header_params['Enterprise-Project-Id'] = local_var_params['enterprise_project_id']
277
+
278
+ form_params = {}
279
+
280
+ body = None
281
+ if 'body' in local_var_params:
282
+ body = local_var_params['body']
283
+ if isinstance(request, SdkStreamRequest):
284
+ body = request.get_file_stream()
285
+
286
+ response_headers = ["X-Request-Id", ]
287
+
288
+ header_params['Content-Type'] = http_utils.select_header_content_type(
289
+ ['application/json'])
290
+
291
+ auth_settings = []
292
+
293
+ http_info["cname"] = cname
294
+ http_info["collection_formats"] = collection_formats
295
+ http_info["path_params"] = path_params
296
+ http_info["query_params"] = query_params
297
+ http_info["header_params"] = header_params
298
+ http_info["post_params"] = form_params
299
+ http_info["body"] = body
300
+ http_info["response_headers"] = response_headers
301
+
302
+ return http_info
303
+
304
+ def detect_standard_by_video_and_id_card_image_async(self, request):
305
+ r"""人证核身标准版(三要素)
306
+
307
+ 从身份证正反面图片中提取姓名和身份证号码,并对视频做活体检测后提取人脸图片,以此进行三要素身份审核。
308
+
309
+ Please refer to HUAWEI cloud API Explorer for details.
310
+
311
+
312
+ :param request: Request instance for DetectStandardByVideoAndIdCardImage
313
+ :type request: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndIdCardImageRequest`
314
+ :rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndIdCardImageResponse`
315
+ """
316
+ http_info = self._detect_standard_by_video_and_id_card_image_http_info(request)
317
+ return self._call_api(**http_info)
318
+
319
+ def detect_standard_by_video_and_id_card_image_async_invoker(self, request):
320
+ http_info = self._detect_standard_by_video_and_id_card_image_http_info(request)
321
+ return AsyncInvoker(self, http_info)
322
+
323
+ def _detect_standard_by_video_and_id_card_image_http_info(self, request):
324
+ http_info = {
325
+ "method": "POST",
326
+ "resource_path": "/v2.0/ivs-standard",
327
+ "request_type": request.__class__.__name__,
328
+ "response_type": "DetectStandardByVideoAndIdCardImageResponse"
329
+ }
330
+
331
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
332
+
333
+ cname = None
334
+
335
+ collection_formats = {}
336
+
337
+ path_params = {}
338
+
339
+ query_params = []
340
+
341
+ header_params = {}
342
+ if 'enterprise_project_id' in local_var_params:
343
+ header_params['Enterprise-Project-Id'] = local_var_params['enterprise_project_id']
344
+
345
+ form_params = {}
346
+
347
+ body = None
348
+ if 'body' in local_var_params:
349
+ body = local_var_params['body']
350
+ if isinstance(request, SdkStreamRequest):
351
+ body = request.get_file_stream()
352
+
353
+ response_headers = ["X-Request-Id", ]
354
+
355
+ header_params['Content-Type'] = http_utils.select_header_content_type(
356
+ ['application/json'])
357
+
358
+ auth_settings = []
359
+
360
+ http_info["cname"] = cname
361
+ http_info["collection_formats"] = collection_formats
362
+ http_info["path_params"] = path_params
363
+ http_info["query_params"] = query_params
364
+ http_info["header_params"] = header_params
365
+ http_info["post_params"] = form_params
366
+ http_info["body"] = body
367
+ http_info["response_headers"] = response_headers
368
+
369
+ return http_info
370
+
371
+ def detect_standard_by_video_and_name_and_id_async(self, request):
372
+ r"""人证核身标准版(三要素)
373
+
374
+ 使用姓名、身份证号文本,并对视频做活体检测后提取人脸图片,以此进行三要素身份审核。
375
+
376
+ Please refer to HUAWEI cloud API Explorer for details.
377
+
378
+
379
+ :param request: Request instance for DetectStandardByVideoAndNameAndId
380
+ :type request: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndNameAndIdRequest`
381
+ :rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndNameAndIdResponse`
382
+ """
383
+ http_info = self._detect_standard_by_video_and_name_and_id_http_info(request)
384
+ return self._call_api(**http_info)
385
+
386
+ def detect_standard_by_video_and_name_and_id_async_invoker(self, request):
387
+ http_info = self._detect_standard_by_video_and_name_and_id_http_info(request)
388
+ return AsyncInvoker(self, http_info)
389
+
390
+ def _detect_standard_by_video_and_name_and_id_http_info(self, request):
391
+ http_info = {
392
+ "method": "POST",
393
+ "resource_path": "/v2.0/ivs-standard",
394
+ "request_type": request.__class__.__name__,
395
+ "response_type": "DetectStandardByVideoAndNameAndIdResponse"
396
+ }
397
+
398
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
399
+
400
+ cname = None
401
+
402
+ collection_formats = {}
403
+
404
+ path_params = {}
405
+
406
+ query_params = []
407
+
408
+ header_params = {}
409
+ if 'enterprise_project_id' in local_var_params:
410
+ header_params['Enterprise-Project-Id'] = local_var_params['enterprise_project_id']
411
+
412
+ form_params = {}
413
+
414
+ body = None
415
+ if 'body' in local_var_params:
416
+ body = local_var_params['body']
417
+ if isinstance(request, SdkStreamRequest):
418
+ body = request.get_file_stream()
419
+
420
+ response_headers = ["X-Request-Id", ]
421
+
422
+ header_params['Content-Type'] = http_utils.select_header_content_type(
423
+ ['application/json'])
424
+
425
+ auth_settings = []
426
+
427
+ http_info["cname"] = cname
428
+ http_info["collection_formats"] = collection_formats
429
+ http_info["path_params"] = path_params
430
+ http_info["query_params"] = query_params
431
+ http_info["header_params"] = header_params
432
+ http_info["post_params"] = form_params
433
+ http_info["body"] = body
434
+ http_info["response_headers"] = response_headers
435
+
436
+ return http_info
437
+
438
+ def _call_api(self, **kwargs):
439
+ try:
440
+ kwargs["async_request"] = True
441
+ return self.do_http_request(**kwargs)
442
+ except TypeError:
443
+ import inspect
444
+ params = inspect.signature(self.do_http_request).parameters
445
+ http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
446
+ return self.do_http_request(**http_info)
447
+
448
+ def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
449
+ post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
450
+ collection_formats=None, request_type=None):
451
+ """Makes the HTTP request and returns deserialized data.
452
+
453
+ :param resource_path: Path to method endpoint.
454
+ :param method: Method to call.
455
+ :param path_params: Path parameters in the url.
456
+ :param query_params: Query parameters in the url.
457
+ :param header_params: Header parameters to be
458
+ placed in the request header.
459
+ :param body: Request body.
460
+ :param post_params: Request post form parameters,
461
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
462
+ :param cname: Used for obs endpoint.
463
+ :param auth_settings: Auth Settings names for the request.
464
+ :param response_type: Response data type.
465
+ :param response_headers: Header should be added to response data.
466
+ :param collection_formats: dict of collection formats for path, query,
467
+ header, and post parameters.
468
+ :param request_type: Request data type.
469
+ :return:
470
+ Return the response directly.
471
+ """
472
+ return self.do_http_request(
473
+ method=method,
474
+ resource_path=resource_path,
475
+ path_params=path_params,
476
+ query_params=query_params,
477
+ header_params=header_params,
478
+ body=body,
479
+ post_params=post_params,
480
+ cname=cname,
481
+ response_type=response_type,
482
+ response_headers=response_headers,
483
+ collection_formats=collection_formats,
484
+ request_type=request_type,
485
+ async_request=True)