huaweicloudsdkimagesearch 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.

Potentially problematic release.


This version of huaweicloudsdkimagesearch might be problematic. Click here for more details.

Files changed (44) 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 +202 -0
  7. huaweicloudsdkimagesearch/v2/model/add_data_param.py +342 -0
  8. huaweicloudsdkimagesearch/v2/model/add_data_rest_info.py +111 -0
  9. huaweicloudsdkimagesearch/v2/model/add_data_rest_info_image_info.py +115 -0
  10. huaweicloudsdkimagesearch/v2/model/add_data_rest_info_image_info_objects.py +173 -0
  11. huaweicloudsdkimagesearch/v2/model/check_info.py +169 -0
  12. huaweicloudsdkimagesearch/v2/model/check_param.py +227 -0
  13. huaweicloudsdkimagesearch/v2/model/check_rest_info.py +194 -0
  14. huaweicloudsdkimagesearch/v2/model/delete_info.py +144 -0
  15. huaweicloudsdkimagesearch/v2/model/delete_param.py +202 -0
  16. huaweicloudsdkimagesearch/v2/model/delete_rest_info.py +140 -0
  17. huaweicloudsdkimagesearch/v2/model/delete_rest_info_items.py +115 -0
  18. huaweicloudsdkimagesearch/v2/model/item_source.py +202 -0
  19. huaweicloudsdkimagesearch/v2/model/range_param.py +144 -0
  20. huaweicloudsdkimagesearch/v2/model/run_add_data_request.py +139 -0
  21. huaweicloudsdkimagesearch/v2/model/run_add_data_response.py +141 -0
  22. huaweicloudsdkimagesearch/v2/model/run_check_data_request.py +139 -0
  23. huaweicloudsdkimagesearch/v2/model/run_check_data_response.py +141 -0
  24. huaweicloudsdkimagesearch/v2/model/run_delete_data_request.py +139 -0
  25. huaweicloudsdkimagesearch/v2/model/run_delete_data_response.py +141 -0
  26. huaweicloudsdkimagesearch/v2/model/run_search_request.py +139 -0
  27. huaweicloudsdkimagesearch/v2/model/run_search_response.py +141 -0
  28. huaweicloudsdkimagesearch/v2/model/run_update_data_request.py +139 -0
  29. huaweicloudsdkimagesearch/v2/model/run_update_data_response.py +116 -0
  30. huaweicloudsdkimagesearch/v2/model/search_after_param.py +144 -0
  31. huaweicloudsdkimagesearch/v2/model/search_info.py +198 -0
  32. huaweicloudsdkimagesearch/v2/model/search_item.py +169 -0
  33. huaweicloudsdkimagesearch/v2/model/search_optional_param.py +318 -0
  34. huaweicloudsdkimagesearch/v2/model/search_param.py +425 -0
  35. huaweicloudsdkimagesearch/v2/model/search_rest_info.py +165 -0
  36. huaweicloudsdkimagesearch/v2/model/search_rest_info_image_info.py +202 -0
  37. huaweicloudsdkimagesearch/v2/model/update_param.py +201 -0
  38. huaweicloudsdkimagesearch/v2/region/__init__.py +0 -0
  39. huaweicloudsdkimagesearch/v2/region/imagesearch_region.py +32 -0
  40. huaweicloudsdkimagesearch-3.1.160.dist-info/LICENSE +13 -0
  41. huaweicloudsdkimagesearch-3.1.160.dist-info/METADATA +26 -0
  42. huaweicloudsdkimagesearch-3.1.160.dist-info/RECORD +44 -0
  43. huaweicloudsdkimagesearch-3.1.160.dist-info/WHEEL +5 -0
  44. huaweicloudsdkimagesearch-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,342 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class AddDataParam:
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
+ 'force': 'bool',
21
+ 'item_id': 'str',
22
+ 'desc': 'str',
23
+ 'custom_tags': 'dict(str, str)',
24
+ 'custom_num_tags': 'dict(str, float)',
25
+ 'image_base64': 'str',
26
+ 'image_url': 'str',
27
+ 'keywords': 'list[str]',
28
+ 'optional_params': 'AddDataOptionalParam'
29
+ }
30
+
31
+ attribute_map = {
32
+ 'force': 'force',
33
+ 'item_id': 'item_id',
34
+ 'desc': 'desc',
35
+ 'custom_tags': 'custom_tags',
36
+ 'custom_num_tags': 'custom_num_tags',
37
+ 'image_base64': 'image_base64',
38
+ 'image_url': 'image_url',
39
+ 'keywords': 'keywords',
40
+ 'optional_params': 'optional_params'
41
+ }
42
+
43
+ def __init__(self, force=None, item_id=None, desc=None, custom_tags=None, custom_num_tags=None, image_base64=None, image_url=None, keywords=None, optional_params=None):
44
+ r"""AddDataParam
45
+
46
+ The model defined in huaweicloud sdk
47
+
48
+ :param force: 是否强制添加数据,默认为false。 - false: 数据已存在则不进行添加。 - true: 数据已存在仍然覆盖添加。
49
+ :type force: bool
50
+ :param item_id: 数据的服务实例级唯一标识,字符长度范围为[1, 256]。
51
+ :type item_id: str
52
+ :param desc: 数据的描述信息,字符长度范围为[1, 2048]。
53
+ :type desc: str
54
+ :param custom_tags: 数据的自定义字符标签,用于进行条件过滤。格式为键值对{key:value}。 - key: 必须为服务实例custom_tags中已存在的key,可在创建服务实例时进行配置,或在更新服务实例时进行新增。 - value: 类型为字符串,字符长度范围为[1, 64]。
55
+ :type custom_tags: dict(str, str)
56
+ :param custom_num_tags: 数据的自定义数值标签,用于进行条件过滤。格式为键值对{key:value}。 - key: 必须为服务实例custom_num_tags中已存在的key,可在创建服务实例时进行配置,或在更新服务实例时进行新增。 - value: 类型为数值,格式为double。
57
+ :type custom_num_tags: dict(str, float)
58
+ :param image_base64: 图像文件的base64字符串,图像入库时,与image_url二选一。要求如下: - 格式:目前仅支持JPEG/JPG/PNG/BMP/WEBP格式的图像。 - 大小:图像文件大小要求不超过5M。 - 尺寸:默认情况下,要求图像的最短边大于64px,最长边小于4096px。部分服务类型有特殊要求,可参见服务类型说明。 - 其他:图片中不能包含旋转信息。
59
+ :type image_base64: str
60
+ :param image_url: 图像文件的服务可访问URL,字符长度范围为[1, 4096]。图像入库时,与image_base64二选一。
61
+ :type image_url: str
62
+ :param keywords: 关键词列表,关键词数量范围为[1, 100],关键词字符长度范围为[1, 64]。支持关键词搜索的服务实例添加数据时,如给定此参数,则直接使用给定的keywords作为关键词,否则会自动生成对应的keywords。
63
+ :type keywords: list[str]
64
+ :param optional_params:
65
+ :type optional_params: :class:`huaweicloudsdkimagesearch.v2.AddDataOptionalParam`
66
+ """
67
+
68
+
69
+
70
+ self._force = None
71
+ self._item_id = None
72
+ self._desc = None
73
+ self._custom_tags = None
74
+ self._custom_num_tags = None
75
+ self._image_base64 = None
76
+ self._image_url = None
77
+ self._keywords = None
78
+ self._optional_params = None
79
+ self.discriminator = None
80
+
81
+ if force is not None:
82
+ self.force = force
83
+ self.item_id = item_id
84
+ if desc is not None:
85
+ self.desc = desc
86
+ if custom_tags is not None:
87
+ self.custom_tags = custom_tags
88
+ if custom_num_tags is not None:
89
+ self.custom_num_tags = custom_num_tags
90
+ if image_base64 is not None:
91
+ self.image_base64 = image_base64
92
+ if image_url is not None:
93
+ self.image_url = image_url
94
+ if keywords is not None:
95
+ self.keywords = keywords
96
+ if optional_params is not None:
97
+ self.optional_params = optional_params
98
+
99
+ @property
100
+ def force(self):
101
+ r"""Gets the force of this AddDataParam.
102
+
103
+ 是否强制添加数据,默认为false。 - false: 数据已存在则不进行添加。 - true: 数据已存在仍然覆盖添加。
104
+
105
+ :return: The force of this AddDataParam.
106
+ :rtype: bool
107
+ """
108
+ return self._force
109
+
110
+ @force.setter
111
+ def force(self, force):
112
+ r"""Sets the force of this AddDataParam.
113
+
114
+ 是否强制添加数据,默认为false。 - false: 数据已存在则不进行添加。 - true: 数据已存在仍然覆盖添加。
115
+
116
+ :param force: The force of this AddDataParam.
117
+ :type force: bool
118
+ """
119
+ self._force = force
120
+
121
+ @property
122
+ def item_id(self):
123
+ r"""Gets the item_id of this AddDataParam.
124
+
125
+ 数据的服务实例级唯一标识,字符长度范围为[1, 256]。
126
+
127
+ :return: The item_id of this AddDataParam.
128
+ :rtype: str
129
+ """
130
+ return self._item_id
131
+
132
+ @item_id.setter
133
+ def item_id(self, item_id):
134
+ r"""Sets the item_id of this AddDataParam.
135
+
136
+ 数据的服务实例级唯一标识,字符长度范围为[1, 256]。
137
+
138
+ :param item_id: The item_id of this AddDataParam.
139
+ :type item_id: str
140
+ """
141
+ self._item_id = item_id
142
+
143
+ @property
144
+ def desc(self):
145
+ r"""Gets the desc of this AddDataParam.
146
+
147
+ 数据的描述信息,字符长度范围为[1, 2048]。
148
+
149
+ :return: The desc of this AddDataParam.
150
+ :rtype: str
151
+ """
152
+ return self._desc
153
+
154
+ @desc.setter
155
+ def desc(self, desc):
156
+ r"""Sets the desc of this AddDataParam.
157
+
158
+ 数据的描述信息,字符长度范围为[1, 2048]。
159
+
160
+ :param desc: The desc of this AddDataParam.
161
+ :type desc: str
162
+ """
163
+ self._desc = desc
164
+
165
+ @property
166
+ def custom_tags(self):
167
+ r"""Gets the custom_tags of this AddDataParam.
168
+
169
+ 数据的自定义字符标签,用于进行条件过滤。格式为键值对{key:value}。 - key: 必须为服务实例custom_tags中已存在的key,可在创建服务实例时进行配置,或在更新服务实例时进行新增。 - value: 类型为字符串,字符长度范围为[1, 64]。
170
+
171
+ :return: The custom_tags of this AddDataParam.
172
+ :rtype: dict(str, str)
173
+ """
174
+ return self._custom_tags
175
+
176
+ @custom_tags.setter
177
+ def custom_tags(self, custom_tags):
178
+ r"""Sets the custom_tags of this AddDataParam.
179
+
180
+ 数据的自定义字符标签,用于进行条件过滤。格式为键值对{key:value}。 - key: 必须为服务实例custom_tags中已存在的key,可在创建服务实例时进行配置,或在更新服务实例时进行新增。 - value: 类型为字符串,字符长度范围为[1, 64]。
181
+
182
+ :param custom_tags: The custom_tags of this AddDataParam.
183
+ :type custom_tags: dict(str, str)
184
+ """
185
+ self._custom_tags = custom_tags
186
+
187
+ @property
188
+ def custom_num_tags(self):
189
+ r"""Gets the custom_num_tags of this AddDataParam.
190
+
191
+ 数据的自定义数值标签,用于进行条件过滤。格式为键值对{key:value}。 - key: 必须为服务实例custom_num_tags中已存在的key,可在创建服务实例时进行配置,或在更新服务实例时进行新增。 - value: 类型为数值,格式为double。
192
+
193
+ :return: The custom_num_tags of this AddDataParam.
194
+ :rtype: dict(str, float)
195
+ """
196
+ return self._custom_num_tags
197
+
198
+ @custom_num_tags.setter
199
+ def custom_num_tags(self, custom_num_tags):
200
+ r"""Sets the custom_num_tags of this AddDataParam.
201
+
202
+ 数据的自定义数值标签,用于进行条件过滤。格式为键值对{key:value}。 - key: 必须为服务实例custom_num_tags中已存在的key,可在创建服务实例时进行配置,或在更新服务实例时进行新增。 - value: 类型为数值,格式为double。
203
+
204
+ :param custom_num_tags: The custom_num_tags of this AddDataParam.
205
+ :type custom_num_tags: dict(str, float)
206
+ """
207
+ self._custom_num_tags = custom_num_tags
208
+
209
+ @property
210
+ def image_base64(self):
211
+ r"""Gets the image_base64 of this AddDataParam.
212
+
213
+ 图像文件的base64字符串,图像入库时,与image_url二选一。要求如下: - 格式:目前仅支持JPEG/JPG/PNG/BMP/WEBP格式的图像。 - 大小:图像文件大小要求不超过5M。 - 尺寸:默认情况下,要求图像的最短边大于64px,最长边小于4096px。部分服务类型有特殊要求,可参见服务类型说明。 - 其他:图片中不能包含旋转信息。
214
+
215
+ :return: The image_base64 of this AddDataParam.
216
+ :rtype: str
217
+ """
218
+ return self._image_base64
219
+
220
+ @image_base64.setter
221
+ def image_base64(self, image_base64):
222
+ r"""Sets the image_base64 of this AddDataParam.
223
+
224
+ 图像文件的base64字符串,图像入库时,与image_url二选一。要求如下: - 格式:目前仅支持JPEG/JPG/PNG/BMP/WEBP格式的图像。 - 大小:图像文件大小要求不超过5M。 - 尺寸:默认情况下,要求图像的最短边大于64px,最长边小于4096px。部分服务类型有特殊要求,可参见服务类型说明。 - 其他:图片中不能包含旋转信息。
225
+
226
+ :param image_base64: The image_base64 of this AddDataParam.
227
+ :type image_base64: str
228
+ """
229
+ self._image_base64 = image_base64
230
+
231
+ @property
232
+ def image_url(self):
233
+ r"""Gets the image_url of this AddDataParam.
234
+
235
+ 图像文件的服务可访问URL,字符长度范围为[1, 4096]。图像入库时,与image_base64二选一。
236
+
237
+ :return: The image_url of this AddDataParam.
238
+ :rtype: str
239
+ """
240
+ return self._image_url
241
+
242
+ @image_url.setter
243
+ def image_url(self, image_url):
244
+ r"""Sets the image_url of this AddDataParam.
245
+
246
+ 图像文件的服务可访问URL,字符长度范围为[1, 4096]。图像入库时,与image_base64二选一。
247
+
248
+ :param image_url: The image_url of this AddDataParam.
249
+ :type image_url: str
250
+ """
251
+ self._image_url = image_url
252
+
253
+ @property
254
+ def keywords(self):
255
+ r"""Gets the keywords of this AddDataParam.
256
+
257
+ 关键词列表,关键词数量范围为[1, 100],关键词字符长度范围为[1, 64]。支持关键词搜索的服务实例添加数据时,如给定此参数,则直接使用给定的keywords作为关键词,否则会自动生成对应的keywords。
258
+
259
+ :return: The keywords of this AddDataParam.
260
+ :rtype: list[str]
261
+ """
262
+ return self._keywords
263
+
264
+ @keywords.setter
265
+ def keywords(self, keywords):
266
+ r"""Sets the keywords of this AddDataParam.
267
+
268
+ 关键词列表,关键词数量范围为[1, 100],关键词字符长度范围为[1, 64]。支持关键词搜索的服务实例添加数据时,如给定此参数,则直接使用给定的keywords作为关键词,否则会自动生成对应的keywords。
269
+
270
+ :param keywords: The keywords of this AddDataParam.
271
+ :type keywords: list[str]
272
+ """
273
+ self._keywords = keywords
274
+
275
+ @property
276
+ def optional_params(self):
277
+ r"""Gets the optional_params of this AddDataParam.
278
+
279
+ :return: The optional_params of this AddDataParam.
280
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.AddDataOptionalParam`
281
+ """
282
+ return self._optional_params
283
+
284
+ @optional_params.setter
285
+ def optional_params(self, optional_params):
286
+ r"""Sets the optional_params of this AddDataParam.
287
+
288
+ :param optional_params: The optional_params of this AddDataParam.
289
+ :type optional_params: :class:`huaweicloudsdkimagesearch.v2.AddDataOptionalParam`
290
+ """
291
+ self._optional_params = optional_params
292
+
293
+ def to_dict(self):
294
+ """Returns the model properties as a dict"""
295
+ result = {}
296
+
297
+ for attr, _ in six.iteritems(self.openapi_types):
298
+ value = getattr(self, attr)
299
+ if isinstance(value, list):
300
+ result[attr] = list(map(
301
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
302
+ value
303
+ ))
304
+ elif hasattr(value, "to_dict"):
305
+ result[attr] = value.to_dict()
306
+ elif isinstance(value, dict):
307
+ result[attr] = dict(map(
308
+ lambda item: (item[0], item[1].to_dict())
309
+ if hasattr(item[1], "to_dict") else item,
310
+ value.items()
311
+ ))
312
+ else:
313
+ if attr in self.sensitive_list:
314
+ result[attr] = "****"
315
+ else:
316
+ result[attr] = value
317
+
318
+ return result
319
+
320
+ def to_str(self):
321
+ """Returns the string representation of the model"""
322
+ import simplejson as json
323
+ if six.PY2:
324
+ import sys
325
+ reload(sys)
326
+ sys.setdefaultencoding("utf-8")
327
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
328
+
329
+ def __repr__(self):
330
+ """For `print`"""
331
+ return self.to_str()
332
+
333
+ def __eq__(self, other):
334
+ """Returns true if both objects are equal"""
335
+ if not isinstance(other, AddDataParam):
336
+ return False
337
+
338
+ return self.__dict__ == other.__dict__
339
+
340
+ def __ne__(self, other):
341
+ """Returns true if both objects are not equal"""
342
+ return not self == other
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class AddDataRestInfo:
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
+ 'image_info': 'AddDataRestInfoImageInfo'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'image_info': 'image_info'
25
+ }
26
+
27
+ def __init__(self, image_info=None):
28
+ r"""AddDataRestInfo
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param image_info:
33
+ :type image_info: :class:`huaweicloudsdkimagesearch.v2.AddDataRestInfoImageInfo`
34
+ """
35
+
36
+
37
+
38
+ self._image_info = None
39
+ self.discriminator = None
40
+
41
+ if image_info is not None:
42
+ self.image_info = image_info
43
+
44
+ @property
45
+ def image_info(self):
46
+ r"""Gets the image_info of this AddDataRestInfo.
47
+
48
+ :return: The image_info of this AddDataRestInfo.
49
+ :rtype: :class:`huaweicloudsdkimagesearch.v2.AddDataRestInfoImageInfo`
50
+ """
51
+ return self._image_info
52
+
53
+ @image_info.setter
54
+ def image_info(self, image_info):
55
+ r"""Sets the image_info of this AddDataRestInfo.
56
+
57
+ :param image_info: The image_info of this AddDataRestInfo.
58
+ :type image_info: :class:`huaweicloudsdkimagesearch.v2.AddDataRestInfoImageInfo`
59
+ """
60
+ self._image_info = image_info
61
+
62
+ def to_dict(self):
63
+ """Returns the model properties as a dict"""
64
+ result = {}
65
+
66
+ for attr, _ in six.iteritems(self.openapi_types):
67
+ value = getattr(self, attr)
68
+ if isinstance(value, list):
69
+ result[attr] = list(map(
70
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
71
+ value
72
+ ))
73
+ elif hasattr(value, "to_dict"):
74
+ result[attr] = value.to_dict()
75
+ elif isinstance(value, dict):
76
+ result[attr] = dict(map(
77
+ lambda item: (item[0], item[1].to_dict())
78
+ if hasattr(item[1], "to_dict") else item,
79
+ value.items()
80
+ ))
81
+ else:
82
+ if attr in self.sensitive_list:
83
+ result[attr] = "****"
84
+ else:
85
+ result[attr] = value
86
+
87
+ return result
88
+
89
+ def to_str(self):
90
+ """Returns the string representation of the model"""
91
+ import simplejson as json
92
+ if six.PY2:
93
+ import sys
94
+ reload(sys)
95
+ sys.setdefaultencoding("utf-8")
96
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
97
+
98
+ def __repr__(self):
99
+ """For `print`"""
100
+ return self.to_str()
101
+
102
+ def __eq__(self, other):
103
+ """Returns true if both objects are equal"""
104
+ if not isinstance(other, AddDataRestInfo):
105
+ return False
106
+
107
+ return self.__dict__ == other.__dict__
108
+
109
+ def __ne__(self, other):
110
+ """Returns true if both objects are not equal"""
111
+ return not self == other
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class AddDataRestInfoImageInfo:
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
+ 'objects': 'list[AddDataRestInfoImageInfoObjects]'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'objects': 'objects'
25
+ }
26
+
27
+ def __init__(self, objects=None):
28
+ r"""AddDataRestInfoImageInfo
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param objects: 添加的主体列表。
33
+ :type objects: list[:class:`huaweicloudsdkimagesearch.v2.AddDataRestInfoImageInfoObjects`]
34
+ """
35
+
36
+
37
+
38
+ self._objects = None
39
+ self.discriminator = None
40
+
41
+ if objects is not None:
42
+ self.objects = objects
43
+
44
+ @property
45
+ def objects(self):
46
+ r"""Gets the objects of this AddDataRestInfoImageInfo.
47
+
48
+ 添加的主体列表。
49
+
50
+ :return: The objects of this AddDataRestInfoImageInfo.
51
+ :rtype: list[:class:`huaweicloudsdkimagesearch.v2.AddDataRestInfoImageInfoObjects`]
52
+ """
53
+ return self._objects
54
+
55
+ @objects.setter
56
+ def objects(self, objects):
57
+ r"""Sets the objects of this AddDataRestInfoImageInfo.
58
+
59
+ 添加的主体列表。
60
+
61
+ :param objects: The objects of this AddDataRestInfoImageInfo.
62
+ :type objects: list[:class:`huaweicloudsdkimagesearch.v2.AddDataRestInfoImageInfoObjects`]
63
+ """
64
+ self._objects = objects
65
+
66
+ def to_dict(self):
67
+ """Returns the model properties as a dict"""
68
+ result = {}
69
+
70
+ for attr, _ in six.iteritems(self.openapi_types):
71
+ value = getattr(self, attr)
72
+ if isinstance(value, list):
73
+ result[attr] = list(map(
74
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
75
+ value
76
+ ))
77
+ elif hasattr(value, "to_dict"):
78
+ result[attr] = value.to_dict()
79
+ elif isinstance(value, dict):
80
+ result[attr] = dict(map(
81
+ lambda item: (item[0], item[1].to_dict())
82
+ if hasattr(item[1], "to_dict") else item,
83
+ value.items()
84
+ ))
85
+ else:
86
+ if attr in self.sensitive_list:
87
+ result[attr] = "****"
88
+ else:
89
+ result[attr] = value
90
+
91
+ return result
92
+
93
+ def to_str(self):
94
+ """Returns the string representation of the model"""
95
+ import simplejson as json
96
+ if six.PY2:
97
+ import sys
98
+ reload(sys)
99
+ sys.setdefaultencoding("utf-8")
100
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
101
+
102
+ def __repr__(self):
103
+ """For `print`"""
104
+ return self.to_str()
105
+
106
+ def __eq__(self, other):
107
+ """Returns true if both objects are equal"""
108
+ if not isinstance(other, AddDataRestInfoImageInfo):
109
+ return False
110
+
111
+ return self.__dict__ == other.__dict__
112
+
113
+ def __ne__(self, other):
114
+ """Returns true if both objects are not equal"""
115
+ return not self == other