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.
- huaweicloudsdkivs/__init__.py +0 -0
- huaweicloudsdkivs/v2/__init__.py +54 -0
- huaweicloudsdkivs/v2/ivs_async_client.py +485 -0
- huaweicloudsdkivs/v2/ivs_client.py +482 -0
- huaweicloudsdkivs/v2/model/__init__.py +51 -0
- huaweicloudsdkivs/v2/model/actions_list.py +142 -0
- huaweicloudsdkivs/v2/model/detect_extention_by_id_card_image_request.py +140 -0
- huaweicloudsdkivs/v2/model/detect_extention_by_id_card_image_response.py +162 -0
- huaweicloudsdkivs/v2/model/detect_extention_by_name_and_id_request.py +140 -0
- huaweicloudsdkivs/v2/model/detect_extention_by_name_and_id_response.py +162 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_id_card_image_request.py +140 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_id_card_image_response.py +162 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_name_and_id_request.py +140 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_name_and_id_response.py +162 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_video_and_id_card_image_request.py +140 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_video_and_id_card_image_response.py +162 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_video_and_name_and_id_request.py +140 -0
- huaweicloudsdkivs/v2/model/detect_standard_by_video_and_name_and_id_response.py +162 -0
- huaweicloudsdkivs/v2/model/extention_req_data_by_id_card_image.py +143 -0
- huaweicloudsdkivs/v2/model/extention_req_data_by_name_and_id.py +142 -0
- huaweicloudsdkivs/v2/model/extention_resp_data_by_id_card_image.py +198 -0
- huaweicloudsdkivs/v2/model/extention_resp_data_by_name_and_id.py +173 -0
- huaweicloudsdkivs/v2/model/idcard_result.py +341 -0
- huaweicloudsdkivs/v2/model/ivs_extention_by_id_card_image_request_body.py +134 -0
- huaweicloudsdkivs/v2/model/ivs_extention_by_id_card_image_request_body_data.py +115 -0
- huaweicloudsdkivs/v2/model/ivs_extention_by_id_card_image_response_body_result.py +173 -0
- huaweicloudsdkivs/v2/model/ivs_extention_by_name_and_id_request_body.py +134 -0
- huaweicloudsdkivs/v2/model/ivs_extention_by_name_and_id_request_body_data.py +115 -0
- huaweicloudsdkivs/v2/model/ivs_extention_by_name_and_id_response_body_result.py +173 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_id_card_image_request_body.py +134 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_id_card_image_request_body_data.py +115 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_id_card_image_response_body_result.py +170 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_name_and_id_request_body.py +134 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_name_and_id_request_body_data.py +115 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_name_and_id_response_body_result.py +170 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_id_card_image_request_body.py +134 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_id_card_image_request_body_data.py +115 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_id_card_image_response_body_result.py +170 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_name_and_id_request_body.py +134 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_name_and_id_request_body_data.py +115 -0
- huaweicloudsdkivs/v2/model/ivs_standard_by_video_and_name_and_id_response_body_result.py +170 -0
- huaweicloudsdkivs/v2/model/meta.py +115 -0
- huaweicloudsdkivs/v2/model/req_data_by_id_card_image.py +229 -0
- huaweicloudsdkivs/v2/model/req_data_by_video_and_id_card_image.py +257 -0
- huaweicloudsdkivs/v2/model/resp_data_by_id_card_image.py +222 -0
- huaweicloudsdkivs/v2/model/resp_data_by_video_and_id_card_image.py +246 -0
- huaweicloudsdkivs/v2/model/standard_req_data_by_name_and_id.py +228 -0
- huaweicloudsdkivs/v2/model/standard_req_data_by_video_and_name_and_id.py +256 -0
- huaweicloudsdkivs/v2/model/standard_resp_data_by_name_and_id.py +198 -0
- huaweicloudsdkivs/v2/model/standard_resp_data_by_video_and_name_and_id.py +222 -0
- huaweicloudsdkivs/v2/model/video_result.py +170 -0
- huaweicloudsdkivs/v2/region/__init__.py +0 -0
- huaweicloudsdkivs/v2/region/ivs_region.py +34 -0
- huaweicloudsdkivs-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkivs-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkivs-3.1.160.dist-info/RECORD +58 -0
- huaweicloudsdkivs-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkivs-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,482 @@
|
|
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 SyncInvoker
|
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 IvsClient(Client):
|
19
|
+
def __init__(self):
|
20
|
+
super(IvsClient, 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__ != "IvsClient":
|
29
|
+
raise TypeError("client type error, support client type is IvsClient")
|
30
|
+
client_builder = ClientBuilder(clazz)
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
return client_builder
|
35
|
+
|
36
|
+
def detect_extention_by_id_card_image(self, request):
|
37
|
+
r"""人证核身证件版(二要素)
|
38
|
+
|
39
|
+
使用姓名、身份证号码二要素进行身份审核。身份验证时,传入的数据为身份证信息。提取身份证信息时,可以使用身份证正反面图片,也可以直接输入姓名、身份证号文本。
|
40
|
+
|
41
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
42
|
+
|
43
|
+
:param request: Request instance for DetectExtentionByIdCardImage
|
44
|
+
:type request: :class:`huaweicloudsdkivs.v2.DetectExtentionByIdCardImageRequest`
|
45
|
+
:rtype: :class:`huaweicloudsdkivs.v2.DetectExtentionByIdCardImageResponse`
|
46
|
+
"""
|
47
|
+
http_info = self._detect_extention_by_id_card_image_http_info(request)
|
48
|
+
return self._call_api(**http_info)
|
49
|
+
|
50
|
+
def detect_extention_by_id_card_image_invoker(self, request):
|
51
|
+
http_info = self._detect_extention_by_id_card_image_http_info(request)
|
52
|
+
return SyncInvoker(self, http_info)
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def _detect_extention_by_id_card_image_http_info(cls, 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(self, request):
|
104
|
+
r"""人证核身证件版(二要素)
|
105
|
+
|
106
|
+
使用姓名、身份证号码二要素进行身份审核。身份验证时,传入的数据为身份证信息。提取身份证信息时,可以使用身份证正反面图片,也可以直接输入姓名、身份证号文本。
|
107
|
+
|
108
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
109
|
+
|
110
|
+
:param request: Request instance for DetectExtentionByNameAndId
|
111
|
+
:type request: :class:`huaweicloudsdkivs.v2.DetectExtentionByNameAndIdRequest`
|
112
|
+
:rtype: :class:`huaweicloudsdkivs.v2.DetectExtentionByNameAndIdResponse`
|
113
|
+
"""
|
114
|
+
http_info = self._detect_extention_by_name_and_id_http_info(request)
|
115
|
+
return self._call_api(**http_info)
|
116
|
+
|
117
|
+
def detect_extention_by_name_and_id_invoker(self, request):
|
118
|
+
http_info = self._detect_extention_by_name_and_id_http_info(request)
|
119
|
+
return SyncInvoker(self, http_info)
|
120
|
+
|
121
|
+
@classmethod
|
122
|
+
def _detect_extention_by_name_and_id_http_info(cls, 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(self, request):
|
171
|
+
r"""人证核身标准版(三要素)
|
172
|
+
|
173
|
+
使用身份证正反面图片提取姓名和身份证号码,与人脸图片进行三要素身份审核。
|
174
|
+
|
175
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
176
|
+
|
177
|
+
:param request: Request instance for DetectStandardByIdCardImage
|
178
|
+
:type request: :class:`huaweicloudsdkivs.v2.DetectStandardByIdCardImageRequest`
|
179
|
+
:rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByIdCardImageResponse`
|
180
|
+
"""
|
181
|
+
http_info = self._detect_standard_by_id_card_image_http_info(request)
|
182
|
+
return self._call_api(**http_info)
|
183
|
+
|
184
|
+
def detect_standard_by_id_card_image_invoker(self, request):
|
185
|
+
http_info = self._detect_standard_by_id_card_image_http_info(request)
|
186
|
+
return SyncInvoker(self, http_info)
|
187
|
+
|
188
|
+
@classmethod
|
189
|
+
def _detect_standard_by_id_card_image_http_info(cls, 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(self, request):
|
238
|
+
r"""人证核身标准版(三要素)
|
239
|
+
|
240
|
+
使用姓名、身份证号文本和人脸图片进行三要素身份审核。
|
241
|
+
|
242
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
243
|
+
|
244
|
+
:param request: Request instance for DetectStandardByNameAndId
|
245
|
+
:type request: :class:`huaweicloudsdkivs.v2.DetectStandardByNameAndIdRequest`
|
246
|
+
:rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByNameAndIdResponse`
|
247
|
+
"""
|
248
|
+
http_info = self._detect_standard_by_name_and_id_http_info(request)
|
249
|
+
return self._call_api(**http_info)
|
250
|
+
|
251
|
+
def detect_standard_by_name_and_id_invoker(self, request):
|
252
|
+
http_info = self._detect_standard_by_name_and_id_http_info(request)
|
253
|
+
return SyncInvoker(self, http_info)
|
254
|
+
|
255
|
+
@classmethod
|
256
|
+
def _detect_standard_by_name_and_id_http_info(cls, 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(self, request):
|
305
|
+
r"""人证核身标准版(三要素)
|
306
|
+
|
307
|
+
从身份证正反面图片中提取姓名和身份证号码,并对视频做活体检测后提取人脸图片,以此进行三要素身份审核。
|
308
|
+
|
309
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
310
|
+
|
311
|
+
:param request: Request instance for DetectStandardByVideoAndIdCardImage
|
312
|
+
:type request: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndIdCardImageRequest`
|
313
|
+
:rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndIdCardImageResponse`
|
314
|
+
"""
|
315
|
+
http_info = self._detect_standard_by_video_and_id_card_image_http_info(request)
|
316
|
+
return self._call_api(**http_info)
|
317
|
+
|
318
|
+
def detect_standard_by_video_and_id_card_image_invoker(self, request):
|
319
|
+
http_info = self._detect_standard_by_video_and_id_card_image_http_info(request)
|
320
|
+
return SyncInvoker(self, http_info)
|
321
|
+
|
322
|
+
@classmethod
|
323
|
+
def _detect_standard_by_video_and_id_card_image_http_info(cls, 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(self, request):
|
372
|
+
r"""人证核身标准版(三要素)
|
373
|
+
|
374
|
+
使用姓名、身份证号文本,并对视频做活体检测后提取人脸图片,以此进行三要素身份审核。
|
375
|
+
|
376
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
377
|
+
|
378
|
+
:param request: Request instance for DetectStandardByVideoAndNameAndId
|
379
|
+
:type request: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndNameAndIdRequest`
|
380
|
+
:rtype: :class:`huaweicloudsdkivs.v2.DetectStandardByVideoAndNameAndIdResponse`
|
381
|
+
"""
|
382
|
+
http_info = self._detect_standard_by_video_and_name_and_id_http_info(request)
|
383
|
+
return self._call_api(**http_info)
|
384
|
+
|
385
|
+
def detect_standard_by_video_and_name_and_id_invoker(self, request):
|
386
|
+
http_info = self._detect_standard_by_video_and_name_and_id_http_info(request)
|
387
|
+
return SyncInvoker(self, http_info)
|
388
|
+
|
389
|
+
@classmethod
|
390
|
+
def _detect_standard_by_video_and_name_and_id_http_info(cls, 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
|
+
return self.do_http_request(**kwargs)
|
441
|
+
except TypeError:
|
442
|
+
import inspect
|
443
|
+
params = inspect.signature(self.do_http_request).parameters
|
444
|
+
http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
|
445
|
+
return self.do_http_request(**http_info)
|
446
|
+
|
447
|
+
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
448
|
+
post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
|
449
|
+
collection_formats=None, request_type=None):
|
450
|
+
"""Makes the HTTP request and returns deserialized data.
|
451
|
+
|
452
|
+
:param resource_path: Path to method endpoint.
|
453
|
+
:param method: Method to call.
|
454
|
+
:param path_params: Path parameters in the url.
|
455
|
+
:param query_params: Query parameters in the url.
|
456
|
+
:param header_params: Header parameters to be placed in the request header.
|
457
|
+
:param body: Request body.
|
458
|
+
:param post_params: Request post form parameters,
|
459
|
+
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
460
|
+
:param cname: Used for obs endpoint.
|
461
|
+
:param auth_settings: Auth Settings names for the request.
|
462
|
+
:param response_type: Response data type.
|
463
|
+
:param response_headers: Header should be added to response data.
|
464
|
+
:param collection_formats: dict of collection formats for path, query,
|
465
|
+
header, and post parameters.
|
466
|
+
:param request_type: Request data type.
|
467
|
+
:return:
|
468
|
+
Return the response directly.
|
469
|
+
"""
|
470
|
+
return self.do_http_request(
|
471
|
+
method=method,
|
472
|
+
resource_path=resource_path,
|
473
|
+
path_params=path_params,
|
474
|
+
query_params=query_params,
|
475
|
+
header_params=header_params,
|
476
|
+
body=body,
|
477
|
+
post_params=post_params,
|
478
|
+
cname=cname,
|
479
|
+
response_type=response_type,
|
480
|
+
response_headers=response_headers,
|
481
|
+
collection_formats=collection_formats,
|
482
|
+
request_type=request_type)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
from __future__ import absolute_import
|
4
|
+
|
5
|
+
# import models into model package
|
6
|
+
from huaweicloudsdkivs.v2.model.actions_list import ActionsList
|
7
|
+
from huaweicloudsdkivs.v2.model.detect_extention_by_id_card_image_request import DetectExtentionByIdCardImageRequest
|
8
|
+
from huaweicloudsdkivs.v2.model.detect_extention_by_id_card_image_response import DetectExtentionByIdCardImageResponse
|
9
|
+
from huaweicloudsdkivs.v2.model.detect_extention_by_name_and_id_request import DetectExtentionByNameAndIdRequest
|
10
|
+
from huaweicloudsdkivs.v2.model.detect_extention_by_name_and_id_response import DetectExtentionByNameAndIdResponse
|
11
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_id_card_image_request import DetectStandardByIdCardImageRequest
|
12
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_id_card_image_response import DetectStandardByIdCardImageResponse
|
13
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_name_and_id_request import DetectStandardByNameAndIdRequest
|
14
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_name_and_id_response import DetectStandardByNameAndIdResponse
|
15
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_id_card_image_request import DetectStandardByVideoAndIdCardImageRequest
|
16
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_id_card_image_response import DetectStandardByVideoAndIdCardImageResponse
|
17
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_name_and_id_request import DetectStandardByVideoAndNameAndIdRequest
|
18
|
+
from huaweicloudsdkivs.v2.model.detect_standard_by_video_and_name_and_id_response import DetectStandardByVideoAndNameAndIdResponse
|
19
|
+
from huaweicloudsdkivs.v2.model.extention_req_data_by_id_card_image import ExtentionReqDataByIdCardImage
|
20
|
+
from huaweicloudsdkivs.v2.model.extention_req_data_by_name_and_id import ExtentionReqDataByNameAndId
|
21
|
+
from huaweicloudsdkivs.v2.model.extention_resp_data_by_id_card_image import ExtentionRespDataByIdCardImage
|
22
|
+
from huaweicloudsdkivs.v2.model.extention_resp_data_by_name_and_id import ExtentionRespDataByNameAndId
|
23
|
+
from huaweicloudsdkivs.v2.model.idcard_result import IdcardResult
|
24
|
+
from huaweicloudsdkivs.v2.model.ivs_extention_by_id_card_image_request_body import IvsExtentionByIdCardImageRequestBody
|
25
|
+
from huaweicloudsdkivs.v2.model.ivs_extention_by_id_card_image_request_body_data import IvsExtentionByIdCardImageRequestBodyData
|
26
|
+
from huaweicloudsdkivs.v2.model.ivs_extention_by_id_card_image_response_body_result import IvsExtentionByIdCardImageResponseBodyResult
|
27
|
+
from huaweicloudsdkivs.v2.model.ivs_extention_by_name_and_id_request_body import IvsExtentionByNameAndIdRequestBody
|
28
|
+
from huaweicloudsdkivs.v2.model.ivs_extention_by_name_and_id_request_body_data import IvsExtentionByNameAndIdRequestBodyData
|
29
|
+
from huaweicloudsdkivs.v2.model.ivs_extention_by_name_and_id_response_body_result import IvsExtentionByNameAndIdResponseBodyResult
|
30
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_id_card_image_request_body import IvsStandardByIdCardImageRequestBody
|
31
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_id_card_image_request_body_data import IvsStandardByIdCardImageRequestBodyData
|
32
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_id_card_image_response_body_result import IvsStandardByIdCardImageResponseBodyResult
|
33
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_name_and_id_request_body import IvsStandardByNameAndIdRequestBody
|
34
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_name_and_id_request_body_data import IvsStandardByNameAndIdRequestBodyData
|
35
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_name_and_id_response_body_result import IvsStandardByNameAndIdResponseBodyResult
|
36
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_id_card_image_request_body import IvsStandardByVideoAndIdCardImageRequestBody
|
37
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_id_card_image_request_body_data import IvsStandardByVideoAndIdCardImageRequestBodyData
|
38
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_id_card_image_response_body_result import IvsStandardByVideoAndIdCardImageResponseBodyResult
|
39
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_name_and_id_request_body import IvsStandardByVideoAndNameAndIdRequestBody
|
40
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_name_and_id_request_body_data import IvsStandardByVideoAndNameAndIdRequestBodyData
|
41
|
+
from huaweicloudsdkivs.v2.model.ivs_standard_by_video_and_name_and_id_response_body_result import IvsStandardByVideoAndNameAndIdResponseBodyResult
|
42
|
+
from huaweicloudsdkivs.v2.model.meta import Meta
|
43
|
+
from huaweicloudsdkivs.v2.model.req_data_by_id_card_image import ReqDataByIdCardImage
|
44
|
+
from huaweicloudsdkivs.v2.model.req_data_by_video_and_id_card_image import ReqDataByVideoAndIdCardImage
|
45
|
+
from huaweicloudsdkivs.v2.model.resp_data_by_id_card_image import RespDataByIdCardImage
|
46
|
+
from huaweicloudsdkivs.v2.model.resp_data_by_video_and_id_card_image import RespDataByVideoAndIdCardImage
|
47
|
+
from huaweicloudsdkivs.v2.model.standard_req_data_by_name_and_id import StandardReqDataByNameAndId
|
48
|
+
from huaweicloudsdkivs.v2.model.standard_req_data_by_video_and_name_and_id import StandardReqDataByVideoAndNameAndId
|
49
|
+
from huaweicloudsdkivs.v2.model.standard_resp_data_by_name_and_id import StandardRespDataByNameAndId
|
50
|
+
from huaweicloudsdkivs.v2.model.standard_resp_data_by_video_and_name_and_id import StandardRespDataByVideoAndNameAndId
|
51
|
+
from huaweicloudsdkivs.v2.model.video_result import VideoResult
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ActionsList:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'confidence': 'float',
|
21
|
+
'action': 'int'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'confidence': 'confidence',
|
26
|
+
'action': 'action'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, confidence=None, action=None):
|
30
|
+
r"""ActionsList
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param confidence: 置信度,取值范围0~1。
|
35
|
+
:type confidence: float
|
36
|
+
:param action: 动作编号,取值范围:[1,2,3,4],其中: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
|
37
|
+
:type action: int
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._confidence = None
|
43
|
+
self._action = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.confidence = confidence
|
47
|
+
self.action = action
|
48
|
+
|
49
|
+
@property
|
50
|
+
def confidence(self):
|
51
|
+
r"""Gets the confidence of this ActionsList.
|
52
|
+
|
53
|
+
置信度,取值范围0~1。
|
54
|
+
|
55
|
+
:return: The confidence of this ActionsList.
|
56
|
+
:rtype: float
|
57
|
+
"""
|
58
|
+
return self._confidence
|
59
|
+
|
60
|
+
@confidence.setter
|
61
|
+
def confidence(self, confidence):
|
62
|
+
r"""Sets the confidence of this ActionsList.
|
63
|
+
|
64
|
+
置信度,取值范围0~1。
|
65
|
+
|
66
|
+
:param confidence: The confidence of this ActionsList.
|
67
|
+
:type confidence: float
|
68
|
+
"""
|
69
|
+
self._confidence = confidence
|
70
|
+
|
71
|
+
@property
|
72
|
+
def action(self):
|
73
|
+
r"""Gets the action of this ActionsList.
|
74
|
+
|
75
|
+
动作编号,取值范围:[1,2,3,4],其中: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
|
76
|
+
|
77
|
+
:return: The action of this ActionsList.
|
78
|
+
:rtype: int
|
79
|
+
"""
|
80
|
+
return self._action
|
81
|
+
|
82
|
+
@action.setter
|
83
|
+
def action(self, action):
|
84
|
+
r"""Sets the action of this ActionsList.
|
85
|
+
|
86
|
+
动作编号,取值范围:[1,2,3,4],其中: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
|
87
|
+
|
88
|
+
:param action: The action of this ActionsList.
|
89
|
+
:type action: int
|
90
|
+
"""
|
91
|
+
self._action = action
|
92
|
+
|
93
|
+
def to_dict(self):
|
94
|
+
"""Returns the model properties as a dict"""
|
95
|
+
result = {}
|
96
|
+
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
98
|
+
value = getattr(self, attr)
|
99
|
+
if isinstance(value, list):
|
100
|
+
result[attr] = list(map(
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
102
|
+
value
|
103
|
+
))
|
104
|
+
elif hasattr(value, "to_dict"):
|
105
|
+
result[attr] = value.to_dict()
|
106
|
+
elif isinstance(value, dict):
|
107
|
+
result[attr] = dict(map(
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
110
|
+
value.items()
|
111
|
+
))
|
112
|
+
else:
|
113
|
+
if attr in self.sensitive_list:
|
114
|
+
result[attr] = "****"
|
115
|
+
else:
|
116
|
+
result[attr] = value
|
117
|
+
|
118
|
+
return result
|
119
|
+
|
120
|
+
def to_str(self):
|
121
|
+
"""Returns the string representation of the model"""
|
122
|
+
import simplejson as json
|
123
|
+
if six.PY2:
|
124
|
+
import sys
|
125
|
+
reload(sys)
|
126
|
+
sys.setdefaultencoding("utf-8")
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
128
|
+
|
129
|
+
def __repr__(self):
|
130
|
+
"""For `print`"""
|
131
|
+
return self.to_str()
|
132
|
+
|
133
|
+
def __eq__(self, other):
|
134
|
+
"""Returns true if both objects are equal"""
|
135
|
+
if not isinstance(other, ActionsList):
|
136
|
+
return False
|
137
|
+
|
138
|
+
return self.__dict__ == other.__dict__
|
139
|
+
|
140
|
+
def __ne__(self, other):
|
141
|
+
"""Returns true if both objects are not equal"""
|
142
|
+
return not self == other
|