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.
- 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.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/METADATA +2 -2
- huaweicloudsdkdwr-3.1.152.dist-info/RECORD +169 -0
- huaweicloudsdkdwr-3.1.150.dist-info/RECORD +0 -80
- {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/LICENSE +0 -0
- {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/WHEEL +0 -0
- {huaweicloudsdkdwr-3.1.150.dist-info → huaweicloudsdkdwr-3.1.152.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Field:
|
|
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
|
+
'field_name': 'str',
|
|
21
|
+
'data_type': 'str',
|
|
22
|
+
'element_data_type': 'str',
|
|
23
|
+
'element_type_params': 'dict(str, object)',
|
|
24
|
+
'partition_key': 'bool'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
attribute_map = {
|
|
28
|
+
'field_name': 'field_name',
|
|
29
|
+
'data_type': 'data_type',
|
|
30
|
+
'element_data_type': 'element_data_type',
|
|
31
|
+
'element_type_params': 'element_type_params',
|
|
32
|
+
'partition_key': 'partition_key'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def __init__(self, field_name=None, data_type=None, element_data_type=None, element_type_params=None, partition_key=None):
|
|
36
|
+
r"""Field
|
|
37
|
+
|
|
38
|
+
The model defined in huaweicloud sdk
|
|
39
|
+
|
|
40
|
+
:param field_name: 要在集合中创建的字段名称
|
|
41
|
+
:type field_name: str
|
|
42
|
+
:param data_type: 字段的数据类型;“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”,“Array”,“JSON”,\"FloatVector\", \"SparseFloatVector\"
|
|
43
|
+
:type data_type: str
|
|
44
|
+
:param element_data_type: 数组内部的数据类型,当前支持“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”
|
|
45
|
+
:type element_data_type: str
|
|
46
|
+
:param element_type_params: 如果field为FloatVector类型向量字段,则必须设定维度参数dim: 向量字段的维度,最大支持32,768维 如果field为String类型字段或Array 元素类型为String类型,则可设定字段值最大长度max_length,默认为256 如果field为Array类型字段,则可设定数组最大容量max_capacity,默认为32
|
|
47
|
+
:type element_type_params: dict(str, object)
|
|
48
|
+
:param partition_key: 该字段是否为partition_key,默认false。(如果partition_key为true,data_type仅支持String与Int64);最多只有一个field的partition_key设置为true
|
|
49
|
+
:type partition_key: bool
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
self._field_name = None
|
|
55
|
+
self._data_type = None
|
|
56
|
+
self._element_data_type = None
|
|
57
|
+
self._element_type_params = None
|
|
58
|
+
self._partition_key = None
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
self.field_name = field_name
|
|
62
|
+
self.data_type = data_type
|
|
63
|
+
if element_data_type is not None:
|
|
64
|
+
self.element_data_type = element_data_type
|
|
65
|
+
if element_type_params is not None:
|
|
66
|
+
self.element_type_params = element_type_params
|
|
67
|
+
if partition_key is not None:
|
|
68
|
+
self.partition_key = partition_key
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def field_name(self):
|
|
72
|
+
r"""Gets the field_name of this Field.
|
|
73
|
+
|
|
74
|
+
要在集合中创建的字段名称
|
|
75
|
+
|
|
76
|
+
:return: The field_name of this Field.
|
|
77
|
+
:rtype: str
|
|
78
|
+
"""
|
|
79
|
+
return self._field_name
|
|
80
|
+
|
|
81
|
+
@field_name.setter
|
|
82
|
+
def field_name(self, field_name):
|
|
83
|
+
r"""Sets the field_name of this Field.
|
|
84
|
+
|
|
85
|
+
要在集合中创建的字段名称
|
|
86
|
+
|
|
87
|
+
:param field_name: The field_name of this Field.
|
|
88
|
+
:type field_name: str
|
|
89
|
+
"""
|
|
90
|
+
self._field_name = field_name
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def data_type(self):
|
|
94
|
+
r"""Gets the data_type of this Field.
|
|
95
|
+
|
|
96
|
+
字段的数据类型;“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”,“Array”,“JSON”,\"FloatVector\", \"SparseFloatVector\"
|
|
97
|
+
|
|
98
|
+
:return: The data_type of this Field.
|
|
99
|
+
:rtype: str
|
|
100
|
+
"""
|
|
101
|
+
return self._data_type
|
|
102
|
+
|
|
103
|
+
@data_type.setter
|
|
104
|
+
def data_type(self, data_type):
|
|
105
|
+
r"""Sets the data_type of this Field.
|
|
106
|
+
|
|
107
|
+
字段的数据类型;“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”,“Array”,“JSON”,\"FloatVector\", \"SparseFloatVector\"
|
|
108
|
+
|
|
109
|
+
:param data_type: The data_type of this Field.
|
|
110
|
+
:type data_type: str
|
|
111
|
+
"""
|
|
112
|
+
self._data_type = data_type
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def element_data_type(self):
|
|
116
|
+
r"""Gets the element_data_type of this Field.
|
|
117
|
+
|
|
118
|
+
数组内部的数据类型,当前支持“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”
|
|
119
|
+
|
|
120
|
+
:return: The element_data_type of this Field.
|
|
121
|
+
:rtype: str
|
|
122
|
+
"""
|
|
123
|
+
return self._element_data_type
|
|
124
|
+
|
|
125
|
+
@element_data_type.setter
|
|
126
|
+
def element_data_type(self, element_data_type):
|
|
127
|
+
r"""Sets the element_data_type of this Field.
|
|
128
|
+
|
|
129
|
+
数组内部的数据类型,当前支持“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”
|
|
130
|
+
|
|
131
|
+
:param element_data_type: The element_data_type of this Field.
|
|
132
|
+
:type element_data_type: str
|
|
133
|
+
"""
|
|
134
|
+
self._element_data_type = element_data_type
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def element_type_params(self):
|
|
138
|
+
r"""Gets the element_type_params of this Field.
|
|
139
|
+
|
|
140
|
+
如果field为FloatVector类型向量字段,则必须设定维度参数dim: 向量字段的维度,最大支持32,768维 如果field为String类型字段或Array 元素类型为String类型,则可设定字段值最大长度max_length,默认为256 如果field为Array类型字段,则可设定数组最大容量max_capacity,默认为32
|
|
141
|
+
|
|
142
|
+
:return: The element_type_params of this Field.
|
|
143
|
+
:rtype: dict(str, object)
|
|
144
|
+
"""
|
|
145
|
+
return self._element_type_params
|
|
146
|
+
|
|
147
|
+
@element_type_params.setter
|
|
148
|
+
def element_type_params(self, element_type_params):
|
|
149
|
+
r"""Sets the element_type_params of this Field.
|
|
150
|
+
|
|
151
|
+
如果field为FloatVector类型向量字段,则必须设定维度参数dim: 向量字段的维度,最大支持32,768维 如果field为String类型字段或Array 元素类型为String类型,则可设定字段值最大长度max_length,默认为256 如果field为Array类型字段,则可设定数组最大容量max_capacity,默认为32
|
|
152
|
+
|
|
153
|
+
:param element_type_params: The element_type_params of this Field.
|
|
154
|
+
:type element_type_params: dict(str, object)
|
|
155
|
+
"""
|
|
156
|
+
self._element_type_params = element_type_params
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
def partition_key(self):
|
|
160
|
+
r"""Gets the partition_key of this Field.
|
|
161
|
+
|
|
162
|
+
该字段是否为partition_key,默认false。(如果partition_key为true,data_type仅支持String与Int64);最多只有一个field的partition_key设置为true
|
|
163
|
+
|
|
164
|
+
:return: The partition_key of this Field.
|
|
165
|
+
:rtype: bool
|
|
166
|
+
"""
|
|
167
|
+
return self._partition_key
|
|
168
|
+
|
|
169
|
+
@partition_key.setter
|
|
170
|
+
def partition_key(self, partition_key):
|
|
171
|
+
r"""Sets the partition_key of this Field.
|
|
172
|
+
|
|
173
|
+
该字段是否为partition_key,默认false。(如果partition_key为true,data_type仅支持String与Int64);最多只有一个field的partition_key设置为true
|
|
174
|
+
|
|
175
|
+
:param partition_key: The partition_key of this Field.
|
|
176
|
+
:type partition_key: bool
|
|
177
|
+
"""
|
|
178
|
+
self._partition_key = partition_key
|
|
179
|
+
|
|
180
|
+
def to_dict(self):
|
|
181
|
+
"""Returns the model properties as a dict"""
|
|
182
|
+
result = {}
|
|
183
|
+
|
|
184
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
185
|
+
value = getattr(self, attr)
|
|
186
|
+
if isinstance(value, list):
|
|
187
|
+
result[attr] = list(map(
|
|
188
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
189
|
+
value
|
|
190
|
+
))
|
|
191
|
+
elif hasattr(value, "to_dict"):
|
|
192
|
+
result[attr] = value.to_dict()
|
|
193
|
+
elif isinstance(value, dict):
|
|
194
|
+
result[attr] = dict(map(
|
|
195
|
+
lambda item: (item[0], item[1].to_dict())
|
|
196
|
+
if hasattr(item[1], "to_dict") else item,
|
|
197
|
+
value.items()
|
|
198
|
+
))
|
|
199
|
+
else:
|
|
200
|
+
if attr in self.sensitive_list:
|
|
201
|
+
result[attr] = "****"
|
|
202
|
+
else:
|
|
203
|
+
result[attr] = value
|
|
204
|
+
|
|
205
|
+
return result
|
|
206
|
+
|
|
207
|
+
def to_str(self):
|
|
208
|
+
"""Returns the string representation of the model"""
|
|
209
|
+
import simplejson as json
|
|
210
|
+
if six.PY2:
|
|
211
|
+
import sys
|
|
212
|
+
reload(sys)
|
|
213
|
+
sys.setdefaultencoding("utf-8")
|
|
214
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
215
|
+
|
|
216
|
+
def __repr__(self):
|
|
217
|
+
"""For `print`"""
|
|
218
|
+
return self.to_str()
|
|
219
|
+
|
|
220
|
+
def __eq__(self, other):
|
|
221
|
+
"""Returns true if both objects are equal"""
|
|
222
|
+
if not isinstance(other, Field):
|
|
223
|
+
return False
|
|
224
|
+
|
|
225
|
+
return self.__dict__ == other.__dict__
|
|
226
|
+
|
|
227
|
+
def __ne__(self, other):
|
|
228
|
+
"""Returns true if both objects are not equal"""
|
|
229
|
+
return not self == other
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FieldData:
|
|
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
|
+
'field_name': 'str',
|
|
21
|
+
'data_type': 'str',
|
|
22
|
+
'primary_key': 'bool',
|
|
23
|
+
'partition_key': 'bool'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
attribute_map = {
|
|
27
|
+
'field_name': 'field_name',
|
|
28
|
+
'data_type': 'data_type',
|
|
29
|
+
'primary_key': 'primary_key',
|
|
30
|
+
'partition_key': 'partition_key'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
def __init__(self, field_name=None, data_type=None, primary_key=None, partition_key=None):
|
|
34
|
+
r"""FieldData
|
|
35
|
+
|
|
36
|
+
The model defined in huaweicloud sdk
|
|
37
|
+
|
|
38
|
+
:param field_name: 要在集合中创建的字段名称
|
|
39
|
+
:type field_name: str
|
|
40
|
+
:param data_type: 字段的数据类型;“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”,“Array”,“JSON”,\"FloatVector\",\"SparseFloatVector\"。注意向量类型后会添加维度信息,如\"SparseFloatVector(256)
|
|
41
|
+
:type data_type: str
|
|
42
|
+
:param primary_key: 是否是主键字段
|
|
43
|
+
:type primary_key: bool
|
|
44
|
+
:param partition_key: 是否是partition key
|
|
45
|
+
:type partition_key: bool
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
self._field_name = None
|
|
51
|
+
self._data_type = None
|
|
52
|
+
self._primary_key = None
|
|
53
|
+
self._partition_key = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
|
|
56
|
+
self.field_name = field_name
|
|
57
|
+
self.data_type = data_type
|
|
58
|
+
self.primary_key = primary_key
|
|
59
|
+
self.partition_key = partition_key
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def field_name(self):
|
|
63
|
+
r"""Gets the field_name of this FieldData.
|
|
64
|
+
|
|
65
|
+
要在集合中创建的字段名称
|
|
66
|
+
|
|
67
|
+
:return: The field_name of this FieldData.
|
|
68
|
+
:rtype: str
|
|
69
|
+
"""
|
|
70
|
+
return self._field_name
|
|
71
|
+
|
|
72
|
+
@field_name.setter
|
|
73
|
+
def field_name(self, field_name):
|
|
74
|
+
r"""Sets the field_name of this FieldData.
|
|
75
|
+
|
|
76
|
+
要在集合中创建的字段名称
|
|
77
|
+
|
|
78
|
+
:param field_name: The field_name of this FieldData.
|
|
79
|
+
:type field_name: str
|
|
80
|
+
"""
|
|
81
|
+
self._field_name = field_name
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def data_type(self):
|
|
85
|
+
r"""Gets the data_type of this FieldData.
|
|
86
|
+
|
|
87
|
+
字段的数据类型;“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”,“Array”,“JSON”,\"FloatVector\",\"SparseFloatVector\"。注意向量类型后会添加维度信息,如\"SparseFloatVector(256)
|
|
88
|
+
|
|
89
|
+
:return: The data_type of this FieldData.
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._data_type
|
|
93
|
+
|
|
94
|
+
@data_type.setter
|
|
95
|
+
def data_type(self, data_type):
|
|
96
|
+
r"""Sets the data_type of this FieldData.
|
|
97
|
+
|
|
98
|
+
字段的数据类型;“Bool”,“Int8”,“Int16”,“Int32”,“Int64”,“Float”,“String”,“Array”,“JSON”,\"FloatVector\",\"SparseFloatVector\"。注意向量类型后会添加维度信息,如\"SparseFloatVector(256)
|
|
99
|
+
|
|
100
|
+
:param data_type: The data_type of this FieldData.
|
|
101
|
+
:type data_type: str
|
|
102
|
+
"""
|
|
103
|
+
self._data_type = data_type
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def primary_key(self):
|
|
107
|
+
r"""Gets the primary_key of this FieldData.
|
|
108
|
+
|
|
109
|
+
是否是主键字段
|
|
110
|
+
|
|
111
|
+
:return: The primary_key of this FieldData.
|
|
112
|
+
:rtype: bool
|
|
113
|
+
"""
|
|
114
|
+
return self._primary_key
|
|
115
|
+
|
|
116
|
+
@primary_key.setter
|
|
117
|
+
def primary_key(self, primary_key):
|
|
118
|
+
r"""Sets the primary_key of this FieldData.
|
|
119
|
+
|
|
120
|
+
是否是主键字段
|
|
121
|
+
|
|
122
|
+
:param primary_key: The primary_key of this FieldData.
|
|
123
|
+
:type primary_key: bool
|
|
124
|
+
"""
|
|
125
|
+
self._primary_key = primary_key
|
|
126
|
+
|
|
127
|
+
@property
|
|
128
|
+
def partition_key(self):
|
|
129
|
+
r"""Gets the partition_key of this FieldData.
|
|
130
|
+
|
|
131
|
+
是否是partition key
|
|
132
|
+
|
|
133
|
+
:return: The partition_key of this FieldData.
|
|
134
|
+
:rtype: bool
|
|
135
|
+
"""
|
|
136
|
+
return self._partition_key
|
|
137
|
+
|
|
138
|
+
@partition_key.setter
|
|
139
|
+
def partition_key(self, partition_key):
|
|
140
|
+
r"""Sets the partition_key of this FieldData.
|
|
141
|
+
|
|
142
|
+
是否是partition key
|
|
143
|
+
|
|
144
|
+
:param partition_key: The partition_key of this FieldData.
|
|
145
|
+
:type partition_key: bool
|
|
146
|
+
"""
|
|
147
|
+
self._partition_key = partition_key
|
|
148
|
+
|
|
149
|
+
def to_dict(self):
|
|
150
|
+
"""Returns the model properties as a dict"""
|
|
151
|
+
result = {}
|
|
152
|
+
|
|
153
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
154
|
+
value = getattr(self, attr)
|
|
155
|
+
if isinstance(value, list):
|
|
156
|
+
result[attr] = list(map(
|
|
157
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
158
|
+
value
|
|
159
|
+
))
|
|
160
|
+
elif hasattr(value, "to_dict"):
|
|
161
|
+
result[attr] = value.to_dict()
|
|
162
|
+
elif isinstance(value, dict):
|
|
163
|
+
result[attr] = dict(map(
|
|
164
|
+
lambda item: (item[0], item[1].to_dict())
|
|
165
|
+
if hasattr(item[1], "to_dict") else item,
|
|
166
|
+
value.items()
|
|
167
|
+
))
|
|
168
|
+
else:
|
|
169
|
+
if attr in self.sensitive_list:
|
|
170
|
+
result[attr] = "****"
|
|
171
|
+
else:
|
|
172
|
+
result[attr] = value
|
|
173
|
+
|
|
174
|
+
return result
|
|
175
|
+
|
|
176
|
+
def to_str(self):
|
|
177
|
+
"""Returns the string representation of the model"""
|
|
178
|
+
import simplejson as json
|
|
179
|
+
if six.PY2:
|
|
180
|
+
import sys
|
|
181
|
+
reload(sys)
|
|
182
|
+
sys.setdefaultencoding("utf-8")
|
|
183
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
184
|
+
|
|
185
|
+
def __repr__(self):
|
|
186
|
+
"""For `print`"""
|
|
187
|
+
return self.to_str()
|
|
188
|
+
|
|
189
|
+
def __eq__(self, other):
|
|
190
|
+
"""Returns true if both objects are equal"""
|
|
191
|
+
if not isinstance(other, FieldData):
|
|
192
|
+
return False
|
|
193
|
+
|
|
194
|
+
return self.__dict__ == other.__dict__
|
|
195
|
+
|
|
196
|
+
def __ne__(self, other):
|
|
197
|
+
"""Returns true if both objects are not equal"""
|
|
198
|
+
return not self == other
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Flavor:
|
|
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
|
+
'cu': 'str',
|
|
21
|
+
'num': 'int'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'cu': 'cu',
|
|
26
|
+
'num': 'num'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, cu=None, num=None):
|
|
30
|
+
r"""Flavor
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param cu: cu规格,取值范围xlarge, 2xlarge, 4xlarge, 8xlarge, 16xlarge
|
|
35
|
+
:type cu: str
|
|
36
|
+
:param num: 选择cu规格的数量。不能超过CU配额,如有大量需求,请提工单申请
|
|
37
|
+
:type num: int
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._cu = None
|
|
43
|
+
self._num = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
self.cu = cu
|
|
47
|
+
self.num = num
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def cu(self):
|
|
51
|
+
r"""Gets the cu of this Flavor.
|
|
52
|
+
|
|
53
|
+
cu规格,取值范围xlarge, 2xlarge, 4xlarge, 8xlarge, 16xlarge
|
|
54
|
+
|
|
55
|
+
:return: The cu of this Flavor.
|
|
56
|
+
:rtype: str
|
|
57
|
+
"""
|
|
58
|
+
return self._cu
|
|
59
|
+
|
|
60
|
+
@cu.setter
|
|
61
|
+
def cu(self, cu):
|
|
62
|
+
r"""Sets the cu of this Flavor.
|
|
63
|
+
|
|
64
|
+
cu规格,取值范围xlarge, 2xlarge, 4xlarge, 8xlarge, 16xlarge
|
|
65
|
+
|
|
66
|
+
:param cu: The cu of this Flavor.
|
|
67
|
+
:type cu: str
|
|
68
|
+
"""
|
|
69
|
+
self._cu = cu
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def num(self):
|
|
73
|
+
r"""Gets the num of this Flavor.
|
|
74
|
+
|
|
75
|
+
选择cu规格的数量。不能超过CU配额,如有大量需求,请提工单申请
|
|
76
|
+
|
|
77
|
+
:return: The num of this Flavor.
|
|
78
|
+
:rtype: int
|
|
79
|
+
"""
|
|
80
|
+
return self._num
|
|
81
|
+
|
|
82
|
+
@num.setter
|
|
83
|
+
def num(self, num):
|
|
84
|
+
r"""Sets the num of this Flavor.
|
|
85
|
+
|
|
86
|
+
选择cu规格的数量。不能超过CU配额,如有大量需求,请提工单申请
|
|
87
|
+
|
|
88
|
+
:param num: The num of this Flavor.
|
|
89
|
+
:type num: int
|
|
90
|
+
"""
|
|
91
|
+
self._num = num
|
|
92
|
+
|
|
93
|
+
def to_dict(self):
|
|
94
|
+
"""Returns the model properties as a dict"""
|
|
95
|
+
result = {}
|
|
96
|
+
|
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
98
|
+
value = getattr(self, attr)
|
|
99
|
+
if isinstance(value, list):
|
|
100
|
+
result[attr] = list(map(
|
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
102
|
+
value
|
|
103
|
+
))
|
|
104
|
+
elif hasattr(value, "to_dict"):
|
|
105
|
+
result[attr] = value.to_dict()
|
|
106
|
+
elif isinstance(value, dict):
|
|
107
|
+
result[attr] = dict(map(
|
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
|
110
|
+
value.items()
|
|
111
|
+
))
|
|
112
|
+
else:
|
|
113
|
+
if attr in self.sensitive_list:
|
|
114
|
+
result[attr] = "****"
|
|
115
|
+
else:
|
|
116
|
+
result[attr] = value
|
|
117
|
+
|
|
118
|
+
return result
|
|
119
|
+
|
|
120
|
+
def to_str(self):
|
|
121
|
+
"""Returns the string representation of the model"""
|
|
122
|
+
import simplejson as json
|
|
123
|
+
if six.PY2:
|
|
124
|
+
import sys
|
|
125
|
+
reload(sys)
|
|
126
|
+
sys.setdefaultencoding("utf-8")
|
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
128
|
+
|
|
129
|
+
def __repr__(self):
|
|
130
|
+
"""For `print`"""
|
|
131
|
+
return self.to_str()
|
|
132
|
+
|
|
133
|
+
def __eq__(self, other):
|
|
134
|
+
"""Returns true if both objects are equal"""
|
|
135
|
+
if not isinstance(other, Flavor):
|
|
136
|
+
return False
|
|
137
|
+
|
|
138
|
+
return self.__dict__ == other.__dict__
|
|
139
|
+
|
|
140
|
+
def __ne__(self, other):
|
|
141
|
+
"""Returns true if both objects are not equal"""
|
|
142
|
+
return not self == other
|