huaweicloudsdkdwr 3.1.160__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/__init__.py +0 -0
- huaweicloudsdkdwr/v1/__init__.py +93 -0
- huaweicloudsdkdwr/v1/dwr_async_client.py +1519 -0
- huaweicloudsdkdwr/v1/dwr_client.py +1516 -0
- huaweicloudsdkdwr/v1/model/__init__.py +90 -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 +344 -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_data.py +166 -0
- huaweicloudsdkdwr/v1/model/describe_index_request.py +111 -0
- huaweicloudsdkdwr/v1/model/describe_index_response.py +170 -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_request.py +111 -0
- huaweicloudsdkdwr/v1/model/describe_store_response.py +170 -0
- huaweicloudsdkdwr/v1/model/entities_data.py +114 -0
- huaweicloudsdkdwr/v1/model/field.py +229 -0
- huaweicloudsdkdwr/v1/model/field_data.py +285 -0
- huaweicloudsdkdwr/v1/model/flavor.py +142 -0
- huaweicloudsdkdwr/v1/model/get_index_progress_body.py +170 -0
- huaweicloudsdkdwr/v1/model/get_progress_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 +282 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_request.py +111 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_response.py +170 -0
- huaweicloudsdkdwr/v1/model/index_desc.py +198 -0
- huaweicloudsdkdwr/v1/model/index_params.py +171 -0
- huaweicloudsdkdwr/v1/model/insert_entities_body.py +170 -0
- huaweicloudsdkdwr/v1/model/insert_entities_data.py +143 -0
- huaweicloudsdkdwr/v1/model/insert_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/insert_entities_response.py +170 -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_store_data.py +114 -0
- huaweicloudsdkdwr/v1/model/list_stores_request.py +84 -0
- huaweicloudsdkdwr/v1/model/list_stores_response.py +170 -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 +170 -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 +170 -0
- huaweicloudsdkdwr/v1/model/store_data.py +364 -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_data.py +142 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_request.py +111 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_response.py +170 -0
- huaweicloudsdkdwr/v1/region/__init__.py +0 -0
- huaweicloudsdkdwr/v1/region/dwr_region.py +43 -0
- huaweicloudsdkdwr/v3/__init__.py +76 -0
- huaweicloudsdkdwr/v3/dwr_async_client.py +1622 -0
- huaweicloudsdkdwr/v3/dwr_client.py +1619 -0
- huaweicloudsdkdwr/v3/model/__init__.py +73 -0
- huaweicloudsdkdwr/v3/model/accept_service_contract_request.py +114 -0
- huaweicloudsdkdwr/v3/model/accept_service_contract_response.py +137 -0
- huaweicloudsdkdwr/v3/model/action.py +427 -0
- huaweicloudsdkdwr/v3/model/action_result.py +228 -0
- huaweicloudsdkdwr/v3/model/action_template_item.py +144 -0
- huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_request.py +139 -0
- huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_response.py +274 -0
- huaweicloudsdkdwr/v3/model/check_workflow_authentication_request.py +84 -0
- huaweicloudsdkdwr/v3/model/check_workflow_authentication_response.py +477 -0
- huaweicloudsdkdwr/v3/model/create_my_action_template_request.py +139 -0
- huaweicloudsdkdwr/v3/model/create_my_action_template_response.py +419 -0
- huaweicloudsdkdwr/v3/model/create_workflow_authentication_request.py +84 -0
- huaweicloudsdkdwr/v3/model/create_workflow_authentication_response.py +137 -0
- huaweicloudsdkdwr/v3/model/create_workflow_request.py +139 -0
- huaweicloudsdkdwr/v3/model/create_workflow_request_body.py +281 -0
- huaweicloudsdkdwr/v3/model/create_workflow_response.py +274 -0
- huaweicloudsdkdwr/v3/model/delete_my_action_template_request.py +114 -0
- huaweicloudsdkdwr/v3/model/delete_my_action_template_response.py +137 -0
- huaweicloudsdkdwr/v3/model/delete_workflow_request.py +114 -0
- huaweicloudsdkdwr/v3/model/delete_workflow_response.py +137 -0
- huaweicloudsdkdwr/v3/model/execute_workflow_body.py +167 -0
- huaweicloudsdkdwr/v3/model/execution.py +289 -0
- huaweicloudsdkdwr/v3/model/express_config.py +144 -0
- huaweicloudsdkdwr/v3/model/func_vpc.py +260 -0
- huaweicloudsdkdwr/v3/model/graph_item.py +202 -0
- huaweicloudsdkdwr/v3/model/input.py +370 -0
- huaweicloudsdkdwr/v3/model/input_para_type.py +84 -0
- huaweicloudsdkdwr/v3/model/input_para_value_type.py +89 -0
- huaweicloudsdkdwr/v3/model/list_my_action_template_request.py +231 -0
- huaweicloudsdkdwr/v3/model/list_my_action_template_response.py +303 -0
- huaweicloudsdkdwr/v3/model/list_system_templates_request.py +202 -0
- huaweicloudsdkdwr/v3/model/list_system_templates_response.py +332 -0
- huaweicloudsdkdwr/v3/model/list_workflow_instance_request.py +259 -0
- huaweicloudsdkdwr/v3/model/list_workflow_instance_response.py +303 -0
- huaweicloudsdkdwr/v3/model/list_workflows_request.py +173 -0
- huaweicloudsdkdwr/v3/model/list_workflows_response.py +303 -0
- huaweicloudsdkdwr/v3/model/node_execution.py +289 -0
- huaweicloudsdkdwr/v3/model/policy.py +144 -0
- huaweicloudsdkdwr/v3/model/provided_action.py +564 -0
- huaweicloudsdkdwr/v3/model/public_template_item.py +285 -0
- huaweicloudsdkdwr/v3/model/public_template_register_type.py +87 -0
- huaweicloudsdkdwr/v3/model/restore_workflow_execution_request.py +142 -0
- huaweicloudsdkdwr/v3/model/restore_workflow_execution_response.py +274 -0
- huaweicloudsdkdwr/v3/model/show_public_action_list_request.py +202 -0
- huaweicloudsdkdwr/v3/model/show_public_action_list_response.py +332 -0
- huaweicloudsdkdwr/v3/model/show_public_template_info_request.py +114 -0
- huaweicloudsdkdwr/v3/model/show_public_template_info_response.py +212 -0
- huaweicloudsdkdwr/v3/model/show_service_contract_request.py +114 -0
- huaweicloudsdkdwr/v3/model/show_service_contract_response.py +245 -0
- huaweicloudsdkdwr/v3/model/show_system_template_detail_request.py +114 -0
- huaweicloudsdkdwr/v3/model/show_system_template_detail_response.py +212 -0
- huaweicloudsdkdwr/v3/model/show_third_template_info_request.py +114 -0
- huaweicloudsdkdwr/v3/model/show_third_template_info_response.py +212 -0
- huaweicloudsdkdwr/v3/model/show_workflow_info_request.py +114 -0
- huaweicloudsdkdwr/v3/model/show_workflow_info_response.py +332 -0
- huaweicloudsdkdwr/v3/model/show_workflow_instance_request.py +142 -0
- huaweicloudsdkdwr/v3/model/show_workflow_instance_response.py +535 -0
- huaweicloudsdkdwr/v3/model/state.py +345 -0
- huaweicloudsdkdwr/v3/model/statement.py +144 -0
- huaweicloudsdkdwr/v3/model/third_action_template_item.py +285 -0
- huaweicloudsdkdwr/v3/model/third_template_request_body.py +430 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_request.py +139 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_response.py +274 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_request.py +114 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_response.py +137 -0
- huaweicloudsdkdwr/v3/model/update_workflow_body.py +115 -0
- huaweicloudsdkdwr/v3/model/update_workflow_request.py +139 -0
- huaweicloudsdkdwr/v3/model/update_workflow_response.py +274 -0
- huaweicloudsdkdwr/v3/region/__init__.py +0 -0
- huaweicloudsdkdwr/v3/region/dwr_region.py +43 -0
- huaweicloudsdkdwr-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkdwr-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkdwr-3.1.160.dist-info/RECORD +171 -0
- huaweicloudsdkdwr-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkdwr-3.1.160.dist-info/top_level.txt +1 -0
|
@@ -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 CollectionBaseInfo:
|
|
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
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'store_name': 'store_name',
|
|
26
|
+
'collection_name': 'collection_name'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, store_name=None, collection_name=None):
|
|
30
|
+
r"""CollectionBaseInfo
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param store_name: **参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
35
|
+
:type store_name: str
|
|
36
|
+
:param collection_name: **参数解释:** collection名称。 **约束限制:** 可包含数字、字母和下划线 (_)。资源名称必须以字母或下划线 (_) 开头。最大长度支持255。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
37
|
+
:type collection_name: str
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._store_name = None
|
|
43
|
+
self._collection_name = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
self.store_name = store_name
|
|
47
|
+
self.collection_name = collection_name
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def store_name(self):
|
|
51
|
+
r"""Gets the store_name of this CollectionBaseInfo.
|
|
52
|
+
|
|
53
|
+
**参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
54
|
+
|
|
55
|
+
:return: The store_name of this CollectionBaseInfo.
|
|
56
|
+
:rtype: str
|
|
57
|
+
"""
|
|
58
|
+
return self._store_name
|
|
59
|
+
|
|
60
|
+
@store_name.setter
|
|
61
|
+
def store_name(self, store_name):
|
|
62
|
+
r"""Sets the store_name of this CollectionBaseInfo.
|
|
63
|
+
|
|
64
|
+
**参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
65
|
+
|
|
66
|
+
:param store_name: The store_name of this CollectionBaseInfo.
|
|
67
|
+
:type store_name: str
|
|
68
|
+
"""
|
|
69
|
+
self._store_name = store_name
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def collection_name(self):
|
|
73
|
+
r"""Gets the collection_name of this CollectionBaseInfo.
|
|
74
|
+
|
|
75
|
+
**参数解释:** collection名称。 **约束限制:** 可包含数字、字母和下划线 (_)。资源名称必须以字母或下划线 (_) 开头。最大长度支持255。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
76
|
+
|
|
77
|
+
:return: The collection_name of this CollectionBaseInfo.
|
|
78
|
+
:rtype: str
|
|
79
|
+
"""
|
|
80
|
+
return self._collection_name
|
|
81
|
+
|
|
82
|
+
@collection_name.setter
|
|
83
|
+
def collection_name(self, collection_name):
|
|
84
|
+
r"""Sets the collection_name of this CollectionBaseInfo.
|
|
85
|
+
|
|
86
|
+
**参数解释:** collection名称。 **约束限制:** 可包含数字、字母和下划线 (_)。资源名称必须以字母或下划线 (_) 开头。最大长度支持255。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
87
|
+
|
|
88
|
+
:param collection_name: The collection_name of this CollectionBaseInfo.
|
|
89
|
+
:type collection_name: str
|
|
90
|
+
"""
|
|
91
|
+
self._collection_name = collection_name
|
|
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, CollectionBaseInfo):
|
|
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
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateCollectionBody:
|
|
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
|
+
'primary_field': 'PrimaryField',
|
|
23
|
+
'fields': 'list[Field]',
|
|
24
|
+
'description': 'str',
|
|
25
|
+
'index_params': 'list[IndexParams]',
|
|
26
|
+
'params': 'dict(str, object)'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
attribute_map = {
|
|
30
|
+
'store_name': 'store_name',
|
|
31
|
+
'collection_name': 'collection_name',
|
|
32
|
+
'primary_field': 'primary_field',
|
|
33
|
+
'fields': 'fields',
|
|
34
|
+
'description': 'description',
|
|
35
|
+
'index_params': 'index_params',
|
|
36
|
+
'params': 'params'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def __init__(self, store_name=None, collection_name=None, primary_field=None, fields=None, description=None, index_params=None, params=None):
|
|
40
|
+
r"""CreateCollectionBody
|
|
41
|
+
|
|
42
|
+
The model defined in huaweicloud sdk
|
|
43
|
+
|
|
44
|
+
:param store_name: **参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
45
|
+
:type store_name: str
|
|
46
|
+
:param collection_name: **参数解释:** collection名称。 **约束限制:** 可包含数字、字母和下划线 (_)。资源名称必须以字母或下划线 (_) 开头。最大长度支持255。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
47
|
+
:type collection_name: str
|
|
48
|
+
:param primary_field:
|
|
49
|
+
:type primary_field: :class:`huaweicloudsdkdwr.v1.PrimaryField`
|
|
50
|
+
:param fields: **参数解释:** 集合中通用字段,创建列的schema。 **约束限制:** 不涉及。
|
|
51
|
+
:type fields: list[:class:`huaweicloudsdkdwr.v1.Field`]
|
|
52
|
+
:param description: **参数解释:** 指定 Collection 的描述信息。 **约束限制:** 有效长度0-255字节。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
53
|
+
:type description: str
|
|
54
|
+
:param index_params: **参数解释:** 索引的配置信息。 **约束限制:** 不涉及。
|
|
55
|
+
:type index_params: list[:class:`huaweicloudsdkdwr.v1.IndexParams`]
|
|
56
|
+
:param params: **参数解释:** collection常用参数。 **约束限制:** shards_num: 默认2,取值范围[1, 16] partitions_num: 默认4,取值范围[1, 1024],若所有field的partition_key为false,则partitions_num固定为1。 max_length: 默认256,取值范围[1, 65535],当primary_field.type为String时,指示String的最大长度。
|
|
57
|
+
:type params: dict(str, object)
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
self._store_name = None
|
|
63
|
+
self._collection_name = None
|
|
64
|
+
self._primary_field = None
|
|
65
|
+
self._fields = None
|
|
66
|
+
self._description = None
|
|
67
|
+
self._index_params = None
|
|
68
|
+
self._params = None
|
|
69
|
+
self.discriminator = None
|
|
70
|
+
|
|
71
|
+
self.store_name = store_name
|
|
72
|
+
self.collection_name = collection_name
|
|
73
|
+
self.primary_field = primary_field
|
|
74
|
+
self.fields = fields
|
|
75
|
+
if description is not None:
|
|
76
|
+
self.description = description
|
|
77
|
+
if index_params is not None:
|
|
78
|
+
self.index_params = index_params
|
|
79
|
+
if params is not None:
|
|
80
|
+
self.params = params
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def store_name(self):
|
|
84
|
+
r"""Gets the store_name of this CreateCollectionBody.
|
|
85
|
+
|
|
86
|
+
**参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
87
|
+
|
|
88
|
+
:return: The store_name of this CreateCollectionBody.
|
|
89
|
+
:rtype: str
|
|
90
|
+
"""
|
|
91
|
+
return self._store_name
|
|
92
|
+
|
|
93
|
+
@store_name.setter
|
|
94
|
+
def store_name(self, store_name):
|
|
95
|
+
r"""Sets the store_name of this CreateCollectionBody.
|
|
96
|
+
|
|
97
|
+
**参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
98
|
+
|
|
99
|
+
:param store_name: The store_name of this CreateCollectionBody.
|
|
100
|
+
:type store_name: str
|
|
101
|
+
"""
|
|
102
|
+
self._store_name = store_name
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def collection_name(self):
|
|
106
|
+
r"""Gets the collection_name of this CreateCollectionBody.
|
|
107
|
+
|
|
108
|
+
**参数解释:** collection名称。 **约束限制:** 可包含数字、字母和下划线 (_)。资源名称必须以字母或下划线 (_) 开头。最大长度支持255。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
109
|
+
|
|
110
|
+
:return: The collection_name of this CreateCollectionBody.
|
|
111
|
+
:rtype: str
|
|
112
|
+
"""
|
|
113
|
+
return self._collection_name
|
|
114
|
+
|
|
115
|
+
@collection_name.setter
|
|
116
|
+
def collection_name(self, collection_name):
|
|
117
|
+
r"""Sets the collection_name of this CreateCollectionBody.
|
|
118
|
+
|
|
119
|
+
**参数解释:** collection名称。 **约束限制:** 可包含数字、字母和下划线 (_)。资源名称必须以字母或下划线 (_) 开头。最大长度支持255。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
120
|
+
|
|
121
|
+
:param collection_name: The collection_name of this CreateCollectionBody.
|
|
122
|
+
:type collection_name: str
|
|
123
|
+
"""
|
|
124
|
+
self._collection_name = collection_name
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def primary_field(self):
|
|
128
|
+
r"""Gets the primary_field of this CreateCollectionBody.
|
|
129
|
+
|
|
130
|
+
:return: The primary_field of this CreateCollectionBody.
|
|
131
|
+
:rtype: :class:`huaweicloudsdkdwr.v1.PrimaryField`
|
|
132
|
+
"""
|
|
133
|
+
return self._primary_field
|
|
134
|
+
|
|
135
|
+
@primary_field.setter
|
|
136
|
+
def primary_field(self, primary_field):
|
|
137
|
+
r"""Sets the primary_field of this CreateCollectionBody.
|
|
138
|
+
|
|
139
|
+
:param primary_field: The primary_field of this CreateCollectionBody.
|
|
140
|
+
:type primary_field: :class:`huaweicloudsdkdwr.v1.PrimaryField`
|
|
141
|
+
"""
|
|
142
|
+
self._primary_field = primary_field
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def fields(self):
|
|
146
|
+
r"""Gets the fields of this CreateCollectionBody.
|
|
147
|
+
|
|
148
|
+
**参数解释:** 集合中通用字段,创建列的schema。 **约束限制:** 不涉及。
|
|
149
|
+
|
|
150
|
+
:return: The fields of this CreateCollectionBody.
|
|
151
|
+
:rtype: list[:class:`huaweicloudsdkdwr.v1.Field`]
|
|
152
|
+
"""
|
|
153
|
+
return self._fields
|
|
154
|
+
|
|
155
|
+
@fields.setter
|
|
156
|
+
def fields(self, fields):
|
|
157
|
+
r"""Sets the fields of this CreateCollectionBody.
|
|
158
|
+
|
|
159
|
+
**参数解释:** 集合中通用字段,创建列的schema。 **约束限制:** 不涉及。
|
|
160
|
+
|
|
161
|
+
:param fields: The fields of this CreateCollectionBody.
|
|
162
|
+
:type fields: list[:class:`huaweicloudsdkdwr.v1.Field`]
|
|
163
|
+
"""
|
|
164
|
+
self._fields = fields
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def description(self):
|
|
168
|
+
r"""Gets the description of this CreateCollectionBody.
|
|
169
|
+
|
|
170
|
+
**参数解释:** 指定 Collection 的描述信息。 **约束限制:** 有效长度0-255字节。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
171
|
+
|
|
172
|
+
:return: The description of this CreateCollectionBody.
|
|
173
|
+
:rtype: str
|
|
174
|
+
"""
|
|
175
|
+
return self._description
|
|
176
|
+
|
|
177
|
+
@description.setter
|
|
178
|
+
def description(self, description):
|
|
179
|
+
r"""Sets the description of this CreateCollectionBody.
|
|
180
|
+
|
|
181
|
+
**参数解释:** 指定 Collection 的描述信息。 **约束限制:** 有效长度0-255字节。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
182
|
+
|
|
183
|
+
:param description: The description of this CreateCollectionBody.
|
|
184
|
+
:type description: str
|
|
185
|
+
"""
|
|
186
|
+
self._description = description
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def index_params(self):
|
|
190
|
+
r"""Gets the index_params of this CreateCollectionBody.
|
|
191
|
+
|
|
192
|
+
**参数解释:** 索引的配置信息。 **约束限制:** 不涉及。
|
|
193
|
+
|
|
194
|
+
:return: The index_params of this CreateCollectionBody.
|
|
195
|
+
:rtype: list[:class:`huaweicloudsdkdwr.v1.IndexParams`]
|
|
196
|
+
"""
|
|
197
|
+
return self._index_params
|
|
198
|
+
|
|
199
|
+
@index_params.setter
|
|
200
|
+
def index_params(self, index_params):
|
|
201
|
+
r"""Sets the index_params of this CreateCollectionBody.
|
|
202
|
+
|
|
203
|
+
**参数解释:** 索引的配置信息。 **约束限制:** 不涉及。
|
|
204
|
+
|
|
205
|
+
:param index_params: The index_params of this CreateCollectionBody.
|
|
206
|
+
:type index_params: list[:class:`huaweicloudsdkdwr.v1.IndexParams`]
|
|
207
|
+
"""
|
|
208
|
+
self._index_params = index_params
|
|
209
|
+
|
|
210
|
+
@property
|
|
211
|
+
def params(self):
|
|
212
|
+
r"""Gets the params of this CreateCollectionBody.
|
|
213
|
+
|
|
214
|
+
**参数解释:** collection常用参数。 **约束限制:** shards_num: 默认2,取值范围[1, 16] partitions_num: 默认4,取值范围[1, 1024],若所有field的partition_key为false,则partitions_num固定为1。 max_length: 默认256,取值范围[1, 65535],当primary_field.type为String时,指示String的最大长度。
|
|
215
|
+
|
|
216
|
+
:return: The params of this CreateCollectionBody.
|
|
217
|
+
:rtype: dict(str, object)
|
|
218
|
+
"""
|
|
219
|
+
return self._params
|
|
220
|
+
|
|
221
|
+
@params.setter
|
|
222
|
+
def params(self, params):
|
|
223
|
+
r"""Sets the params of this CreateCollectionBody.
|
|
224
|
+
|
|
225
|
+
**参数解释:** collection常用参数。 **约束限制:** shards_num: 默认2,取值范围[1, 16] partitions_num: 默认4,取值范围[1, 1024],若所有field的partition_key为false,则partitions_num固定为1。 max_length: 默认256,取值范围[1, 65535],当primary_field.type为String时,指示String的最大长度。
|
|
226
|
+
|
|
227
|
+
:param params: The params of this CreateCollectionBody.
|
|
228
|
+
:type params: dict(str, object)
|
|
229
|
+
"""
|
|
230
|
+
self._params = params
|
|
231
|
+
|
|
232
|
+
def to_dict(self):
|
|
233
|
+
"""Returns the model properties as a dict"""
|
|
234
|
+
result = {}
|
|
235
|
+
|
|
236
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
237
|
+
value = getattr(self, attr)
|
|
238
|
+
if isinstance(value, list):
|
|
239
|
+
result[attr] = list(map(
|
|
240
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
241
|
+
value
|
|
242
|
+
))
|
|
243
|
+
elif hasattr(value, "to_dict"):
|
|
244
|
+
result[attr] = value.to_dict()
|
|
245
|
+
elif isinstance(value, dict):
|
|
246
|
+
result[attr] = dict(map(
|
|
247
|
+
lambda item: (item[0], item[1].to_dict())
|
|
248
|
+
if hasattr(item[1], "to_dict") else item,
|
|
249
|
+
value.items()
|
|
250
|
+
))
|
|
251
|
+
else:
|
|
252
|
+
if attr in self.sensitive_list:
|
|
253
|
+
result[attr] = "****"
|
|
254
|
+
else:
|
|
255
|
+
result[attr] = value
|
|
256
|
+
|
|
257
|
+
return result
|
|
258
|
+
|
|
259
|
+
def to_str(self):
|
|
260
|
+
"""Returns the string representation of the model"""
|
|
261
|
+
import simplejson as json
|
|
262
|
+
if six.PY2:
|
|
263
|
+
import sys
|
|
264
|
+
reload(sys)
|
|
265
|
+
sys.setdefaultencoding("utf-8")
|
|
266
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
267
|
+
|
|
268
|
+
def __repr__(self):
|
|
269
|
+
"""For `print`"""
|
|
270
|
+
return self.to_str()
|
|
271
|
+
|
|
272
|
+
def __eq__(self, other):
|
|
273
|
+
"""Returns true if both objects are equal"""
|
|
274
|
+
if not isinstance(other, CreateCollectionBody):
|
|
275
|
+
return False
|
|
276
|
+
|
|
277
|
+
return self.__dict__ == other.__dict__
|
|
278
|
+
|
|
279
|
+
def __ne__(self, other):
|
|
280
|
+
"""Returns true if both objects are not equal"""
|
|
281
|
+
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 CreateCollectionRequest:
|
|
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': 'CreateCollectionBody'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'body': 'body'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, body=None):
|
|
28
|
+
r"""CreateCollectionRequest
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param body: Body of the CreateCollectionRequest
|
|
33
|
+
:type body: :class:`huaweicloudsdkdwr.v1.CreateCollectionBody`
|
|
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 CreateCollectionRequest.
|
|
47
|
+
|
|
48
|
+
:return: The body of this CreateCollectionRequest.
|
|
49
|
+
:rtype: :class:`huaweicloudsdkdwr.v1.CreateCollectionBody`
|
|
50
|
+
"""
|
|
51
|
+
return self._body
|
|
52
|
+
|
|
53
|
+
@body.setter
|
|
54
|
+
def body(self, body):
|
|
55
|
+
r"""Sets the body of this CreateCollectionRequest.
|
|
56
|
+
|
|
57
|
+
:param body: The body of this CreateCollectionRequest.
|
|
58
|
+
:type body: :class:`huaweicloudsdkdwr.v1.CreateCollectionBody`
|
|
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, CreateCollectionRequest):
|
|
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,145 @@
|
|
|
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 CreateCollectionResponse(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
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'code': 'code',
|
|
27
|
+
'message': 'message'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
def __init__(self, code=None, message=None):
|
|
31
|
+
r"""CreateCollectionResponse
|
|
32
|
+
|
|
33
|
+
The model defined in huaweicloud sdk
|
|
34
|
+
|
|
35
|
+
:param code: **参数解释:** 返回码。参见错误码章节。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
36
|
+
:type code: str
|
|
37
|
+
:param message: **参数解释:** 描述信息。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
38
|
+
:type message: str
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
super(CreateCollectionResponse, self).__init__()
|
|
42
|
+
|
|
43
|
+
self._code = None
|
|
44
|
+
self._message = None
|
|
45
|
+
self.discriminator = None
|
|
46
|
+
|
|
47
|
+
if code is not None:
|
|
48
|
+
self.code = code
|
|
49
|
+
if message is not None:
|
|
50
|
+
self.message = message
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def code(self):
|
|
54
|
+
r"""Gets the code of this CreateCollectionResponse.
|
|
55
|
+
|
|
56
|
+
**参数解释:** 返回码。参见错误码章节。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
57
|
+
|
|
58
|
+
:return: The code of this CreateCollectionResponse.
|
|
59
|
+
:rtype: str
|
|
60
|
+
"""
|
|
61
|
+
return self._code
|
|
62
|
+
|
|
63
|
+
@code.setter
|
|
64
|
+
def code(self, code):
|
|
65
|
+
r"""Sets the code of this CreateCollectionResponse.
|
|
66
|
+
|
|
67
|
+
**参数解释:** 返回码。参见错误码章节。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
68
|
+
|
|
69
|
+
:param code: The code of this CreateCollectionResponse.
|
|
70
|
+
:type code: str
|
|
71
|
+
"""
|
|
72
|
+
self._code = code
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def message(self):
|
|
76
|
+
r"""Gets the message of this CreateCollectionResponse.
|
|
77
|
+
|
|
78
|
+
**参数解释:** 描述信息。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
79
|
+
|
|
80
|
+
:return: The message of this CreateCollectionResponse.
|
|
81
|
+
:rtype: str
|
|
82
|
+
"""
|
|
83
|
+
return self._message
|
|
84
|
+
|
|
85
|
+
@message.setter
|
|
86
|
+
def message(self, message):
|
|
87
|
+
r"""Sets the message of this CreateCollectionResponse.
|
|
88
|
+
|
|
89
|
+
**参数解释:** 描述信息。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
90
|
+
|
|
91
|
+
:param message: The message of this CreateCollectionResponse.
|
|
92
|
+
:type message: str
|
|
93
|
+
"""
|
|
94
|
+
self._message = message
|
|
95
|
+
|
|
96
|
+
def to_dict(self):
|
|
97
|
+
"""Returns the model properties as a dict"""
|
|
98
|
+
result = {}
|
|
99
|
+
|
|
100
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
101
|
+
value = getattr(self, attr)
|
|
102
|
+
if isinstance(value, list):
|
|
103
|
+
result[attr] = list(map(
|
|
104
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
105
|
+
value
|
|
106
|
+
))
|
|
107
|
+
elif hasattr(value, "to_dict"):
|
|
108
|
+
result[attr] = value.to_dict()
|
|
109
|
+
elif isinstance(value, dict):
|
|
110
|
+
result[attr] = dict(map(
|
|
111
|
+
lambda item: (item[0], item[1].to_dict())
|
|
112
|
+
if hasattr(item[1], "to_dict") else item,
|
|
113
|
+
value.items()
|
|
114
|
+
))
|
|
115
|
+
else:
|
|
116
|
+
if attr in self.sensitive_list:
|
|
117
|
+
result[attr] = "****"
|
|
118
|
+
else:
|
|
119
|
+
result[attr] = value
|
|
120
|
+
|
|
121
|
+
return result
|
|
122
|
+
|
|
123
|
+
def to_str(self):
|
|
124
|
+
"""Returns the string representation of the model"""
|
|
125
|
+
import simplejson as json
|
|
126
|
+
if six.PY2:
|
|
127
|
+
import sys
|
|
128
|
+
reload(sys)
|
|
129
|
+
sys.setdefaultencoding("utf-8")
|
|
130
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
131
|
+
|
|
132
|
+
def __repr__(self):
|
|
133
|
+
"""For `print`"""
|
|
134
|
+
return self.to_str()
|
|
135
|
+
|
|
136
|
+
def __eq__(self, other):
|
|
137
|
+
"""Returns true if both objects are equal"""
|
|
138
|
+
if not isinstance(other, CreateCollectionResponse):
|
|
139
|
+
return False
|
|
140
|
+
|
|
141
|
+
return self.__dict__ == other.__dict__
|
|
142
|
+
|
|
143
|
+
def __ne__(self, other):
|
|
144
|
+
"""Returns true if both objects are not equal"""
|
|
145
|
+
return not self == other
|