huaweicloudsdkdwr 3.1.151__py2.py3-none-any.whl → 3.1.153__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.
- huaweicloudsdkdwr/v1/__init__.py +91 -0
- huaweicloudsdkdwr/v1/dwr_async_client.py +1519 -0
- huaweicloudsdkdwr/v1/dwr_client.py +1516 -0
- huaweicloudsdkdwr/v1/model/__init__.py +88 -0
- huaweicloudsdkdwr/v1/model/build_progress.py +231 -0
- huaweicloudsdkdwr/v1/model/charge_info.py +230 -0
- huaweicloudsdkdwr/v1/model/collection_base_info.py +142 -0
- huaweicloudsdkdwr/v1/model/create_collection_body.py +281 -0
- huaweicloudsdkdwr/v1/model/create_collection_request.py +111 -0
- huaweicloudsdkdwr/v1/model/create_collection_response.py +145 -0
- huaweicloudsdkdwr/v1/model/create_index_body.py +166 -0
- huaweicloudsdkdwr/v1/model/create_index_request.py +111 -0
- huaweicloudsdkdwr/v1/model/create_index_response.py +145 -0
- huaweicloudsdkdwr/v1/model/create_store_body.py +248 -0
- huaweicloudsdkdwr/v1/model/create_store_data.py +335 -0
- huaweicloudsdkdwr/v1/model/create_store_request.py +111 -0
- huaweicloudsdkdwr/v1/model/create_store_response.py +170 -0
- huaweicloudsdkdwr/v1/model/decribe_collection_data.py +315 -0
- huaweicloudsdkdwr/v1/model/delete_collection_request.py +111 -0
- huaweicloudsdkdwr/v1/model/delete_collection_response.py +145 -0
- huaweicloudsdkdwr/v1/model/delete_entities_body.py +170 -0
- huaweicloudsdkdwr/v1/model/delete_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/delete_entities_response.py +145 -0
- huaweicloudsdkdwr/v1/model/delete_index_body.py +170 -0
- huaweicloudsdkdwr/v1/model/delete_index_request.py +111 -0
- huaweicloudsdkdwr/v1/model/delete_index_response.py +145 -0
- huaweicloudsdkdwr/v1/model/delete_store_data.py +114 -0
- huaweicloudsdkdwr/v1/model/delete_store_request.py +111 -0
- huaweicloudsdkdwr/v1/model/delete_store_response.py +170 -0
- huaweicloudsdkdwr/v1/model/describe_collection_request.py +111 -0
- huaweicloudsdkdwr/v1/model/describe_collection_response.py +170 -0
- huaweicloudsdkdwr/v1/model/describe_index_body.py +170 -0
- huaweicloudsdkdwr/v1/model/describe_index_request.py +111 -0
- huaweicloudsdkdwr/v1/model/describe_index_response.py +170 -0
- huaweicloudsdkdwr/v1/model/describe_index_respose_data.py +171 -0
- huaweicloudsdkdwr/v1/model/describe_job_body.py +114 -0
- huaweicloudsdkdwr/v1/model/describe_job_request.py +111 -0
- huaweicloudsdkdwr/v1/model/describe_job_response.py +170 -0
- huaweicloudsdkdwr/v1/model/describe_store_data.py +364 -0
- huaweicloudsdkdwr/v1/model/describe_store_request.py +111 -0
- huaweicloudsdkdwr/v1/model/describe_store_response.py +170 -0
- huaweicloudsdkdwr/v1/model/field.py +229 -0
- huaweicloudsdkdwr/v1/model/field_data.py +198 -0
- huaweicloudsdkdwr/v1/model/flavor.py +142 -0
- huaweicloudsdkdwr/v1/model/get_index_progress_body.py +170 -0
- huaweicloudsdkdwr/v1/model/get_index_progress_response_data.py +167 -0
- huaweicloudsdkdwr/v1/model/get_progress_request.py +111 -0
- huaweicloudsdkdwr/v1/model/get_progress_response.py +170 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_body.py +278 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_request.py +111 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_response.py +174 -0
- huaweicloudsdkdwr/v1/model/index_desc.py +200 -0
- huaweicloudsdkdwr/v1/model/index_params.py +171 -0
- huaweicloudsdkdwr/v1/model/insert_entities_body.py +170 -0
- huaweicloudsdkdwr/v1/model/insert_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/insert_entities_response.py +170 -0
- huaweicloudsdkdwr/v1/model/insert_entities_response_data.py +143 -0
- huaweicloudsdkdwr/v1/model/job_data.py +316 -0
- huaweicloudsdkdwr/v1/model/list_collection_data.py +143 -0
- huaweicloudsdkdwr/v1/model/list_collection_details.py +260 -0
- huaweicloudsdkdwr/v1/model/list_collections_body.py +143 -0
- huaweicloudsdkdwr/v1/model/list_collections_request.py +111 -0
- huaweicloudsdkdwr/v1/model/list_collections_response.py +170 -0
- huaweicloudsdkdwr/v1/model/list_jobs_data.py +115 -0
- huaweicloudsdkdwr/v1/model/list_jobs_request.py +231 -0
- huaweicloudsdkdwr/v1/model/list_jobs_response.py +170 -0
- huaweicloudsdkdwr/v1/model/list_stores_request.py +84 -0
- huaweicloudsdkdwr/v1/model/list_stores_response.py +174 -0
- huaweicloudsdkdwr/v1/model/load_collection_body.py +142 -0
- huaweicloudsdkdwr/v1/model/load_collection_request.py +111 -0
- huaweicloudsdkdwr/v1/model/load_collection_response.py +145 -0
- huaweicloudsdkdwr/v1/model/primary_field.py +142 -0
- huaweicloudsdkdwr/v1/model/query_entities_body.py +257 -0
- huaweicloudsdkdwr/v1/model/query_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/query_entities_response.py +174 -0
- huaweicloudsdkdwr/v1/model/release_collection_request.py +111 -0
- huaweicloudsdkdwr/v1/model/release_collection_response.py +145 -0
- huaweicloudsdkdwr/v1/model/rerank.py +143 -0
- huaweicloudsdkdwr/v1/model/search_entities_body.py +343 -0
- huaweicloudsdkdwr/v1/model/search_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/search_entities_response.py +174 -0
- huaweicloudsdkdwr/v1/model/store_info.py +114 -0
- huaweicloudsdkdwr/v1/model/sub_search.py +258 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_body.py +170 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_response.py +170 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_response_data.py +143 -0
- huaweicloudsdkdwr/v1/region/__init__.py +0 -0
- huaweicloudsdkdwr/v1/region/dwr_region.py +37 -0
- huaweicloudsdkdwr/v3/region/dwr_region.py +6 -0
- {huaweicloudsdkdwr-3.1.151.dist-info → huaweicloudsdkdwr-3.1.153.dist-info}/METADATA +2 -2
- huaweicloudsdkdwr-3.1.153.dist-info/RECORD +169 -0
- huaweicloudsdkdwr-3.1.151.dist-info/RECORD +0 -80
- {huaweicloudsdkdwr-3.1.151.dist-info → huaweicloudsdkdwr-3.1.153.dist-info}/LICENSE +0 -0
- {huaweicloudsdkdwr-3.1.151.dist-info → huaweicloudsdkdwr-3.1.153.dist-info}/WHEEL +0 -0
- {huaweicloudsdkdwr-3.1.151.dist-info → huaweicloudsdkdwr-3.1.153.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class StoreInfo:
|
|
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
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'store_name': 'store_name'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, store_name=None):
|
|
28
|
+
r"""StoreInfo
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param store_name: 知识仓实例名称,全域唯一。 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。
|
|
33
|
+
:type store_name: str
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
self._store_name = None
|
|
39
|
+
self.discriminator = None
|
|
40
|
+
|
|
41
|
+
self.store_name = store_name
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def store_name(self):
|
|
45
|
+
r"""Gets the store_name of this StoreInfo.
|
|
46
|
+
|
|
47
|
+
知识仓实例名称,全域唯一。 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。
|
|
48
|
+
|
|
49
|
+
:return: The store_name of this StoreInfo.
|
|
50
|
+
:rtype: str
|
|
51
|
+
"""
|
|
52
|
+
return self._store_name
|
|
53
|
+
|
|
54
|
+
@store_name.setter
|
|
55
|
+
def store_name(self, store_name):
|
|
56
|
+
r"""Sets the store_name of this StoreInfo.
|
|
57
|
+
|
|
58
|
+
知识仓实例名称,全域唯一。 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。
|
|
59
|
+
|
|
60
|
+
:param store_name: The store_name of this StoreInfo.
|
|
61
|
+
:type store_name: str
|
|
62
|
+
"""
|
|
63
|
+
self._store_name = store_name
|
|
64
|
+
|
|
65
|
+
def to_dict(self):
|
|
66
|
+
"""Returns the model properties as a dict"""
|
|
67
|
+
result = {}
|
|
68
|
+
|
|
69
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
70
|
+
value = getattr(self, attr)
|
|
71
|
+
if isinstance(value, list):
|
|
72
|
+
result[attr] = list(map(
|
|
73
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
74
|
+
value
|
|
75
|
+
))
|
|
76
|
+
elif hasattr(value, "to_dict"):
|
|
77
|
+
result[attr] = value.to_dict()
|
|
78
|
+
elif isinstance(value, dict):
|
|
79
|
+
result[attr] = dict(map(
|
|
80
|
+
lambda item: (item[0], item[1].to_dict())
|
|
81
|
+
if hasattr(item[1], "to_dict") else item,
|
|
82
|
+
value.items()
|
|
83
|
+
))
|
|
84
|
+
else:
|
|
85
|
+
if attr in self.sensitive_list:
|
|
86
|
+
result[attr] = "****"
|
|
87
|
+
else:
|
|
88
|
+
result[attr] = value
|
|
89
|
+
|
|
90
|
+
return result
|
|
91
|
+
|
|
92
|
+
def to_str(self):
|
|
93
|
+
"""Returns the string representation of the model"""
|
|
94
|
+
import simplejson as json
|
|
95
|
+
if six.PY2:
|
|
96
|
+
import sys
|
|
97
|
+
reload(sys)
|
|
98
|
+
sys.setdefaultencoding("utf-8")
|
|
99
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
100
|
+
|
|
101
|
+
def __repr__(self):
|
|
102
|
+
"""For `print`"""
|
|
103
|
+
return self.to_str()
|
|
104
|
+
|
|
105
|
+
def __eq__(self, other):
|
|
106
|
+
"""Returns true if both objects are equal"""
|
|
107
|
+
if not isinstance(other, StoreInfo):
|
|
108
|
+
return False
|
|
109
|
+
|
|
110
|
+
return self.__dict__ == other.__dict__
|
|
111
|
+
|
|
112
|
+
def __ne__(self, other):
|
|
113
|
+
"""Returns true if both objects are not equal"""
|
|
114
|
+
return not self == other
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SubSearch:
|
|
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
|
+
'vector_field': 'str',
|
|
21
|
+
'vector': 'list[object]',
|
|
22
|
+
'top_k': 'int',
|
|
23
|
+
'offset': 'int',
|
|
24
|
+
'filter': 'str',
|
|
25
|
+
'params': 'dict(str, object)'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
attribute_map = {
|
|
29
|
+
'vector_field': 'vector_field',
|
|
30
|
+
'vector': 'vector',
|
|
31
|
+
'top_k': 'top_k',
|
|
32
|
+
'offset': 'offset',
|
|
33
|
+
'filter': 'filter',
|
|
34
|
+
'params': 'params'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
def __init__(self, vector_field=None, vector=None, top_k=None, offset=None, filter=None, params=None):
|
|
38
|
+
r"""SubSearch
|
|
39
|
+
|
|
40
|
+
The model defined in huaweicloud sdk
|
|
41
|
+
|
|
42
|
+
:param vector_field: 指定向量列名称
|
|
43
|
+
:type vector_field: str
|
|
44
|
+
:param vector: 向量的数据,稠密向量是float,稀疏向量对应其他类型
|
|
45
|
+
:type vector: list[object]
|
|
46
|
+
:param top_k: 返回个数限制
|
|
47
|
+
:type top_k: int
|
|
48
|
+
:param offset: 搜索结果中要跳过的entity数。
|
|
49
|
+
:type offset: int
|
|
50
|
+
:param filter: 标量过滤条件
|
|
51
|
+
:type filter: str
|
|
52
|
+
:param params: 向量查询自定义参数 1、稀疏向量: cut_off_frequency: 通过停用词出现频率决定是否作为查询结果 2、稠密向量: - ef:每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。 - search_list: 候选列表的大小,越大召回率越高,但性能会下降。
|
|
53
|
+
:type params: dict(str, object)
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
self._vector_field = None
|
|
59
|
+
self._vector = None
|
|
60
|
+
self._top_k = None
|
|
61
|
+
self._offset = None
|
|
62
|
+
self._filter = None
|
|
63
|
+
self._params = None
|
|
64
|
+
self.discriminator = None
|
|
65
|
+
|
|
66
|
+
self.vector_field = vector_field
|
|
67
|
+
self.vector = vector
|
|
68
|
+
if top_k is not None:
|
|
69
|
+
self.top_k = top_k
|
|
70
|
+
if offset is not None:
|
|
71
|
+
self.offset = offset
|
|
72
|
+
if filter is not None:
|
|
73
|
+
self.filter = filter
|
|
74
|
+
if params is not None:
|
|
75
|
+
self.params = params
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def vector_field(self):
|
|
79
|
+
r"""Gets the vector_field of this SubSearch.
|
|
80
|
+
|
|
81
|
+
指定向量列名称
|
|
82
|
+
|
|
83
|
+
:return: The vector_field of this SubSearch.
|
|
84
|
+
:rtype: str
|
|
85
|
+
"""
|
|
86
|
+
return self._vector_field
|
|
87
|
+
|
|
88
|
+
@vector_field.setter
|
|
89
|
+
def vector_field(self, vector_field):
|
|
90
|
+
r"""Sets the vector_field of this SubSearch.
|
|
91
|
+
|
|
92
|
+
指定向量列名称
|
|
93
|
+
|
|
94
|
+
:param vector_field: The vector_field of this SubSearch.
|
|
95
|
+
:type vector_field: str
|
|
96
|
+
"""
|
|
97
|
+
self._vector_field = vector_field
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def vector(self):
|
|
101
|
+
r"""Gets the vector of this SubSearch.
|
|
102
|
+
|
|
103
|
+
向量的数据,稠密向量是float,稀疏向量对应其他类型
|
|
104
|
+
|
|
105
|
+
:return: The vector of this SubSearch.
|
|
106
|
+
:rtype: list[object]
|
|
107
|
+
"""
|
|
108
|
+
return self._vector
|
|
109
|
+
|
|
110
|
+
@vector.setter
|
|
111
|
+
def vector(self, vector):
|
|
112
|
+
r"""Sets the vector of this SubSearch.
|
|
113
|
+
|
|
114
|
+
向量的数据,稠密向量是float,稀疏向量对应其他类型
|
|
115
|
+
|
|
116
|
+
:param vector: The vector of this SubSearch.
|
|
117
|
+
:type vector: list[object]
|
|
118
|
+
"""
|
|
119
|
+
self._vector = vector
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def top_k(self):
|
|
123
|
+
r"""Gets the top_k of this SubSearch.
|
|
124
|
+
|
|
125
|
+
返回个数限制
|
|
126
|
+
|
|
127
|
+
:return: The top_k of this SubSearch.
|
|
128
|
+
:rtype: int
|
|
129
|
+
"""
|
|
130
|
+
return self._top_k
|
|
131
|
+
|
|
132
|
+
@top_k.setter
|
|
133
|
+
def top_k(self, top_k):
|
|
134
|
+
r"""Sets the top_k of this SubSearch.
|
|
135
|
+
|
|
136
|
+
返回个数限制
|
|
137
|
+
|
|
138
|
+
:param top_k: The top_k of this SubSearch.
|
|
139
|
+
:type top_k: int
|
|
140
|
+
"""
|
|
141
|
+
self._top_k = top_k
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def offset(self):
|
|
145
|
+
r"""Gets the offset of this SubSearch.
|
|
146
|
+
|
|
147
|
+
搜索结果中要跳过的entity数。
|
|
148
|
+
|
|
149
|
+
:return: The offset of this SubSearch.
|
|
150
|
+
:rtype: int
|
|
151
|
+
"""
|
|
152
|
+
return self._offset
|
|
153
|
+
|
|
154
|
+
@offset.setter
|
|
155
|
+
def offset(self, offset):
|
|
156
|
+
r"""Sets the offset of this SubSearch.
|
|
157
|
+
|
|
158
|
+
搜索结果中要跳过的entity数。
|
|
159
|
+
|
|
160
|
+
:param offset: The offset of this SubSearch.
|
|
161
|
+
:type offset: int
|
|
162
|
+
"""
|
|
163
|
+
self._offset = offset
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def filter(self):
|
|
167
|
+
r"""Gets the filter of this SubSearch.
|
|
168
|
+
|
|
169
|
+
标量过滤条件
|
|
170
|
+
|
|
171
|
+
:return: The filter of this SubSearch.
|
|
172
|
+
:rtype: str
|
|
173
|
+
"""
|
|
174
|
+
return self._filter
|
|
175
|
+
|
|
176
|
+
@filter.setter
|
|
177
|
+
def filter(self, filter):
|
|
178
|
+
r"""Sets the filter of this SubSearch.
|
|
179
|
+
|
|
180
|
+
标量过滤条件
|
|
181
|
+
|
|
182
|
+
:param filter: The filter of this SubSearch.
|
|
183
|
+
:type filter: str
|
|
184
|
+
"""
|
|
185
|
+
self._filter = filter
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def params(self):
|
|
189
|
+
r"""Gets the params of this SubSearch.
|
|
190
|
+
|
|
191
|
+
向量查询自定义参数 1、稀疏向量: cut_off_frequency: 通过停用词出现频率决定是否作为查询结果 2、稠密向量: - ef:每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。 - search_list: 候选列表的大小,越大召回率越高,但性能会下降。
|
|
192
|
+
|
|
193
|
+
:return: The params of this SubSearch.
|
|
194
|
+
:rtype: dict(str, object)
|
|
195
|
+
"""
|
|
196
|
+
return self._params
|
|
197
|
+
|
|
198
|
+
@params.setter
|
|
199
|
+
def params(self, params):
|
|
200
|
+
r"""Sets the params of this SubSearch.
|
|
201
|
+
|
|
202
|
+
向量查询自定义参数 1、稀疏向量: cut_off_frequency: 通过停用词出现频率决定是否作为查询结果 2、稠密向量: - ef:每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。 - search_list: 候选列表的大小,越大召回率越高,但性能会下降。
|
|
203
|
+
|
|
204
|
+
:param params: The params of this SubSearch.
|
|
205
|
+
:type params: dict(str, object)
|
|
206
|
+
"""
|
|
207
|
+
self._params = params
|
|
208
|
+
|
|
209
|
+
def to_dict(self):
|
|
210
|
+
"""Returns the model properties as a dict"""
|
|
211
|
+
result = {}
|
|
212
|
+
|
|
213
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
214
|
+
value = getattr(self, attr)
|
|
215
|
+
if isinstance(value, list):
|
|
216
|
+
result[attr] = list(map(
|
|
217
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
218
|
+
value
|
|
219
|
+
))
|
|
220
|
+
elif hasattr(value, "to_dict"):
|
|
221
|
+
result[attr] = value.to_dict()
|
|
222
|
+
elif isinstance(value, dict):
|
|
223
|
+
result[attr] = dict(map(
|
|
224
|
+
lambda item: (item[0], item[1].to_dict())
|
|
225
|
+
if hasattr(item[1], "to_dict") else item,
|
|
226
|
+
value.items()
|
|
227
|
+
))
|
|
228
|
+
else:
|
|
229
|
+
if attr in self.sensitive_list:
|
|
230
|
+
result[attr] = "****"
|
|
231
|
+
else:
|
|
232
|
+
result[attr] = value
|
|
233
|
+
|
|
234
|
+
return result
|
|
235
|
+
|
|
236
|
+
def to_str(self):
|
|
237
|
+
"""Returns the string representation of the model"""
|
|
238
|
+
import simplejson as json
|
|
239
|
+
if six.PY2:
|
|
240
|
+
import sys
|
|
241
|
+
reload(sys)
|
|
242
|
+
sys.setdefaultencoding("utf-8")
|
|
243
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
244
|
+
|
|
245
|
+
def __repr__(self):
|
|
246
|
+
"""For `print`"""
|
|
247
|
+
return self.to_str()
|
|
248
|
+
|
|
249
|
+
def __eq__(self, other):
|
|
250
|
+
"""Returns true if both objects are equal"""
|
|
251
|
+
if not isinstance(other, SubSearch):
|
|
252
|
+
return False
|
|
253
|
+
|
|
254
|
+
return self.__dict__ == other.__dict__
|
|
255
|
+
|
|
256
|
+
def __ne__(self, other):
|
|
257
|
+
"""Returns true if both objects are not equal"""
|
|
258
|
+
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 UpsertEntitiesBody:
|
|
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"""UpsertEntitiesBody
|
|
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 UpsertEntitiesBody.
|
|
58
|
+
|
|
59
|
+
知识仓实例名称
|
|
60
|
+
|
|
61
|
+
:return: The store_name of this UpsertEntitiesBody.
|
|
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 UpsertEntitiesBody.
|
|
69
|
+
|
|
70
|
+
知识仓实例名称
|
|
71
|
+
|
|
72
|
+
:param store_name: The store_name of this UpsertEntitiesBody.
|
|
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 UpsertEntitiesBody.
|
|
80
|
+
|
|
81
|
+
collection名称
|
|
82
|
+
|
|
83
|
+
:return: The collection_name of this UpsertEntitiesBody.
|
|
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 UpsertEntitiesBody.
|
|
91
|
+
|
|
92
|
+
collection名称
|
|
93
|
+
|
|
94
|
+
:param collection_name: The collection_name of this UpsertEntitiesBody.
|
|
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 UpsertEntitiesBody.
|
|
102
|
+
|
|
103
|
+
满足collection的field schema
|
|
104
|
+
|
|
105
|
+
:return: The data of this UpsertEntitiesBody.
|
|
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 UpsertEntitiesBody.
|
|
113
|
+
|
|
114
|
+
满足collection的field schema
|
|
115
|
+
|
|
116
|
+
:param data: The data of this UpsertEntitiesBody.
|
|
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, UpsertEntitiesBody):
|
|
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 UpsertEntitiesRequest:
|
|
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': 'UpsertEntitiesBody'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'body': 'body'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, body=None):
|
|
28
|
+
r"""UpsertEntitiesRequest
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param body: Body of the UpsertEntitiesRequest
|
|
33
|
+
:type body: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
|
|
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 UpsertEntitiesRequest.
|
|
47
|
+
|
|
48
|
+
:return: The body of this UpsertEntitiesRequest.
|
|
49
|
+
:rtype: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
|
|
50
|
+
"""
|
|
51
|
+
return self._body
|
|
52
|
+
|
|
53
|
+
@body.setter
|
|
54
|
+
def body(self, body):
|
|
55
|
+
r"""Sets the body of this UpsertEntitiesRequest.
|
|
56
|
+
|
|
57
|
+
:param body: The body of this UpsertEntitiesRequest.
|
|
58
|
+
:type body: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
|
|
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, UpsertEntitiesRequest):
|
|
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
|