huaweicloudsdkimagesearch 3.1.183__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 (43) hide show
  1. huaweicloudsdkimagesearch/__init__.py +0 -0
  2. huaweicloudsdkimagesearch/v2/__init__.py +40 -0
  3. huaweicloudsdkimagesearch/v2/imagesearch_async_client.py +418 -0
  4. huaweicloudsdkimagesearch/v2/imagesearch_client.py +415 -0
  5. huaweicloudsdkimagesearch/v2/model/__init__.py +37 -0
  6. huaweicloudsdkimagesearch/v2/model/add_data_optional_param.py +195 -0
  7. huaweicloudsdkimagesearch/v2/model/add_data_param.py +335 -0
  8. huaweicloudsdkimagesearch/v2/model/add_data_rest_info.py +104 -0
  9. huaweicloudsdkimagesearch/v2/model/add_data_rest_info_image_info.py +108 -0
  10. huaweicloudsdkimagesearch/v2/model/add_data_rest_info_image_info_objects.py +166 -0
  11. huaweicloudsdkimagesearch/v2/model/check_info.py +162 -0
  12. huaweicloudsdkimagesearch/v2/model/check_param.py +220 -0
  13. huaweicloudsdkimagesearch/v2/model/check_rest_info.py +187 -0
  14. huaweicloudsdkimagesearch/v2/model/delete_info.py +137 -0
  15. huaweicloudsdkimagesearch/v2/model/delete_param.py +195 -0
  16. huaweicloudsdkimagesearch/v2/model/delete_rest_info.py +133 -0
  17. huaweicloudsdkimagesearch/v2/model/delete_rest_info_items.py +108 -0
  18. huaweicloudsdkimagesearch/v2/model/item_source.py +195 -0
  19. huaweicloudsdkimagesearch/v2/model/range_param.py +137 -0
  20. huaweicloudsdkimagesearch/v2/model/run_add_data_request.py +132 -0
  21. huaweicloudsdkimagesearch/v2/model/run_add_data_response.py +137 -0
  22. huaweicloudsdkimagesearch/v2/model/run_check_data_request.py +132 -0
  23. huaweicloudsdkimagesearch/v2/model/run_check_data_response.py +137 -0
  24. huaweicloudsdkimagesearch/v2/model/run_delete_data_request.py +132 -0
  25. huaweicloudsdkimagesearch/v2/model/run_delete_data_response.py +137 -0
  26. huaweicloudsdkimagesearch/v2/model/run_search_request.py +132 -0
  27. huaweicloudsdkimagesearch/v2/model/run_search_response.py +137 -0
  28. huaweicloudsdkimagesearch/v2/model/run_update_data_request.py +132 -0
  29. huaweicloudsdkimagesearch/v2/model/run_update_data_response.py +112 -0
  30. huaweicloudsdkimagesearch/v2/model/search_after_param.py +137 -0
  31. huaweicloudsdkimagesearch/v2/model/search_info.py +191 -0
  32. huaweicloudsdkimagesearch/v2/model/search_item.py +162 -0
  33. huaweicloudsdkimagesearch/v2/model/search_optional_param.py +311 -0
  34. huaweicloudsdkimagesearch/v2/model/search_param.py +418 -0
  35. huaweicloudsdkimagesearch/v2/model/search_rest_info.py +158 -0
  36. huaweicloudsdkimagesearch/v2/model/search_rest_info_image_info.py +195 -0
  37. huaweicloudsdkimagesearch/v2/model/update_param.py +194 -0
  38. huaweicloudsdkimagesearch/v2/region/__init__.py +0 -0
  39. huaweicloudsdkimagesearch/v2/region/imagesearch_region.py +32 -0
  40. huaweicloudsdkimagesearch-3.1.183.dist-info/METADATA +25 -0
  41. huaweicloudsdkimagesearch-3.1.183.dist-info/RECORD +43 -0
  42. huaweicloudsdkimagesearch-3.1.183.dist-info/WHEEL +4 -0
  43. huaweicloudsdkimagesearch-3.1.183.dist-info/licenses/LICENSE +13 -0
@@ -0,0 +1,415 @@
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 'huaweicloudsdkimagesearch'")
16
+
17
+
18
+ class ImageSearchClient(Client):
19
+ def __init__(self):
20
+ super().__init__()
21
+ self.model_package = importlib.import_module("huaweicloudsdkimagesearch.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__ != "ImageSearchClient":
29
+ raise TypeError("client type error, support client type is ImageSearchClient")
30
+ client_builder = ClientBuilder(clazz)
31
+
32
+
33
+
34
+ return client_builder
35
+
36
+ def run_add_data(self, request):
37
+ r"""添加数据
38
+
39
+ 添加数据到指定服务实例中。
40
+
41
+ Please refer to HUAWEI cloud API Explorer for details.
42
+
43
+ :param request: Request instance for RunAddData
44
+ :type request: :class:`huaweicloudsdkimagesearch.v2.RunAddDataRequest`
45
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.RunAddDataResponse`
46
+ """
47
+ http_info = self._run_add_data_http_info(request)
48
+ return self._call_api(**http_info)
49
+
50
+ def run_add_data_invoker(self, request):
51
+ http_info = self._run_add_data_http_info(request)
52
+ return SyncInvoker(self, http_info)
53
+
54
+ @classmethod
55
+ def _run_add_data_http_info(cls, request):
56
+ http_info = {
57
+ "method": "POST",
58
+ "resource_path": "/v2/{project_id}/mms/{service_name}/data/add",
59
+ "request_type": request.__class__.__name__,
60
+ "response_type": "RunAddDataResponse"
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
+ if 'service_name' in local_var_params:
71
+ path_params['service_name'] = local_var_params['service_name']
72
+
73
+ query_params = []
74
+
75
+ header_params = {}
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 = []
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 run_check_data(self, request):
104
+ r"""检查数据
105
+
106
+ 检查指定服务实例中的对应数据,支持指定ID检查和条件检查。
107
+
108
+ Please refer to HUAWEI cloud API Explorer for details.
109
+
110
+ :param request: Request instance for RunCheckData
111
+ :type request: :class:`huaweicloudsdkimagesearch.v2.RunCheckDataRequest`
112
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.RunCheckDataResponse`
113
+ """
114
+ http_info = self._run_check_data_http_info(request)
115
+ return self._call_api(**http_info)
116
+
117
+ def run_check_data_invoker(self, request):
118
+ http_info = self._run_check_data_http_info(request)
119
+ return SyncInvoker(self, http_info)
120
+
121
+ @classmethod
122
+ def _run_check_data_http_info(cls, request):
123
+ http_info = {
124
+ "method": "POST",
125
+ "resource_path": "/v2/{project_id}/mms/{service_name}/data/check",
126
+ "request_type": request.__class__.__name__,
127
+ "response_type": "RunCheckDataResponse"
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
+ if 'service_name' in local_var_params:
138
+ path_params['service_name'] = local_var_params['service_name']
139
+
140
+ query_params = []
141
+
142
+ header_params = {}
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 = []
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 run_delete_data(self, request):
171
+ r"""删除数据
172
+
173
+ 删除指定服务实例中的对应数据,支持指定ID删除和条件删除。
174
+
175
+ Please refer to HUAWEI cloud API Explorer for details.
176
+
177
+ :param request: Request instance for RunDeleteData
178
+ :type request: :class:`huaweicloudsdkimagesearch.v2.RunDeleteDataRequest`
179
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.RunDeleteDataResponse`
180
+ """
181
+ http_info = self._run_delete_data_http_info(request)
182
+ return self._call_api(**http_info)
183
+
184
+ def run_delete_data_invoker(self, request):
185
+ http_info = self._run_delete_data_http_info(request)
186
+ return SyncInvoker(self, http_info)
187
+
188
+ @classmethod
189
+ def _run_delete_data_http_info(cls, request):
190
+ http_info = {
191
+ "method": "POST",
192
+ "resource_path": "/v2/{project_id}/mms/{service_name}/data/delete",
193
+ "request_type": request.__class__.__name__,
194
+ "response_type": "RunDeleteDataResponse"
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
+ if 'service_name' in local_var_params:
205
+ path_params['service_name'] = local_var_params['service_name']
206
+
207
+ query_params = []
208
+
209
+ header_params = {}
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 = []
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 run_search(self, request):
238
+ r"""搜索
239
+
240
+ 从指定服务实例中进行搜索。
241
+
242
+ Please refer to HUAWEI cloud API Explorer for details.
243
+
244
+ :param request: Request instance for RunSearch
245
+ :type request: :class:`huaweicloudsdkimagesearch.v2.RunSearchRequest`
246
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.RunSearchResponse`
247
+ """
248
+ http_info = self._run_search_http_info(request)
249
+ return self._call_api(**http_info)
250
+
251
+ def run_search_invoker(self, request):
252
+ http_info = self._run_search_http_info(request)
253
+ return SyncInvoker(self, http_info)
254
+
255
+ @classmethod
256
+ def _run_search_http_info(cls, request):
257
+ http_info = {
258
+ "method": "POST",
259
+ "resource_path": "/v2/{project_id}/mms/{service_name}/search",
260
+ "request_type": request.__class__.__name__,
261
+ "response_type": "RunSearchResponse"
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
+ if 'service_name' in local_var_params:
272
+ path_params['service_name'] = local_var_params['service_name']
273
+
274
+ query_params = []
275
+
276
+ header_params = {}
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 = []
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 run_update_data(self, request):
305
+ r"""更新数据
306
+
307
+ 更新指定服务实例中的对应数据。
308
+
309
+ Please refer to HUAWEI cloud API Explorer for details.
310
+
311
+ :param request: Request instance for RunUpdateData
312
+ :type request: :class:`huaweicloudsdkimagesearch.v2.RunUpdateDataRequest`
313
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.RunUpdateDataResponse`
314
+ """
315
+ http_info = self._run_update_data_http_info(request)
316
+ return self._call_api(**http_info)
317
+
318
+ def run_update_data_invoker(self, request):
319
+ http_info = self._run_update_data_http_info(request)
320
+ return SyncInvoker(self, http_info)
321
+
322
+ @classmethod
323
+ def _run_update_data_http_info(cls, request):
324
+ http_info = {
325
+ "method": "POST",
326
+ "resource_path": "/v2/{project_id}/mms/{service_name}/data/update",
327
+ "request_type": request.__class__.__name__,
328
+ "response_type": "RunUpdateDataResponse"
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
+ if 'service_name' in local_var_params:
339
+ path_params['service_name'] = local_var_params['service_name']
340
+
341
+ query_params = []
342
+
343
+ header_params = {}
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 = []
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 _call_api(self, **kwargs):
372
+ try:
373
+ return self.do_http_request(**kwargs)
374
+ except TypeError:
375
+ import inspect
376
+ params = inspect.signature(self.do_http_request).parameters
377
+ http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
378
+ return self.do_http_request(**http_info)
379
+
380
+ def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
381
+ post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
382
+ collection_formats=None, request_type=None):
383
+ """Makes the HTTP request and returns deserialized data.
384
+
385
+ :param resource_path: Path to method endpoint.
386
+ :param method: Method to call.
387
+ :param path_params: Path parameters in the url.
388
+ :param query_params: Query parameters in the url.
389
+ :param header_params: Header parameters to be placed in the request header.
390
+ :param body: Request body.
391
+ :param post_params: Request post form parameters,
392
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
393
+ :param cname: Used for obs endpoint.
394
+ :param auth_settings: Auth Settings names for the request.
395
+ :param response_type: Response data type.
396
+ :param response_headers: Header should be added to response data.
397
+ :param collection_formats: dict of collection formats for path, query,
398
+ header, and post parameters.
399
+ :param request_type: Request data type.
400
+ :return:
401
+ Return the response directly.
402
+ """
403
+ return self.do_http_request(
404
+ method=method,
405
+ resource_path=resource_path,
406
+ path_params=path_params,
407
+ query_params=query_params,
408
+ header_params=header_params,
409
+ body=body,
410
+ post_params=post_params,
411
+ cname=cname,
412
+ response_type=response_type,
413
+ response_headers=response_headers,
414
+ collection_formats=collection_formats,
415
+ request_type=request_type)
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ from __future__ import absolute_import
4
+
5
+ # import models into model package
6
+ from huaweicloudsdkimagesearch.v2.model.add_data_optional_param import AddDataOptionalParam
7
+ from huaweicloudsdkimagesearch.v2.model.add_data_param import AddDataParam
8
+ from huaweicloudsdkimagesearch.v2.model.add_data_rest_info import AddDataRestInfo
9
+ from huaweicloudsdkimagesearch.v2.model.add_data_rest_info_image_info import AddDataRestInfoImageInfo
10
+ from huaweicloudsdkimagesearch.v2.model.add_data_rest_info_image_info_objects import AddDataRestInfoImageInfoObjects
11
+ from huaweicloudsdkimagesearch.v2.model.check_info import CheckInfo
12
+ from huaweicloudsdkimagesearch.v2.model.check_param import CheckParam
13
+ from huaweicloudsdkimagesearch.v2.model.check_rest_info import CheckRestInfo
14
+ from huaweicloudsdkimagesearch.v2.model.delete_info import DeleteInfo
15
+ from huaweicloudsdkimagesearch.v2.model.delete_param import DeleteParam
16
+ from huaweicloudsdkimagesearch.v2.model.delete_rest_info import DeleteRestInfo
17
+ from huaweicloudsdkimagesearch.v2.model.delete_rest_info_items import DeleteRestInfoItems
18
+ from huaweicloudsdkimagesearch.v2.model.item_source import ItemSource
19
+ from huaweicloudsdkimagesearch.v2.model.range_param import RangeParam
20
+ from huaweicloudsdkimagesearch.v2.model.run_add_data_request import RunAddDataRequest
21
+ from huaweicloudsdkimagesearch.v2.model.run_add_data_response import RunAddDataResponse
22
+ from huaweicloudsdkimagesearch.v2.model.run_check_data_request import RunCheckDataRequest
23
+ from huaweicloudsdkimagesearch.v2.model.run_check_data_response import RunCheckDataResponse
24
+ from huaweicloudsdkimagesearch.v2.model.run_delete_data_request import RunDeleteDataRequest
25
+ from huaweicloudsdkimagesearch.v2.model.run_delete_data_response import RunDeleteDataResponse
26
+ from huaweicloudsdkimagesearch.v2.model.run_search_request import RunSearchRequest
27
+ from huaweicloudsdkimagesearch.v2.model.run_search_response import RunSearchResponse
28
+ from huaweicloudsdkimagesearch.v2.model.run_update_data_request import RunUpdateDataRequest
29
+ from huaweicloudsdkimagesearch.v2.model.run_update_data_response import RunUpdateDataResponse
30
+ from huaweicloudsdkimagesearch.v2.model.search_after_param import SearchAfterParam
31
+ from huaweicloudsdkimagesearch.v2.model.search_info import SearchInfo
32
+ from huaweicloudsdkimagesearch.v2.model.search_item import SearchItem
33
+ from huaweicloudsdkimagesearch.v2.model.search_optional_param import SearchOptionalParam
34
+ from huaweicloudsdkimagesearch.v2.model.search_param import SearchParam
35
+ from huaweicloudsdkimagesearch.v2.model.search_rest_info import SearchRestInfo
36
+ from huaweicloudsdkimagesearch.v2.model.search_rest_info_image_info import SearchRestInfoImageInfo
37
+ from huaweicloudsdkimagesearch.v2.model.update_param import UpdateParam
@@ -0,0 +1,195 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class AddDataOptionalParam:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'do_det': 'bool',
19
+ 'box': 'str',
20
+ 'do_cls': 'bool',
21
+ 'category': 'int'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'do_det': 'do_det',
26
+ 'box': 'box',
27
+ 'do_cls': 'do_cls',
28
+ 'category': 'category'
29
+ }
30
+
31
+ def __init__(self, do_det=None, box=None, do_cls=None, category=None):
32
+ r"""AddDataOptionalParam
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param do_det: 是否进行目标检测,默认为true。
37
+ :type do_det: bool
38
+ :param box: 目标矩形框坐标,如给定则不进行目标检测,直接使用该box作为目标。格式为“x1,y1,x2,y2”(无空格),x1/y1为目标左上角坐标,x2/y2为目标右下角坐标,具体要求如下: - 0 <= x1 < x2 <= width,默认要求x2-x1 >= 15,具体可参考服务类型说明。 - 0 <= y1 < y2 <= height,默认要求y2-y1 >= 15,具体可参考服务类型说明。
39
+ :type box: str
40
+ :param do_cls: 是否进行对象分类,默认为true。
41
+ :type do_cls: bool
42
+ :param category: 对象类目,如给定则不进行对象分类,直接使用该category作为类目。具体类目信息可参见对应的服务类型说明。
43
+ :type category: int
44
+ """
45
+
46
+
47
+
48
+ self._do_det = None
49
+ self._box = None
50
+ self._do_cls = None
51
+ self._category = None
52
+ self.discriminator = None
53
+
54
+ if do_det is not None:
55
+ self.do_det = do_det
56
+ if box is not None:
57
+ self.box = box
58
+ if do_cls is not None:
59
+ self.do_cls = do_cls
60
+ if category is not None:
61
+ self.category = category
62
+
63
+ @property
64
+ def do_det(self):
65
+ r"""Gets the do_det of this AddDataOptionalParam.
66
+
67
+ 是否进行目标检测,默认为true。
68
+
69
+ :return: The do_det of this AddDataOptionalParam.
70
+ :rtype: bool
71
+ """
72
+ return self._do_det
73
+
74
+ @do_det.setter
75
+ def do_det(self, do_det):
76
+ r"""Sets the do_det of this AddDataOptionalParam.
77
+
78
+ 是否进行目标检测,默认为true。
79
+
80
+ :param do_det: The do_det of this AddDataOptionalParam.
81
+ :type do_det: bool
82
+ """
83
+ self._do_det = do_det
84
+
85
+ @property
86
+ def box(self):
87
+ r"""Gets the box of this AddDataOptionalParam.
88
+
89
+ 目标矩形框坐标,如给定则不进行目标检测,直接使用该box作为目标。格式为“x1,y1,x2,y2”(无空格),x1/y1为目标左上角坐标,x2/y2为目标右下角坐标,具体要求如下: - 0 <= x1 < x2 <= width,默认要求x2-x1 >= 15,具体可参考服务类型说明。 - 0 <= y1 < y2 <= height,默认要求y2-y1 >= 15,具体可参考服务类型说明。
90
+
91
+ :return: The box of this AddDataOptionalParam.
92
+ :rtype: str
93
+ """
94
+ return self._box
95
+
96
+ @box.setter
97
+ def box(self, box):
98
+ r"""Sets the box of this AddDataOptionalParam.
99
+
100
+ 目标矩形框坐标,如给定则不进行目标检测,直接使用该box作为目标。格式为“x1,y1,x2,y2”(无空格),x1/y1为目标左上角坐标,x2/y2为目标右下角坐标,具体要求如下: - 0 <= x1 < x2 <= width,默认要求x2-x1 >= 15,具体可参考服务类型说明。 - 0 <= y1 < y2 <= height,默认要求y2-y1 >= 15,具体可参考服务类型说明。
101
+
102
+ :param box: The box of this AddDataOptionalParam.
103
+ :type box: str
104
+ """
105
+ self._box = box
106
+
107
+ @property
108
+ def do_cls(self):
109
+ r"""Gets the do_cls of this AddDataOptionalParam.
110
+
111
+ 是否进行对象分类,默认为true。
112
+
113
+ :return: The do_cls of this AddDataOptionalParam.
114
+ :rtype: bool
115
+ """
116
+ return self._do_cls
117
+
118
+ @do_cls.setter
119
+ def do_cls(self, do_cls):
120
+ r"""Sets the do_cls of this AddDataOptionalParam.
121
+
122
+ 是否进行对象分类,默认为true。
123
+
124
+ :param do_cls: The do_cls of this AddDataOptionalParam.
125
+ :type do_cls: bool
126
+ """
127
+ self._do_cls = do_cls
128
+
129
+ @property
130
+ def category(self):
131
+ r"""Gets the category of this AddDataOptionalParam.
132
+
133
+ 对象类目,如给定则不进行对象分类,直接使用该category作为类目。具体类目信息可参见对应的服务类型说明。
134
+
135
+ :return: The category of this AddDataOptionalParam.
136
+ :rtype: int
137
+ """
138
+ return self._category
139
+
140
+ @category.setter
141
+ def category(self, category):
142
+ r"""Sets the category of this AddDataOptionalParam.
143
+
144
+ 对象类目,如给定则不进行对象分类,直接使用该category作为类目。具体类目信息可参见对应的服务类型说明。
145
+
146
+ :param category: The category of this AddDataOptionalParam.
147
+ :type category: int
148
+ """
149
+ self._category = category
150
+
151
+ def to_dict(self):
152
+ result = {}
153
+
154
+ for attr, _ in self.openapi_types.items():
155
+ value = getattr(self, attr)
156
+ if isinstance(value, list):
157
+ result[attr] = list(map(
158
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
159
+ value
160
+ ))
161
+ elif hasattr(value, "to_dict"):
162
+ result[attr] = value.to_dict()
163
+ elif isinstance(value, dict):
164
+ result[attr] = dict(map(
165
+ lambda item: (item[0], item[1].to_dict())
166
+ if hasattr(item[1], "to_dict") else item,
167
+ value.items()
168
+ ))
169
+ else:
170
+ if attr in self.sensitive_list:
171
+ result[attr] = "****"
172
+ else:
173
+ result[attr] = value
174
+
175
+ return result
176
+
177
+ def to_str(self):
178
+ """Returns the string representation of the model"""
179
+ import simplejson as json
180
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
181
+
182
+ def __repr__(self):
183
+ """For `print`"""
184
+ return self.to_str()
185
+
186
+ def __eq__(self, other):
187
+ """Returns true if both objects are equal"""
188
+ if not isinstance(other, AddDataOptionalParam):
189
+ return False
190
+
191
+ return self.__dict__ == other.__dict__
192
+
193
+ def __ne__(self, other):
194
+ """Returns true if both objects are not equal"""
195
+ return not self == other