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,200 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class IndexDesc:
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
+ 'index_name': 'str',
21
+ 'field_name': 'str',
22
+ 'index_params': 'dict(str, object)',
23
+ 'index_state': 'str'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'index_name': 'index_name',
28
+ 'field_name': 'field_name',
29
+ 'index_params': 'index_params',
30
+ 'index_state': 'index_state'
31
+ }
32
+
33
+ def __init__(self, index_name=None, field_name=None, index_params=None, index_state=None):
34
+ r"""IndexDesc
35
+
36
+ The model defined in huaweicloud sdk
37
+
38
+ :param index_name: 索引名
39
+ :type index_name: str
40
+ :param field_name: 索引对应的列
41
+ :type field_name: str
42
+ :param index_params: 索引的参数信息
43
+ :type index_params: dict(str, object)
44
+ :param index_state: 索引状态: -\"InProgress\":索引正在构建中或还未开始构建 -\"Finished\":索引构建完成 -\"Failed\":索引构建失败
45
+ :type index_state: str
46
+ """
47
+
48
+
49
+
50
+ self._index_name = None
51
+ self._field_name = None
52
+ self._index_params = None
53
+ self._index_state = None
54
+ self.discriminator = None
55
+
56
+ self.index_name = index_name
57
+ self.field_name = field_name
58
+ if index_params is not None:
59
+ self.index_params = index_params
60
+ if index_state is not None:
61
+ self.index_state = index_state
62
+
63
+ @property
64
+ def index_name(self):
65
+ r"""Gets the index_name of this IndexDesc.
66
+
67
+ 索引名
68
+
69
+ :return: The index_name of this IndexDesc.
70
+ :rtype: str
71
+ """
72
+ return self._index_name
73
+
74
+ @index_name.setter
75
+ def index_name(self, index_name):
76
+ r"""Sets the index_name of this IndexDesc.
77
+
78
+ 索引名
79
+
80
+ :param index_name: The index_name of this IndexDesc.
81
+ :type index_name: str
82
+ """
83
+ self._index_name = index_name
84
+
85
+ @property
86
+ def field_name(self):
87
+ r"""Gets the field_name of this IndexDesc.
88
+
89
+ 索引对应的列
90
+
91
+ :return: The field_name of this IndexDesc.
92
+ :rtype: str
93
+ """
94
+ return self._field_name
95
+
96
+ @field_name.setter
97
+ def field_name(self, field_name):
98
+ r"""Sets the field_name of this IndexDesc.
99
+
100
+ 索引对应的列
101
+
102
+ :param field_name: The field_name of this IndexDesc.
103
+ :type field_name: str
104
+ """
105
+ self._field_name = field_name
106
+
107
+ @property
108
+ def index_params(self):
109
+ r"""Gets the index_params of this IndexDesc.
110
+
111
+ 索引的参数信息
112
+
113
+ :return: The index_params of this IndexDesc.
114
+ :rtype: dict(str, object)
115
+ """
116
+ return self._index_params
117
+
118
+ @index_params.setter
119
+ def index_params(self, index_params):
120
+ r"""Sets the index_params of this IndexDesc.
121
+
122
+ 索引的参数信息
123
+
124
+ :param index_params: The index_params of this IndexDesc.
125
+ :type index_params: dict(str, object)
126
+ """
127
+ self._index_params = index_params
128
+
129
+ @property
130
+ def index_state(self):
131
+ r"""Gets the index_state of this IndexDesc.
132
+
133
+ 索引状态: -\"InProgress\":索引正在构建中或还未开始构建 -\"Finished\":索引构建完成 -\"Failed\":索引构建失败
134
+
135
+ :return: The index_state of this IndexDesc.
136
+ :rtype: str
137
+ """
138
+ return self._index_state
139
+
140
+ @index_state.setter
141
+ def index_state(self, index_state):
142
+ r"""Sets the index_state of this IndexDesc.
143
+
144
+ 索引状态: -\"InProgress\":索引正在构建中或还未开始构建 -\"Finished\":索引构建完成 -\"Failed\":索引构建失败
145
+
146
+ :param index_state: The index_state of this IndexDesc.
147
+ :type index_state: str
148
+ """
149
+ self._index_state = index_state
150
+
151
+ def to_dict(self):
152
+ """Returns the model properties as a dict"""
153
+ result = {}
154
+
155
+ for attr, _ in six.iteritems(self.openapi_types):
156
+ value = getattr(self, attr)
157
+ if isinstance(value, list):
158
+ result[attr] = list(map(
159
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
160
+ value
161
+ ))
162
+ elif hasattr(value, "to_dict"):
163
+ result[attr] = value.to_dict()
164
+ elif isinstance(value, dict):
165
+ result[attr] = dict(map(
166
+ lambda item: (item[0], item[1].to_dict())
167
+ if hasattr(item[1], "to_dict") else item,
168
+ value.items()
169
+ ))
170
+ else:
171
+ if attr in self.sensitive_list:
172
+ result[attr] = "****"
173
+ else:
174
+ result[attr] = value
175
+
176
+ return result
177
+
178
+ def to_str(self):
179
+ """Returns the string representation of the model"""
180
+ import simplejson as json
181
+ if six.PY2:
182
+ import sys
183
+ reload(sys)
184
+ sys.setdefaultencoding("utf-8")
185
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
186
+
187
+ def __repr__(self):
188
+ """For `print`"""
189
+ return self.to_str()
190
+
191
+ def __eq__(self, other):
192
+ """Returns true if both objects are equal"""
193
+ if not isinstance(other, IndexDesc):
194
+ return False
195
+
196
+ return self.__dict__ == other.__dict__
197
+
198
+ def __ne__(self, other):
199
+ """Returns true if both objects are not equal"""
200
+ return not self == other
@@ -0,0 +1,171 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class IndexParams:
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
+ 'index_name': 'str',
21
+ 'field_name': 'str',
22
+ 'params': 'dict(str, object)'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'index_name': 'index_name',
27
+ 'field_name': 'field_name',
28
+ 'params': 'params'
29
+ }
30
+
31
+ def __init__(self, index_name=None, field_name=None, params=None):
32
+ r"""IndexParams
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param index_name: 索引名
37
+ :type index_name: str
38
+ :param field_name: 索引对应的列
39
+ :type field_name: str
40
+ :param params: 1、距离度量方式: \"metric_type\": (非必选,默认值:稠密向量L2,稀疏向量IP)(稀疏向量仅支持IP,标量不支持距离度量) - \"L2\" - \"IP\" - \"COSINE\" 2、支持的索引类型: (非必选,默认值:稠密向量HANNS,标量INVERTED,稀疏向量SPARSE_INVERTED_INDEX,其中Array和JSON字段不支持建立索引) \"index_type\": 向量索引: - \"HNSW\" - \"HANNS\" - \"IVF_FLAT\" 稀疏向量索引: - \"SPARSE_INVERTED_INDEX\" - \"SPARSE_WAND\" 标量索引: - \"INVERTED\"(标量字段推荐)倒排索引 3、索引的参数 (非必选) HNSW相关参数: - M:节点的最大度 - efConstruction:构建索引时每个节点邻居数 HANNS相关参数: - max_degree:节点的最大度数。较大的值提供更高的召回率但增加索引的大小和构建时间。 - search_list_size:候选列表的大小。较大的值增加构建索引的时间但提供更高的召回率。 - encoding_type: SQ/PQ,,默认SQ。 - pq_code_budget_gb_ratio:PQ 码的大小限制。较大的值提供更高的召回率但增加内存使用量,仅当encoding_type为 PQ时生效。 - beamwidth:每个搜索迭代的最大 IO 请求数与 CPU 数之间的比率,可用于提升索引性能。 IVF_FLAT相关参数 - nlist:聚类的数量 - nprobe:查询聚类的数量
41
+ :type params: dict(str, object)
42
+ """
43
+
44
+
45
+
46
+ self._index_name = None
47
+ self._field_name = None
48
+ self._params = None
49
+ self.discriminator = None
50
+
51
+ self.index_name = index_name
52
+ self.field_name = field_name
53
+ if params is not None:
54
+ self.params = params
55
+
56
+ @property
57
+ def index_name(self):
58
+ r"""Gets the index_name of this IndexParams.
59
+
60
+ 索引名
61
+
62
+ :return: The index_name of this IndexParams.
63
+ :rtype: str
64
+ """
65
+ return self._index_name
66
+
67
+ @index_name.setter
68
+ def index_name(self, index_name):
69
+ r"""Sets the index_name of this IndexParams.
70
+
71
+ 索引名
72
+
73
+ :param index_name: The index_name of this IndexParams.
74
+ :type index_name: str
75
+ """
76
+ self._index_name = index_name
77
+
78
+ @property
79
+ def field_name(self):
80
+ r"""Gets the field_name of this IndexParams.
81
+
82
+ 索引对应的列
83
+
84
+ :return: The field_name of this IndexParams.
85
+ :rtype: str
86
+ """
87
+ return self._field_name
88
+
89
+ @field_name.setter
90
+ def field_name(self, field_name):
91
+ r"""Sets the field_name of this IndexParams.
92
+
93
+ 索引对应的列
94
+
95
+ :param field_name: The field_name of this IndexParams.
96
+ :type field_name: str
97
+ """
98
+ self._field_name = field_name
99
+
100
+ @property
101
+ def params(self):
102
+ r"""Gets the params of this IndexParams.
103
+
104
+ 1、距离度量方式: \"metric_type\": (非必选,默认值:稠密向量L2,稀疏向量IP)(稀疏向量仅支持IP,标量不支持距离度量) - \"L2\" - \"IP\" - \"COSINE\" 2、支持的索引类型: (非必选,默认值:稠密向量HANNS,标量INVERTED,稀疏向量SPARSE_INVERTED_INDEX,其中Array和JSON字段不支持建立索引) \"index_type\": 向量索引: - \"HNSW\" - \"HANNS\" - \"IVF_FLAT\" 稀疏向量索引: - \"SPARSE_INVERTED_INDEX\" - \"SPARSE_WAND\" 标量索引: - \"INVERTED\"(标量字段推荐)倒排索引 3、索引的参数 (非必选) HNSW相关参数: - M:节点的最大度 - efConstruction:构建索引时每个节点邻居数 HANNS相关参数: - max_degree:节点的最大度数。较大的值提供更高的召回率但增加索引的大小和构建时间。 - search_list_size:候选列表的大小。较大的值增加构建索引的时间但提供更高的召回率。 - encoding_type: SQ/PQ,,默认SQ。 - pq_code_budget_gb_ratio:PQ 码的大小限制。较大的值提供更高的召回率但增加内存使用量,仅当encoding_type为 PQ时生效。 - beamwidth:每个搜索迭代的最大 IO 请求数与 CPU 数之间的比率,可用于提升索引性能。 IVF_FLAT相关参数 - nlist:聚类的数量 - nprobe:查询聚类的数量
105
+
106
+ :return: The params of this IndexParams.
107
+ :rtype: dict(str, object)
108
+ """
109
+ return self._params
110
+
111
+ @params.setter
112
+ def params(self, params):
113
+ r"""Sets the params of this IndexParams.
114
+
115
+ 1、距离度量方式: \"metric_type\": (非必选,默认值:稠密向量L2,稀疏向量IP)(稀疏向量仅支持IP,标量不支持距离度量) - \"L2\" - \"IP\" - \"COSINE\" 2、支持的索引类型: (非必选,默认值:稠密向量HANNS,标量INVERTED,稀疏向量SPARSE_INVERTED_INDEX,其中Array和JSON字段不支持建立索引) \"index_type\": 向量索引: - \"HNSW\" - \"HANNS\" - \"IVF_FLAT\" 稀疏向量索引: - \"SPARSE_INVERTED_INDEX\" - \"SPARSE_WAND\" 标量索引: - \"INVERTED\"(标量字段推荐)倒排索引 3、索引的参数 (非必选) HNSW相关参数: - M:节点的最大度 - efConstruction:构建索引时每个节点邻居数 HANNS相关参数: - max_degree:节点的最大度数。较大的值提供更高的召回率但增加索引的大小和构建时间。 - search_list_size:候选列表的大小。较大的值增加构建索引的时间但提供更高的召回率。 - encoding_type: SQ/PQ,,默认SQ。 - pq_code_budget_gb_ratio:PQ 码的大小限制。较大的值提供更高的召回率但增加内存使用量,仅当encoding_type为 PQ时生效。 - beamwidth:每个搜索迭代的最大 IO 请求数与 CPU 数之间的比率,可用于提升索引性能。 IVF_FLAT相关参数 - nlist:聚类的数量 - nprobe:查询聚类的数量
116
+
117
+ :param params: The params of this IndexParams.
118
+ :type params: dict(str, object)
119
+ """
120
+ self._params = params
121
+
122
+ def to_dict(self):
123
+ """Returns the model properties as a dict"""
124
+ result = {}
125
+
126
+ for attr, _ in six.iteritems(self.openapi_types):
127
+ value = getattr(self, attr)
128
+ if isinstance(value, list):
129
+ result[attr] = list(map(
130
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
131
+ value
132
+ ))
133
+ elif hasattr(value, "to_dict"):
134
+ result[attr] = value.to_dict()
135
+ elif isinstance(value, dict):
136
+ result[attr] = dict(map(
137
+ lambda item: (item[0], item[1].to_dict())
138
+ if hasattr(item[1], "to_dict") else item,
139
+ value.items()
140
+ ))
141
+ else:
142
+ if attr in self.sensitive_list:
143
+ result[attr] = "****"
144
+ else:
145
+ result[attr] = value
146
+
147
+ return result
148
+
149
+ def to_str(self):
150
+ """Returns the string representation of the model"""
151
+ import simplejson as json
152
+ if six.PY2:
153
+ import sys
154
+ reload(sys)
155
+ sys.setdefaultencoding("utf-8")
156
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
157
+
158
+ def __repr__(self):
159
+ """For `print`"""
160
+ return self.to_str()
161
+
162
+ def __eq__(self, other):
163
+ """Returns true if both objects are equal"""
164
+ if not isinstance(other, IndexParams):
165
+ return False
166
+
167
+ return self.__dict__ == other.__dict__
168
+
169
+ def __ne__(self, other):
170
+ """Returns true if both objects are not equal"""
171
+ return not self == other
@@ -0,0 +1,170 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class InsertEntitiesBody:
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
+ 'data': 'list[dict(str, object)]'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'store_name': 'store_name',
27
+ 'collection_name': 'collection_name',
28
+ 'data': 'data'
29
+ }
30
+
31
+ def __init__(self, store_name=None, collection_name=None, data=None):
32
+ r"""InsertEntitiesBody
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param store_name: 知识仓实例名称
37
+ :type store_name: str
38
+ :param collection_name: collection名称
39
+ :type collection_name: str
40
+ :param data: 满足collection的field schema
41
+ :type data: list[dict(str, object)]
42
+ """
43
+
44
+
45
+
46
+ self._store_name = None
47
+ self._collection_name = None
48
+ self._data = None
49
+ self.discriminator = None
50
+
51
+ self.store_name = store_name
52
+ self.collection_name = collection_name
53
+ self.data = data
54
+
55
+ @property
56
+ def store_name(self):
57
+ r"""Gets the store_name of this InsertEntitiesBody.
58
+
59
+ 知识仓实例名称
60
+
61
+ :return: The store_name of this InsertEntitiesBody.
62
+ :rtype: str
63
+ """
64
+ return self._store_name
65
+
66
+ @store_name.setter
67
+ def store_name(self, store_name):
68
+ r"""Sets the store_name of this InsertEntitiesBody.
69
+
70
+ 知识仓实例名称
71
+
72
+ :param store_name: The store_name of this InsertEntitiesBody.
73
+ :type store_name: str
74
+ """
75
+ self._store_name = store_name
76
+
77
+ @property
78
+ def collection_name(self):
79
+ r"""Gets the collection_name of this InsertEntitiesBody.
80
+
81
+ collection名称
82
+
83
+ :return: The collection_name of this InsertEntitiesBody.
84
+ :rtype: str
85
+ """
86
+ return self._collection_name
87
+
88
+ @collection_name.setter
89
+ def collection_name(self, collection_name):
90
+ r"""Sets the collection_name of this InsertEntitiesBody.
91
+
92
+ collection名称
93
+
94
+ :param collection_name: The collection_name of this InsertEntitiesBody.
95
+ :type collection_name: str
96
+ """
97
+ self._collection_name = collection_name
98
+
99
+ @property
100
+ def data(self):
101
+ r"""Gets the data of this InsertEntitiesBody.
102
+
103
+ 满足collection的field schema
104
+
105
+ :return: The data of this InsertEntitiesBody.
106
+ :rtype: list[dict(str, object)]
107
+ """
108
+ return self._data
109
+
110
+ @data.setter
111
+ def data(self, data):
112
+ r"""Sets the data of this InsertEntitiesBody.
113
+
114
+ 满足collection的field schema
115
+
116
+ :param data: The data of this InsertEntitiesBody.
117
+ :type data: list[dict(str, object)]
118
+ """
119
+ self._data = data
120
+
121
+ def to_dict(self):
122
+ """Returns the model properties as a dict"""
123
+ result = {}
124
+
125
+ for attr, _ in six.iteritems(self.openapi_types):
126
+ value = getattr(self, attr)
127
+ if isinstance(value, list):
128
+ result[attr] = list(map(
129
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
130
+ value
131
+ ))
132
+ elif hasattr(value, "to_dict"):
133
+ result[attr] = value.to_dict()
134
+ elif isinstance(value, dict):
135
+ result[attr] = dict(map(
136
+ lambda item: (item[0], item[1].to_dict())
137
+ if hasattr(item[1], "to_dict") else item,
138
+ value.items()
139
+ ))
140
+ else:
141
+ if attr in self.sensitive_list:
142
+ result[attr] = "****"
143
+ else:
144
+ result[attr] = value
145
+
146
+ return result
147
+
148
+ def to_str(self):
149
+ """Returns the string representation of the model"""
150
+ import simplejson as json
151
+ if six.PY2:
152
+ import sys
153
+ reload(sys)
154
+ sys.setdefaultencoding("utf-8")
155
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
156
+
157
+ def __repr__(self):
158
+ """For `print`"""
159
+ return self.to_str()
160
+
161
+ def __eq__(self, other):
162
+ """Returns true if both objects are equal"""
163
+ if not isinstance(other, InsertEntitiesBody):
164
+ return False
165
+
166
+ return self.__dict__ == other.__dict__
167
+
168
+ def __ne__(self, other):
169
+ """Returns true if both objects are not equal"""
170
+ 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 InsertEntitiesRequest:
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': 'InsertEntitiesBody'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, body=None):
28
+ r"""InsertEntitiesRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param body: Body of the InsertEntitiesRequest
33
+ :type body: :class:`huaweicloudsdkdwr.v1.InsertEntitiesBody`
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 InsertEntitiesRequest.
47
+
48
+ :return: The body of this InsertEntitiesRequest.
49
+ :rtype: :class:`huaweicloudsdkdwr.v1.InsertEntitiesBody`
50
+ """
51
+ return self._body
52
+
53
+ @body.setter
54
+ def body(self, body):
55
+ r"""Sets the body of this InsertEntitiesRequest.
56
+
57
+ :param body: The body of this InsertEntitiesRequest.
58
+ :type body: :class:`huaweicloudsdkdwr.v1.InsertEntitiesBody`
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, InsertEntitiesRequest):
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