huaweicloudsdkdwr 3.1.150__py2.py3-none-any.whl → 3.1.152__py2.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 huaweicloudsdkdwr might be problematic. Click here for more details.

Files changed (96) hide show
  1. huaweicloudsdkdwr/v1/__init__.py +91 -0
  2. huaweicloudsdkdwr/v1/dwr_async_client.py +1519 -0
  3. huaweicloudsdkdwr/v1/dwr_client.py +1516 -0
  4. huaweicloudsdkdwr/v1/model/__init__.py +88 -0
  5. huaweicloudsdkdwr/v1/model/build_progress.py +231 -0
  6. huaweicloudsdkdwr/v1/model/charge_info.py +230 -0
  7. huaweicloudsdkdwr/v1/model/collection_base_info.py +142 -0
  8. huaweicloudsdkdwr/v1/model/create_collection_body.py +281 -0
  9. huaweicloudsdkdwr/v1/model/create_collection_request.py +111 -0
  10. huaweicloudsdkdwr/v1/model/create_collection_response.py +145 -0
  11. huaweicloudsdkdwr/v1/model/create_index_body.py +166 -0
  12. huaweicloudsdkdwr/v1/model/create_index_request.py +111 -0
  13. huaweicloudsdkdwr/v1/model/create_index_response.py +145 -0
  14. huaweicloudsdkdwr/v1/model/create_store_body.py +248 -0
  15. huaweicloudsdkdwr/v1/model/create_store_data.py +335 -0
  16. huaweicloudsdkdwr/v1/model/create_store_request.py +111 -0
  17. huaweicloudsdkdwr/v1/model/create_store_response.py +170 -0
  18. huaweicloudsdkdwr/v1/model/decribe_collection_data.py +315 -0
  19. huaweicloudsdkdwr/v1/model/delete_collection_request.py +111 -0
  20. huaweicloudsdkdwr/v1/model/delete_collection_response.py +145 -0
  21. huaweicloudsdkdwr/v1/model/delete_entities_body.py +170 -0
  22. huaweicloudsdkdwr/v1/model/delete_entities_request.py +111 -0
  23. huaweicloudsdkdwr/v1/model/delete_entities_response.py +145 -0
  24. huaweicloudsdkdwr/v1/model/delete_index_body.py +170 -0
  25. huaweicloudsdkdwr/v1/model/delete_index_request.py +111 -0
  26. huaweicloudsdkdwr/v1/model/delete_index_response.py +145 -0
  27. huaweicloudsdkdwr/v1/model/delete_store_data.py +114 -0
  28. huaweicloudsdkdwr/v1/model/delete_store_request.py +111 -0
  29. huaweicloudsdkdwr/v1/model/delete_store_response.py +170 -0
  30. huaweicloudsdkdwr/v1/model/describe_collection_request.py +111 -0
  31. huaweicloudsdkdwr/v1/model/describe_collection_response.py +170 -0
  32. huaweicloudsdkdwr/v1/model/describe_index_body.py +170 -0
  33. huaweicloudsdkdwr/v1/model/describe_index_request.py +111 -0
  34. huaweicloudsdkdwr/v1/model/describe_index_response.py +170 -0
  35. huaweicloudsdkdwr/v1/model/describe_index_respose_data.py +171 -0
  36. huaweicloudsdkdwr/v1/model/describe_job_body.py +114 -0
  37. huaweicloudsdkdwr/v1/model/describe_job_request.py +111 -0
  38. huaweicloudsdkdwr/v1/model/describe_job_response.py +170 -0
  39. huaweicloudsdkdwr/v1/model/describe_store_data.py +364 -0
  40. huaweicloudsdkdwr/v1/model/describe_store_request.py +111 -0
  41. huaweicloudsdkdwr/v1/model/describe_store_response.py +170 -0
  42. huaweicloudsdkdwr/v1/model/field.py +229 -0
  43. huaweicloudsdkdwr/v1/model/field_data.py +198 -0
  44. huaweicloudsdkdwr/v1/model/flavor.py +142 -0
  45. huaweicloudsdkdwr/v1/model/get_index_progress_body.py +170 -0
  46. huaweicloudsdkdwr/v1/model/get_index_progress_response_data.py +167 -0
  47. huaweicloudsdkdwr/v1/model/get_progress_request.py +111 -0
  48. huaweicloudsdkdwr/v1/model/get_progress_response.py +170 -0
  49. huaweicloudsdkdwr/v1/model/hybrid_search_body.py +278 -0
  50. huaweicloudsdkdwr/v1/model/hybrid_search_request.py +111 -0
  51. huaweicloudsdkdwr/v1/model/hybrid_search_response.py +174 -0
  52. huaweicloudsdkdwr/v1/model/index_desc.py +200 -0
  53. huaweicloudsdkdwr/v1/model/index_params.py +171 -0
  54. huaweicloudsdkdwr/v1/model/insert_entities_body.py +170 -0
  55. huaweicloudsdkdwr/v1/model/insert_entities_request.py +111 -0
  56. huaweicloudsdkdwr/v1/model/insert_entities_response.py +170 -0
  57. huaweicloudsdkdwr/v1/model/insert_entities_response_data.py +143 -0
  58. huaweicloudsdkdwr/v1/model/job_data.py +316 -0
  59. huaweicloudsdkdwr/v1/model/list_collection_data.py +143 -0
  60. huaweicloudsdkdwr/v1/model/list_collection_details.py +260 -0
  61. huaweicloudsdkdwr/v1/model/list_collections_body.py +143 -0
  62. huaweicloudsdkdwr/v1/model/list_collections_request.py +111 -0
  63. huaweicloudsdkdwr/v1/model/list_collections_response.py +170 -0
  64. huaweicloudsdkdwr/v1/model/list_jobs_data.py +115 -0
  65. huaweicloudsdkdwr/v1/model/list_jobs_request.py +231 -0
  66. huaweicloudsdkdwr/v1/model/list_jobs_response.py +170 -0
  67. huaweicloudsdkdwr/v1/model/list_stores_request.py +84 -0
  68. huaweicloudsdkdwr/v1/model/list_stores_response.py +174 -0
  69. huaweicloudsdkdwr/v1/model/load_collection_body.py +142 -0
  70. huaweicloudsdkdwr/v1/model/load_collection_request.py +111 -0
  71. huaweicloudsdkdwr/v1/model/load_collection_response.py +145 -0
  72. huaweicloudsdkdwr/v1/model/primary_field.py +142 -0
  73. huaweicloudsdkdwr/v1/model/query_entities_body.py +257 -0
  74. huaweicloudsdkdwr/v1/model/query_entities_request.py +111 -0
  75. huaweicloudsdkdwr/v1/model/query_entities_response.py +174 -0
  76. huaweicloudsdkdwr/v1/model/release_collection_request.py +111 -0
  77. huaweicloudsdkdwr/v1/model/release_collection_response.py +145 -0
  78. huaweicloudsdkdwr/v1/model/rerank.py +143 -0
  79. huaweicloudsdkdwr/v1/model/search_entities_body.py +343 -0
  80. huaweicloudsdkdwr/v1/model/search_entities_request.py +111 -0
  81. huaweicloudsdkdwr/v1/model/search_entities_response.py +174 -0
  82. huaweicloudsdkdwr/v1/model/store_info.py +114 -0
  83. huaweicloudsdkdwr/v1/model/sub_search.py +258 -0
  84. huaweicloudsdkdwr/v1/model/upsert_entities_body.py +170 -0
  85. huaweicloudsdkdwr/v1/model/upsert_entities_request.py +111 -0
  86. huaweicloudsdkdwr/v1/model/upsert_entities_response.py +170 -0
  87. huaweicloudsdkdwr/v1/model/upsert_entities_response_data.py +143 -0
  88. huaweicloudsdkdwr/v1/region/__init__.py +0 -0
  89. huaweicloudsdkdwr/v1/region/dwr_region.py +37 -0
  90. huaweicloudsdkdwr/v3/region/dwr_region.py +6 -0
  91. {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/METADATA +2 -2
  92. huaweicloudsdkdwr-3.1.152.dist-info/RECORD +169 -0
  93. huaweicloudsdkdwr-3.1.150.dist-info/RECORD +0 -80
  94. {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/LICENSE +0 -0
  95. {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/WHEEL +0 -0
  96. {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,343 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class SearchEntitiesBody:
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
+ 'store_name': 'str',
21
+ 'collection_name': 'str',
22
+ 'output_fields': 'list[str]',
23
+ 'top_k': 'int',
24
+ 'offset': 'int',
25
+ 'filter': 'str',
26
+ 'vector': 'list[float]',
27
+ 'vector_field': 'str',
28
+ 'params': 'dict(str, object)'
29
+ }
30
+
31
+ attribute_map = {
32
+ 'store_name': 'store_name',
33
+ 'collection_name': 'collection_name',
34
+ 'output_fields': 'output_fields',
35
+ 'top_k': 'top_k',
36
+ 'offset': 'offset',
37
+ 'filter': 'filter',
38
+ 'vector': 'vector',
39
+ 'vector_field': 'vector_field',
40
+ 'params': 'params'
41
+ }
42
+
43
+ def __init__(self, store_name=None, collection_name=None, output_fields=None, top_k=None, offset=None, filter=None, vector=None, vector_field=None, params=None):
44
+ r"""SearchEntitiesBody
45
+
46
+ The model defined in huaweicloud sdk
47
+
48
+ :param store_name: 知识仓实例名称
49
+ :type store_name: str
50
+ :param collection_name: collection名称
51
+ :type collection_name: str
52
+ :param output_fields: 配置需返回的字段。
53
+ :type output_fields: list[str]
54
+ :param top_k: 返回个数限制
55
+ :type top_k: int
56
+ :param offset: 搜索结果中要跳过的entity数。
57
+ :type offset: int
58
+ :param filter: 设置过滤表达式。 filter的表达式格式为详见Filter规则
59
+ :type filter: str
60
+ :param vector: 需要搜索的向量数据
61
+ :type vector: list[float]
62
+ :param vector_field: 表示要查询的向量列名字
63
+ :type vector_field: str
64
+ :param params: 向量查询自定义参数: ef:每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(对HNSW生效) - search_list: 候选列表的大小,越大召回率越高,但性能会下降。(对HANNS生效) - nprobe: 返回的最近的聚类单元的数量。(对IVF_FLAT生效) - radius:查询范围的半径,若指定则进行range查询。
65
+ :type params: dict(str, object)
66
+ """
67
+
68
+
69
+
70
+ self._store_name = None
71
+ self._collection_name = None
72
+ self._output_fields = None
73
+ self._top_k = None
74
+ self._offset = None
75
+ self._filter = None
76
+ self._vector = None
77
+ self._vector_field = None
78
+ self._params = None
79
+ self.discriminator = None
80
+
81
+ self.store_name = store_name
82
+ self.collection_name = collection_name
83
+ if output_fields is not None:
84
+ self.output_fields = output_fields
85
+ if top_k is not None:
86
+ self.top_k = top_k
87
+ if offset is not None:
88
+ self.offset = offset
89
+ if filter is not None:
90
+ self.filter = filter
91
+ self.vector = vector
92
+ self.vector_field = vector_field
93
+ if params is not None:
94
+ self.params = params
95
+
96
+ @property
97
+ def store_name(self):
98
+ r"""Gets the store_name of this SearchEntitiesBody.
99
+
100
+ 知识仓实例名称
101
+
102
+ :return: The store_name of this SearchEntitiesBody.
103
+ :rtype: str
104
+ """
105
+ return self._store_name
106
+
107
+ @store_name.setter
108
+ def store_name(self, store_name):
109
+ r"""Sets the store_name of this SearchEntitiesBody.
110
+
111
+ 知识仓实例名称
112
+
113
+ :param store_name: The store_name of this SearchEntitiesBody.
114
+ :type store_name: str
115
+ """
116
+ self._store_name = store_name
117
+
118
+ @property
119
+ def collection_name(self):
120
+ r"""Gets the collection_name of this SearchEntitiesBody.
121
+
122
+ collection名称
123
+
124
+ :return: The collection_name of this SearchEntitiesBody.
125
+ :rtype: str
126
+ """
127
+ return self._collection_name
128
+
129
+ @collection_name.setter
130
+ def collection_name(self, collection_name):
131
+ r"""Sets the collection_name of this SearchEntitiesBody.
132
+
133
+ collection名称
134
+
135
+ :param collection_name: The collection_name of this SearchEntitiesBody.
136
+ :type collection_name: str
137
+ """
138
+ self._collection_name = collection_name
139
+
140
+ @property
141
+ def output_fields(self):
142
+ r"""Gets the output_fields of this SearchEntitiesBody.
143
+
144
+ 配置需返回的字段。
145
+
146
+ :return: The output_fields of this SearchEntitiesBody.
147
+ :rtype: list[str]
148
+ """
149
+ return self._output_fields
150
+
151
+ @output_fields.setter
152
+ def output_fields(self, output_fields):
153
+ r"""Sets the output_fields of this SearchEntitiesBody.
154
+
155
+ 配置需返回的字段。
156
+
157
+ :param output_fields: The output_fields of this SearchEntitiesBody.
158
+ :type output_fields: list[str]
159
+ """
160
+ self._output_fields = output_fields
161
+
162
+ @property
163
+ def top_k(self):
164
+ r"""Gets the top_k of this SearchEntitiesBody.
165
+
166
+ 返回个数限制
167
+
168
+ :return: The top_k of this SearchEntitiesBody.
169
+ :rtype: int
170
+ """
171
+ return self._top_k
172
+
173
+ @top_k.setter
174
+ def top_k(self, top_k):
175
+ r"""Sets the top_k of this SearchEntitiesBody.
176
+
177
+ 返回个数限制
178
+
179
+ :param top_k: The top_k of this SearchEntitiesBody.
180
+ :type top_k: int
181
+ """
182
+ self._top_k = top_k
183
+
184
+ @property
185
+ def offset(self):
186
+ r"""Gets the offset of this SearchEntitiesBody.
187
+
188
+ 搜索结果中要跳过的entity数。
189
+
190
+ :return: The offset of this SearchEntitiesBody.
191
+ :rtype: int
192
+ """
193
+ return self._offset
194
+
195
+ @offset.setter
196
+ def offset(self, offset):
197
+ r"""Sets the offset of this SearchEntitiesBody.
198
+
199
+ 搜索结果中要跳过的entity数。
200
+
201
+ :param offset: The offset of this SearchEntitiesBody.
202
+ :type offset: int
203
+ """
204
+ self._offset = offset
205
+
206
+ @property
207
+ def filter(self):
208
+ r"""Gets the filter of this SearchEntitiesBody.
209
+
210
+ 设置过滤表达式。 filter的表达式格式为详见Filter规则
211
+
212
+ :return: The filter of this SearchEntitiesBody.
213
+ :rtype: str
214
+ """
215
+ return self._filter
216
+
217
+ @filter.setter
218
+ def filter(self, filter):
219
+ r"""Sets the filter of this SearchEntitiesBody.
220
+
221
+ 设置过滤表达式。 filter的表达式格式为详见Filter规则
222
+
223
+ :param filter: The filter of this SearchEntitiesBody.
224
+ :type filter: str
225
+ """
226
+ self._filter = filter
227
+
228
+ @property
229
+ def vector(self):
230
+ r"""Gets the vector of this SearchEntitiesBody.
231
+
232
+ 需要搜索的向量数据
233
+
234
+ :return: The vector of this SearchEntitiesBody.
235
+ :rtype: list[float]
236
+ """
237
+ return self._vector
238
+
239
+ @vector.setter
240
+ def vector(self, vector):
241
+ r"""Sets the vector of this SearchEntitiesBody.
242
+
243
+ 需要搜索的向量数据
244
+
245
+ :param vector: The vector of this SearchEntitiesBody.
246
+ :type vector: list[float]
247
+ """
248
+ self._vector = vector
249
+
250
+ @property
251
+ def vector_field(self):
252
+ r"""Gets the vector_field of this SearchEntitiesBody.
253
+
254
+ 表示要查询的向量列名字
255
+
256
+ :return: The vector_field of this SearchEntitiesBody.
257
+ :rtype: str
258
+ """
259
+ return self._vector_field
260
+
261
+ @vector_field.setter
262
+ def vector_field(self, vector_field):
263
+ r"""Sets the vector_field of this SearchEntitiesBody.
264
+
265
+ 表示要查询的向量列名字
266
+
267
+ :param vector_field: The vector_field of this SearchEntitiesBody.
268
+ :type vector_field: str
269
+ """
270
+ self._vector_field = vector_field
271
+
272
+ @property
273
+ def params(self):
274
+ r"""Gets the params of this SearchEntitiesBody.
275
+
276
+ 向量查询自定义参数: ef:每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(对HNSW生效) - search_list: 候选列表的大小,越大召回率越高,但性能会下降。(对HANNS生效) - nprobe: 返回的最近的聚类单元的数量。(对IVF_FLAT生效) - radius:查询范围的半径,若指定则进行range查询。
277
+
278
+ :return: The params of this SearchEntitiesBody.
279
+ :rtype: dict(str, object)
280
+ """
281
+ return self._params
282
+
283
+ @params.setter
284
+ def params(self, params):
285
+ r"""Sets the params of this SearchEntitiesBody.
286
+
287
+ 向量查询自定义参数: ef:每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(对HNSW生效) - search_list: 候选列表的大小,越大召回率越高,但性能会下降。(对HANNS生效) - nprobe: 返回的最近的聚类单元的数量。(对IVF_FLAT生效) - radius:查询范围的半径,若指定则进行range查询。
288
+
289
+ :param params: The params of this SearchEntitiesBody.
290
+ :type params: dict(str, object)
291
+ """
292
+ self._params = params
293
+
294
+ def to_dict(self):
295
+ """Returns the model properties as a dict"""
296
+ result = {}
297
+
298
+ for attr, _ in six.iteritems(self.openapi_types):
299
+ value = getattr(self, attr)
300
+ if isinstance(value, list):
301
+ result[attr] = list(map(
302
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
303
+ value
304
+ ))
305
+ elif hasattr(value, "to_dict"):
306
+ result[attr] = value.to_dict()
307
+ elif isinstance(value, dict):
308
+ result[attr] = dict(map(
309
+ lambda item: (item[0], item[1].to_dict())
310
+ if hasattr(item[1], "to_dict") else item,
311
+ value.items()
312
+ ))
313
+ else:
314
+ if attr in self.sensitive_list:
315
+ result[attr] = "****"
316
+ else:
317
+ result[attr] = value
318
+
319
+ return result
320
+
321
+ def to_str(self):
322
+ """Returns the string representation of the model"""
323
+ import simplejson as json
324
+ if six.PY2:
325
+ import sys
326
+ reload(sys)
327
+ sys.setdefaultencoding("utf-8")
328
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
329
+
330
+ def __repr__(self):
331
+ """For `print`"""
332
+ return self.to_str()
333
+
334
+ def __eq__(self, other):
335
+ """Returns true if both objects are equal"""
336
+ if not isinstance(other, SearchEntitiesBody):
337
+ return False
338
+
339
+ return self.__dict__ == other.__dict__
340
+
341
+ def __ne__(self, other):
342
+ """Returns true if both objects are not equal"""
343
+ 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 SearchEntitiesRequest:
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
+ 'body': 'SearchEntitiesBody'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, body=None):
28
+ r"""SearchEntitiesRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param body: Body of the SearchEntitiesRequest
33
+ :type body: :class:`huaweicloudsdkdwr.v1.SearchEntitiesBody`
34
+ """
35
+
36
+
37
+
38
+ self._body = None
39
+ self.discriminator = None
40
+
41
+ if body is not None:
42
+ self.body = body
43
+
44
+ @property
45
+ def body(self):
46
+ r"""Gets the body of this SearchEntitiesRequest.
47
+
48
+ :return: The body of this SearchEntitiesRequest.
49
+ :rtype: :class:`huaweicloudsdkdwr.v1.SearchEntitiesBody`
50
+ """
51
+ return self._body
52
+
53
+ @body.setter
54
+ def body(self, body):
55
+ r"""Sets the body of this SearchEntitiesRequest.
56
+
57
+ :param body: The body of this SearchEntitiesRequest.
58
+ :type body: :class:`huaweicloudsdkdwr.v1.SearchEntitiesBody`
59
+ """
60
+ self._body = body
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, SearchEntitiesRequest):
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,174 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.sdk_response import SdkResponse
6
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
7
+
8
+
9
+ class SearchEntitiesResponse(SdkResponse):
10
+
11
+ """
12
+ Attributes:
13
+ openapi_types (dict): The key is attribute name
14
+ and the value is attribute type.
15
+ attribute_map (dict): The key is attribute name
16
+ and the value is json key in definition.
17
+ """
18
+ sensitive_list = []
19
+
20
+ openapi_types = {
21
+ 'code': 'str',
22
+ 'message': 'str',
23
+ 'data': 'dict(str, list[dict(str, object)])'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'code': 'code',
28
+ 'message': 'message',
29
+ 'data': 'data'
30
+ }
31
+
32
+ def __init__(self, code=None, message=None, data=None):
33
+ r"""SearchEntitiesResponse
34
+
35
+ The model defined in huaweicloud sdk
36
+
37
+ :param code: 返回码
38
+ :type code: str
39
+ :param message: 描述信息
40
+ :type message: str
41
+ :param data: 响应数据
42
+ :type data: dict(str, list[dict(str, object)])
43
+ """
44
+
45
+ super(SearchEntitiesResponse, self).__init__()
46
+
47
+ self._code = None
48
+ self._message = None
49
+ self._data = None
50
+ self.discriminator = None
51
+
52
+ if code is not None:
53
+ self.code = code
54
+ if message is not None:
55
+ self.message = message
56
+ if data is not None:
57
+ self.data = data
58
+
59
+ @property
60
+ def code(self):
61
+ r"""Gets the code of this SearchEntitiesResponse.
62
+
63
+ 返回码
64
+
65
+ :return: The code of this SearchEntitiesResponse.
66
+ :rtype: str
67
+ """
68
+ return self._code
69
+
70
+ @code.setter
71
+ def code(self, code):
72
+ r"""Sets the code of this SearchEntitiesResponse.
73
+
74
+ 返回码
75
+
76
+ :param code: The code of this SearchEntitiesResponse.
77
+ :type code: str
78
+ """
79
+ self._code = code
80
+
81
+ @property
82
+ def message(self):
83
+ r"""Gets the message of this SearchEntitiesResponse.
84
+
85
+ 描述信息
86
+
87
+ :return: The message of this SearchEntitiesResponse.
88
+ :rtype: str
89
+ """
90
+ return self._message
91
+
92
+ @message.setter
93
+ def message(self, message):
94
+ r"""Sets the message of this SearchEntitiesResponse.
95
+
96
+ 描述信息
97
+
98
+ :param message: The message of this SearchEntitiesResponse.
99
+ :type message: str
100
+ """
101
+ self._message = message
102
+
103
+ @property
104
+ def data(self):
105
+ r"""Gets the data of this SearchEntitiesResponse.
106
+
107
+ 响应数据
108
+
109
+ :return: The data of this SearchEntitiesResponse.
110
+ :rtype: dict(str, list[dict(str, object)])
111
+ """
112
+ return self._data
113
+
114
+ @data.setter
115
+ def data(self, data):
116
+ r"""Sets the data of this SearchEntitiesResponse.
117
+
118
+ 响应数据
119
+
120
+ :param data: The data of this SearchEntitiesResponse.
121
+ :type data: dict(str, list[dict(str, object)])
122
+ """
123
+ self._data = data
124
+
125
+ def to_dict(self):
126
+ """Returns the model properties as a dict"""
127
+ result = {}
128
+
129
+ for attr, _ in six.iteritems(self.openapi_types):
130
+ value = getattr(self, attr)
131
+ if isinstance(value, list):
132
+ result[attr] = list(map(
133
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
134
+ value
135
+ ))
136
+ elif hasattr(value, "to_dict"):
137
+ result[attr] = value.to_dict()
138
+ elif isinstance(value, dict):
139
+ result[attr] = dict(map(
140
+ lambda item: (item[0], item[1].to_dict())
141
+ if hasattr(item[1], "to_dict") else item,
142
+ value.items()
143
+ ))
144
+ else:
145
+ if attr in self.sensitive_list:
146
+ result[attr] = "****"
147
+ else:
148
+ result[attr] = value
149
+
150
+ return result
151
+
152
+ def to_str(self):
153
+ """Returns the string representation of the model"""
154
+ import simplejson as json
155
+ if six.PY2:
156
+ import sys
157
+ reload(sys)
158
+ sys.setdefaultencoding("utf-8")
159
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
160
+
161
+ def __repr__(self):
162
+ """For `print`"""
163
+ return self.to_str()
164
+
165
+ def __eq__(self, other):
166
+ """Returns true if both objects are equal"""
167
+ if not isinstance(other, SearchEntitiesResponse):
168
+ return False
169
+
170
+ return self.__dict__ == other.__dict__
171
+
172
+ def __ne__(self, other):
173
+ """Returns true if both objects are not equal"""
174
+ return not self == other