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