huaweicloudsdkdwr 3.1.181__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.
- huaweicloudsdkdwr/__init__.py +0 -0
- huaweicloudsdkdwr/v1/__init__.py +97 -0
- huaweicloudsdkdwr/v1/dwr_async_client.py +1584 -0
- huaweicloudsdkdwr/v1/dwr_client.py +1581 -0
- huaweicloudsdkdwr/v1/model/__init__.py +94 -0
- huaweicloudsdkdwr/v1/model/build_progress.py +224 -0
- huaweicloudsdkdwr/v1/model/charge_info.py +223 -0
- huaweicloudsdkdwr/v1/model/collection_base_info.py +135 -0
- huaweicloudsdkdwr/v1/model/create_collection_body.py +274 -0
- huaweicloudsdkdwr/v1/model/create_collection_request.py +104 -0
- huaweicloudsdkdwr/v1/model/create_collection_response.py +141 -0
- huaweicloudsdkdwr/v1/model/create_index_body.py +159 -0
- huaweicloudsdkdwr/v1/model/create_index_request.py +104 -0
- huaweicloudsdkdwr/v1/model/create_index_response.py +141 -0
- huaweicloudsdkdwr/v1/model/create_store_body.py +241 -0
- huaweicloudsdkdwr/v1/model/create_store_data.py +328 -0
- huaweicloudsdkdwr/v1/model/create_store_request.py +104 -0
- huaweicloudsdkdwr/v1/model/create_store_response.py +166 -0
- huaweicloudsdkdwr/v1/model/decribe_collection_data.py +337 -0
- huaweicloudsdkdwr/v1/model/delete_collection_request.py +104 -0
- huaweicloudsdkdwr/v1/model/delete_collection_response.py +141 -0
- huaweicloudsdkdwr/v1/model/delete_entities_body.py +163 -0
- huaweicloudsdkdwr/v1/model/delete_entities_request.py +104 -0
- huaweicloudsdkdwr/v1/model/delete_entities_response.py +141 -0
- huaweicloudsdkdwr/v1/model/delete_index_body.py +163 -0
- huaweicloudsdkdwr/v1/model/delete_index_request.py +104 -0
- huaweicloudsdkdwr/v1/model/delete_index_response.py +141 -0
- huaweicloudsdkdwr/v1/model/delete_store_data.py +107 -0
- huaweicloudsdkdwr/v1/model/delete_store_request.py +104 -0
- huaweicloudsdkdwr/v1/model/delete_store_response.py +166 -0
- huaweicloudsdkdwr/v1/model/describe_collection_request.py +104 -0
- huaweicloudsdkdwr/v1/model/describe_collection_response.py +166 -0
- huaweicloudsdkdwr/v1/model/describe_index_body.py +163 -0
- huaweicloudsdkdwr/v1/model/describe_index_data.py +159 -0
- huaweicloudsdkdwr/v1/model/describe_index_request.py +104 -0
- huaweicloudsdkdwr/v1/model/describe_index_response.py +166 -0
- huaweicloudsdkdwr/v1/model/describe_job_body.py +107 -0
- huaweicloudsdkdwr/v1/model/describe_job_request.py +104 -0
- huaweicloudsdkdwr/v1/model/describe_job_response.py +166 -0
- huaweicloudsdkdwr/v1/model/describe_store_request.py +104 -0
- huaweicloudsdkdwr/v1/model/describe_store_response.py +166 -0
- huaweicloudsdkdwr/v1/model/entities_data.py +107 -0
- huaweicloudsdkdwr/v1/model/field.py +222 -0
- huaweicloudsdkdwr/v1/model/field_data.py +278 -0
- huaweicloudsdkdwr/v1/model/flavor.py +135 -0
- huaweicloudsdkdwr/v1/model/get_index_progress_body.py +163 -0
- huaweicloudsdkdwr/v1/model/get_progress_data.py +160 -0
- huaweicloudsdkdwr/v1/model/get_progress_request.py +104 -0
- huaweicloudsdkdwr/v1/model/get_progress_response.py +166 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_body.py +275 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_request.py +104 -0
- huaweicloudsdkdwr/v1/model/hybrid_search_response.py +166 -0
- huaweicloudsdkdwr/v1/model/index_desc.py +191 -0
- huaweicloudsdkdwr/v1/model/index_params.py +164 -0
- huaweicloudsdkdwr/v1/model/insert_entities_body.py +163 -0
- huaweicloudsdkdwr/v1/model/insert_entities_data.py +136 -0
- huaweicloudsdkdwr/v1/model/insert_entities_request.py +104 -0
- huaweicloudsdkdwr/v1/model/insert_entities_response.py +166 -0
- huaweicloudsdkdwr/v1/model/job_data.py +309 -0
- huaweicloudsdkdwr/v1/model/list_collection_data.py +136 -0
- huaweicloudsdkdwr/v1/model/list_collection_details.py +253 -0
- huaweicloudsdkdwr/v1/model/list_collections_body.py +136 -0
- huaweicloudsdkdwr/v1/model/list_collections_request.py +104 -0
- huaweicloudsdkdwr/v1/model/list_collections_response.py +166 -0
- huaweicloudsdkdwr/v1/model/list_jobs_data.py +108 -0
- huaweicloudsdkdwr/v1/model/list_jobs_request.py +224 -0
- huaweicloudsdkdwr/v1/model/list_jobs_response.py +166 -0
- huaweicloudsdkdwr/v1/model/list_store_data.py +107 -0
- huaweicloudsdkdwr/v1/model/list_stores_request.py +77 -0
- huaweicloudsdkdwr/v1/model/list_stores_response.py +166 -0
- huaweicloudsdkdwr/v1/model/load_collection_body.py +135 -0
- huaweicloudsdkdwr/v1/model/load_collection_request.py +104 -0
- huaweicloudsdkdwr/v1/model/load_collection_response.py +141 -0
- huaweicloudsdkdwr/v1/model/primary_field.py +135 -0
- huaweicloudsdkdwr/v1/model/query_entities_body.py +250 -0
- huaweicloudsdkdwr/v1/model/query_entities_request.py +104 -0
- huaweicloudsdkdwr/v1/model/query_entities_response.py +166 -0
- huaweicloudsdkdwr/v1/model/release_collection_request.py +104 -0
- huaweicloudsdkdwr/v1/model/release_collection_response.py +141 -0
- huaweicloudsdkdwr/v1/model/rerank.py +136 -0
- huaweicloudsdkdwr/v1/model/scale_store_body.py +135 -0
- huaweicloudsdkdwr/v1/model/scale_store_data.py +220 -0
- huaweicloudsdkdwr/v1/model/scale_store_request.py +104 -0
- huaweicloudsdkdwr/v1/model/scale_store_response.py +166 -0
- huaweicloudsdkdwr/v1/model/search_entities_body.py +336 -0
- huaweicloudsdkdwr/v1/model/search_entities_request.py +104 -0
- huaweicloudsdkdwr/v1/model/search_entities_response.py +166 -0
- huaweicloudsdkdwr/v1/model/store_data.py +357 -0
- huaweicloudsdkdwr/v1/model/store_info.py +107 -0
- huaweicloudsdkdwr/v1/model/sub_search.py +251 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_body.py +163 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_data.py +135 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_request.py +104 -0
- huaweicloudsdkdwr/v1/model/upsert_entities_response.py +166 -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 +107 -0
- huaweicloudsdkdwr/v3/model/accept_service_contract_response.py +133 -0
- huaweicloudsdkdwr/v3/model/action.py +420 -0
- huaweicloudsdkdwr/v3/model/action_result.py +221 -0
- huaweicloudsdkdwr/v3/model/action_template_item.py +137 -0
- huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_request.py +132 -0
- huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_response.py +270 -0
- huaweicloudsdkdwr/v3/model/check_workflow_authentication_request.py +77 -0
- huaweicloudsdkdwr/v3/model/check_workflow_authentication_response.py +473 -0
- huaweicloudsdkdwr/v3/model/create_my_action_template_request.py +132 -0
- huaweicloudsdkdwr/v3/model/create_my_action_template_response.py +415 -0
- huaweicloudsdkdwr/v3/model/create_workflow_authentication_request.py +77 -0
- huaweicloudsdkdwr/v3/model/create_workflow_authentication_response.py +133 -0
- huaweicloudsdkdwr/v3/model/create_workflow_request.py +132 -0
- huaweicloudsdkdwr/v3/model/create_workflow_request_body.py +274 -0
- huaweicloudsdkdwr/v3/model/create_workflow_response.py +270 -0
- huaweicloudsdkdwr/v3/model/delete_my_action_template_request.py +107 -0
- huaweicloudsdkdwr/v3/model/delete_my_action_template_response.py +133 -0
- huaweicloudsdkdwr/v3/model/delete_workflow_request.py +107 -0
- huaweicloudsdkdwr/v3/model/delete_workflow_response.py +133 -0
- huaweicloudsdkdwr/v3/model/execute_workflow_body.py +160 -0
- huaweicloudsdkdwr/v3/model/execution.py +282 -0
- huaweicloudsdkdwr/v3/model/express_config.py +137 -0
- huaweicloudsdkdwr/v3/model/func_vpc.py +253 -0
- huaweicloudsdkdwr/v3/model/graph_item.py +195 -0
- huaweicloudsdkdwr/v3/model/input.py +367 -0
- huaweicloudsdkdwr/v3/model/input_para_type.py +77 -0
- huaweicloudsdkdwr/v3/model/input_para_value_type.py +77 -0
- huaweicloudsdkdwr/v3/model/list_my_action_template_request.py +224 -0
- huaweicloudsdkdwr/v3/model/list_my_action_template_response.py +299 -0
- huaweicloudsdkdwr/v3/model/list_system_templates_request.py +195 -0
- huaweicloudsdkdwr/v3/model/list_system_templates_response.py +328 -0
- huaweicloudsdkdwr/v3/model/list_workflow_instance_request.py +252 -0
- huaweicloudsdkdwr/v3/model/list_workflow_instance_response.py +299 -0
- huaweicloudsdkdwr/v3/model/list_workflows_request.py +166 -0
- huaweicloudsdkdwr/v3/model/list_workflows_response.py +299 -0
- huaweicloudsdkdwr/v3/model/node_execution.py +282 -0
- huaweicloudsdkdwr/v3/model/policy.py +137 -0
- huaweicloudsdkdwr/v3/model/provided_action.py +561 -0
- huaweicloudsdkdwr/v3/model/public_template_item.py +282 -0
- huaweicloudsdkdwr/v3/model/public_template_register_type.py +77 -0
- huaweicloudsdkdwr/v3/model/restore_workflow_execution_request.py +135 -0
- huaweicloudsdkdwr/v3/model/restore_workflow_execution_response.py +270 -0
- huaweicloudsdkdwr/v3/model/show_public_action_list_request.py +195 -0
- huaweicloudsdkdwr/v3/model/show_public_action_list_response.py +328 -0
- huaweicloudsdkdwr/v3/model/show_public_template_info_request.py +107 -0
- huaweicloudsdkdwr/v3/model/show_public_template_info_response.py +208 -0
- huaweicloudsdkdwr/v3/model/show_service_contract_request.py +107 -0
- huaweicloudsdkdwr/v3/model/show_service_contract_response.py +241 -0
- huaweicloudsdkdwr/v3/model/show_system_template_detail_request.py +107 -0
- huaweicloudsdkdwr/v3/model/show_system_template_detail_response.py +208 -0
- huaweicloudsdkdwr/v3/model/show_third_template_info_request.py +107 -0
- huaweicloudsdkdwr/v3/model/show_third_template_info_response.py +208 -0
- huaweicloudsdkdwr/v3/model/show_workflow_info_request.py +107 -0
- huaweicloudsdkdwr/v3/model/show_workflow_info_response.py +328 -0
- huaweicloudsdkdwr/v3/model/show_workflow_instance_request.py +135 -0
- huaweicloudsdkdwr/v3/model/show_workflow_instance_response.py +531 -0
- huaweicloudsdkdwr/v3/model/state.py +338 -0
- huaweicloudsdkdwr/v3/model/statement.py +137 -0
- huaweicloudsdkdwr/v3/model/third_action_template_item.py +282 -0
- huaweicloudsdkdwr/v3/model/third_template_request_body.py +423 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_request.py +132 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_response.py +270 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_request.py +107 -0
- huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_response.py +133 -0
- huaweicloudsdkdwr/v3/model/update_workflow_body.py +108 -0
- huaweicloudsdkdwr/v3/model/update_workflow_request.py +132 -0
- huaweicloudsdkdwr/v3/model/update_workflow_response.py +270 -0
- huaweicloudsdkdwr/v3/region/__init__.py +0 -0
- huaweicloudsdkdwr/v3/region/dwr_region.py +43 -0
- huaweicloudsdkdwr-3.1.181.dist-info/METADATA +25 -0
- huaweicloudsdkdwr-3.1.181.dist-info/RECORD +174 -0
- huaweicloudsdkdwr-3.1.181.dist-info/WHEEL +4 -0
- huaweicloudsdkdwr-3.1.181.dist-info/licenses/LICENSE +13 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class IndexDesc:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'index_name': 'str',
|
|
19
|
+
'field_name': 'str',
|
|
20
|
+
'index_params': 'dict(str, object)',
|
|
21
|
+
'index_state': 'str'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'index_name': 'index_name',
|
|
26
|
+
'field_name': 'field_name',
|
|
27
|
+
'index_params': 'index_params',
|
|
28
|
+
'index_state': 'index_state'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, index_name=None, field_name=None, index_params=None, index_state=None):
|
|
32
|
+
r"""IndexDesc
|
|
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 index_params: **参数解释:** 索引的参数信息。详情请查阅CreateIndex接口中 index_params结构中params字段的描述。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
41
|
+
:type index_params: dict(str, object)
|
|
42
|
+
:param index_state: **参数解释:** 索引状态。 **约束限制:** 不涉及。 **取值范围:** -\"InProgress\":索引正在构建中或还未开始构建。 -\"Finished\":索引构建完成。 -\"Failed\":索引构建失败。 **默认取值:** 不涉及。
|
|
43
|
+
:type index_state: str
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
self._index_name = None
|
|
49
|
+
self._field_name = None
|
|
50
|
+
self._index_params = None
|
|
51
|
+
self._index_state = None
|
|
52
|
+
self.discriminator = None
|
|
53
|
+
|
|
54
|
+
self.index_name = index_name
|
|
55
|
+
self.field_name = field_name
|
|
56
|
+
self.index_params = index_params
|
|
57
|
+
self.index_state = index_state
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def index_name(self):
|
|
61
|
+
r"""Gets the index_name of this IndexDesc.
|
|
62
|
+
|
|
63
|
+
**参数解释:** 描述的索引名称。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
64
|
+
|
|
65
|
+
:return: The index_name of this IndexDesc.
|
|
66
|
+
:rtype: str
|
|
67
|
+
"""
|
|
68
|
+
return self._index_name
|
|
69
|
+
|
|
70
|
+
@index_name.setter
|
|
71
|
+
def index_name(self, index_name):
|
|
72
|
+
r"""Sets the index_name of this IndexDesc.
|
|
73
|
+
|
|
74
|
+
**参数解释:** 描述的索引名称。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
75
|
+
|
|
76
|
+
:param index_name: The index_name of this IndexDesc.
|
|
77
|
+
:type index_name: str
|
|
78
|
+
"""
|
|
79
|
+
self._index_name = index_name
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def field_name(self):
|
|
83
|
+
r"""Gets the field_name of this IndexDesc.
|
|
84
|
+
|
|
85
|
+
**参数解释:** 索引对应的字段名称。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
86
|
+
|
|
87
|
+
:return: The field_name of this IndexDesc.
|
|
88
|
+
:rtype: str
|
|
89
|
+
"""
|
|
90
|
+
return self._field_name
|
|
91
|
+
|
|
92
|
+
@field_name.setter
|
|
93
|
+
def field_name(self, field_name):
|
|
94
|
+
r"""Sets the field_name of this IndexDesc.
|
|
95
|
+
|
|
96
|
+
**参数解释:** 索引对应的字段名称。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
97
|
+
|
|
98
|
+
:param field_name: The field_name of this IndexDesc.
|
|
99
|
+
:type field_name: str
|
|
100
|
+
"""
|
|
101
|
+
self._field_name = field_name
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def index_params(self):
|
|
105
|
+
r"""Gets the index_params of this IndexDesc.
|
|
106
|
+
|
|
107
|
+
**参数解释:** 索引的参数信息。详情请查阅CreateIndex接口中 index_params结构中params字段的描述。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
108
|
+
|
|
109
|
+
:return: The index_params of this IndexDesc.
|
|
110
|
+
:rtype: dict(str, object)
|
|
111
|
+
"""
|
|
112
|
+
return self._index_params
|
|
113
|
+
|
|
114
|
+
@index_params.setter
|
|
115
|
+
def index_params(self, index_params):
|
|
116
|
+
r"""Sets the index_params of this IndexDesc.
|
|
117
|
+
|
|
118
|
+
**参数解释:** 索引的参数信息。详情请查阅CreateIndex接口中 index_params结构中params字段的描述。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
119
|
+
|
|
120
|
+
:param index_params: The index_params of this IndexDesc.
|
|
121
|
+
:type index_params: dict(str, object)
|
|
122
|
+
"""
|
|
123
|
+
self._index_params = index_params
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def index_state(self):
|
|
127
|
+
r"""Gets the index_state of this IndexDesc.
|
|
128
|
+
|
|
129
|
+
**参数解释:** 索引状态。 **约束限制:** 不涉及。 **取值范围:** -\"InProgress\":索引正在构建中或还未开始构建。 -\"Finished\":索引构建完成。 -\"Failed\":索引构建失败。 **默认取值:** 不涉及。
|
|
130
|
+
|
|
131
|
+
:return: The index_state of this IndexDesc.
|
|
132
|
+
:rtype: str
|
|
133
|
+
"""
|
|
134
|
+
return self._index_state
|
|
135
|
+
|
|
136
|
+
@index_state.setter
|
|
137
|
+
def index_state(self, index_state):
|
|
138
|
+
r"""Sets the index_state of this IndexDesc.
|
|
139
|
+
|
|
140
|
+
**参数解释:** 索引状态。 **约束限制:** 不涉及。 **取值范围:** -\"InProgress\":索引正在构建中或还未开始构建。 -\"Finished\":索引构建完成。 -\"Failed\":索引构建失败。 **默认取值:** 不涉及。
|
|
141
|
+
|
|
142
|
+
:param index_state: The index_state of this IndexDesc.
|
|
143
|
+
:type index_state: str
|
|
144
|
+
"""
|
|
145
|
+
self._index_state = index_state
|
|
146
|
+
|
|
147
|
+
def to_dict(self):
|
|
148
|
+
result = {}
|
|
149
|
+
|
|
150
|
+
for attr, _ in self.openapi_types.items():
|
|
151
|
+
value = getattr(self, attr)
|
|
152
|
+
if isinstance(value, list):
|
|
153
|
+
result[attr] = list(map(
|
|
154
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
155
|
+
value
|
|
156
|
+
))
|
|
157
|
+
elif hasattr(value, "to_dict"):
|
|
158
|
+
result[attr] = value.to_dict()
|
|
159
|
+
elif isinstance(value, dict):
|
|
160
|
+
result[attr] = dict(map(
|
|
161
|
+
lambda item: (item[0], item[1].to_dict())
|
|
162
|
+
if hasattr(item[1], "to_dict") else item,
|
|
163
|
+
value.items()
|
|
164
|
+
))
|
|
165
|
+
else:
|
|
166
|
+
if attr in self.sensitive_list:
|
|
167
|
+
result[attr] = "****"
|
|
168
|
+
else:
|
|
169
|
+
result[attr] = value
|
|
170
|
+
|
|
171
|
+
return result
|
|
172
|
+
|
|
173
|
+
def to_str(self):
|
|
174
|
+
"""Returns the string representation of the model"""
|
|
175
|
+
import simplejson as json
|
|
176
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
177
|
+
|
|
178
|
+
def __repr__(self):
|
|
179
|
+
"""For `print`"""
|
|
180
|
+
return self.to_str()
|
|
181
|
+
|
|
182
|
+
def __eq__(self, other):
|
|
183
|
+
"""Returns true if both objects are equal"""
|
|
184
|
+
if not isinstance(other, IndexDesc):
|
|
185
|
+
return False
|
|
186
|
+
|
|
187
|
+
return self.__dict__ == other.__dict__
|
|
188
|
+
|
|
189
|
+
def __ne__(self, other):
|
|
190
|
+
"""Returns true if both objects are not equal"""
|
|
191
|
+
return not self == other
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class IndexParams:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'index_name': 'str',
|
|
19
|
+
'field_name': 'str',
|
|
20
|
+
'params': 'dict(str, object)'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'index_name': 'index_name',
|
|
25
|
+
'field_name': 'field_name',
|
|
26
|
+
'params': 'params'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, index_name=None, field_name=None, params=None):
|
|
30
|
+
r"""IndexParams
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param index_name: **参数解释:** 创建的索引名称,collection内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
35
|
+
:type index_name: str
|
|
36
|
+
:param field_name: **参数解释:** 要创建索引的目标字段名称。 **约束限制:** - 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 - field_name必须是collection field schema中存在的字段。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
37
|
+
:type field_name: str
|
|
38
|
+
:param params: **参数解释:** 创建的索引的参数配置。 可以设置的参数: - metric_type:向量度量方式,只有向量索引需要配置。 - index_type:创建的索引类型。 - params:对应索引类型的配置参数。 1. HNSW索引类型参数: - M:节点的最大度。 - efConstruction:构建索引时每个节点邻居数。 2. HANNS索引相关参数: - max_degree:节点的最大度数。较大的值提供更高的召回率但增加索引的大小和构建时间。 - search_list_size:候选列表的大小。较大的值增加构建索引的时间但提供更高的召回率。 - encoding_type: SQ/PQ,默认SQ。 - pq_code_budget_gb_ratio:PQ 码的大小限制。较大的值提供更高的召回率但增加内存使用量,仅当encoding_type为PQ时生效。 - beamwidth:每个搜索迭代的最大 IO 请求数与 CPU 数之间的比率,可用于提升索引性能。 3. IVF_FLAT索引相关参数: - nlist:聚类的数量。 - nprobe:查询聚类的数量。 **约束限制:** 不涉及。 **取值范围:** - metric_type: 1. 稠密向量支持度量方式:\"L2\"和\"COSINE\"。 2. 稀疏向量支持度量方式:\"IP\"。 - index_type: 1. 稠密向量支持索引类型:\"HNSW\"、\"HANNS\"和\"IVF_FLAT\"。 2. 稀疏向量支持索引类型:\"SPARSE_INVERTED_INDEX\"和\"SPARSE_WAND\"。 3. 标量字段支持索引类型:\"IVF_FLAT\"。 - params: 1. HNSW索引类型参数: - M:[2, 2048] - efConstruction:[1, int32_max] 2. HANNS索引相关参数: - max_degree:[1, 512] - search_list_size:[1, int32_max] - encoding_type: SQ/PQ - pq_code_budget_gb_ratio:[0.0, 0.25] - beamwidth:[1, 16] 3. IVF_FLAT索引相关参数: - nlist:[1, 65536] - nprobe:[1, nlist] **默认值:** - metric_type: 1. 稠密向量:\"L2\"。 2. 稀疏向量:\"IP\"。 3. 标量:无须配置 - index_type: 1. 稠密向量:\"HANNS\"。 2. 稀疏向量:\"SPARSE_INVERTED_INDEX\"。 3. 标量:\"IVF_FLAT\"。 - params:对应索引类型的配置参数。 1. HNSW索引类型参数: - M:16。 - efConstruction:200。 2. HANNS索引相关参数: - max_degree:56。 - search_list_size:100。 - encoding_type: 默认SQ。 - pq_code_budget_gb_ratio:0.125。 - beamwidth:0.0 3. IVF_FLAT索引相关参数: - nlist:128 - nprobe:8
|
|
39
|
+
:type params: dict(str, object)
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
self._index_name = None
|
|
45
|
+
self._field_name = None
|
|
46
|
+
self._params = None
|
|
47
|
+
self.discriminator = None
|
|
48
|
+
|
|
49
|
+
self.index_name = index_name
|
|
50
|
+
self.field_name = field_name
|
|
51
|
+
if params is not None:
|
|
52
|
+
self.params = params
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def index_name(self):
|
|
56
|
+
r"""Gets the index_name of this IndexParams.
|
|
57
|
+
|
|
58
|
+
**参数解释:** 创建的索引名称,collection内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
59
|
+
|
|
60
|
+
:return: The index_name of this IndexParams.
|
|
61
|
+
:rtype: str
|
|
62
|
+
"""
|
|
63
|
+
return self._index_name
|
|
64
|
+
|
|
65
|
+
@index_name.setter
|
|
66
|
+
def index_name(self, index_name):
|
|
67
|
+
r"""Sets the index_name of this IndexParams.
|
|
68
|
+
|
|
69
|
+
**参数解释:** 创建的索引名称,collection内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
70
|
+
|
|
71
|
+
:param index_name: The index_name of this IndexParams.
|
|
72
|
+
:type index_name: str
|
|
73
|
+
"""
|
|
74
|
+
self._index_name = index_name
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def field_name(self):
|
|
78
|
+
r"""Gets the field_name of this IndexParams.
|
|
79
|
+
|
|
80
|
+
**参数解释:** 要创建索引的目标字段名称。 **约束限制:** - 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 - field_name必须是collection field schema中存在的字段。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
81
|
+
|
|
82
|
+
:return: The field_name of this IndexParams.
|
|
83
|
+
:rtype: str
|
|
84
|
+
"""
|
|
85
|
+
return self._field_name
|
|
86
|
+
|
|
87
|
+
@field_name.setter
|
|
88
|
+
def field_name(self, field_name):
|
|
89
|
+
r"""Sets the field_name of this IndexParams.
|
|
90
|
+
|
|
91
|
+
**参数解释:** 要创建索引的目标字段名称。 **约束限制:** - 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 - field_name必须是collection field schema中存在的字段。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
92
|
+
|
|
93
|
+
:param field_name: The field_name of this IndexParams.
|
|
94
|
+
:type field_name: str
|
|
95
|
+
"""
|
|
96
|
+
self._field_name = field_name
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def params(self):
|
|
100
|
+
r"""Gets the params of this IndexParams.
|
|
101
|
+
|
|
102
|
+
**参数解释:** 创建的索引的参数配置。 可以设置的参数: - metric_type:向量度量方式,只有向量索引需要配置。 - index_type:创建的索引类型。 - params:对应索引类型的配置参数。 1. HNSW索引类型参数: - M:节点的最大度。 - efConstruction:构建索引时每个节点邻居数。 2. HANNS索引相关参数: - max_degree:节点的最大度数。较大的值提供更高的召回率但增加索引的大小和构建时间。 - search_list_size:候选列表的大小。较大的值增加构建索引的时间但提供更高的召回率。 - encoding_type: SQ/PQ,默认SQ。 - pq_code_budget_gb_ratio:PQ 码的大小限制。较大的值提供更高的召回率但增加内存使用量,仅当encoding_type为PQ时生效。 - beamwidth:每个搜索迭代的最大 IO 请求数与 CPU 数之间的比率,可用于提升索引性能。 3. IVF_FLAT索引相关参数: - nlist:聚类的数量。 - nprobe:查询聚类的数量。 **约束限制:** 不涉及。 **取值范围:** - metric_type: 1. 稠密向量支持度量方式:\"L2\"和\"COSINE\"。 2. 稀疏向量支持度量方式:\"IP\"。 - index_type: 1. 稠密向量支持索引类型:\"HNSW\"、\"HANNS\"和\"IVF_FLAT\"。 2. 稀疏向量支持索引类型:\"SPARSE_INVERTED_INDEX\"和\"SPARSE_WAND\"。 3. 标量字段支持索引类型:\"IVF_FLAT\"。 - params: 1. HNSW索引类型参数: - M:[2, 2048] - efConstruction:[1, int32_max] 2. HANNS索引相关参数: - max_degree:[1, 512] - search_list_size:[1, int32_max] - encoding_type: SQ/PQ - pq_code_budget_gb_ratio:[0.0, 0.25] - beamwidth:[1, 16] 3. IVF_FLAT索引相关参数: - nlist:[1, 65536] - nprobe:[1, nlist] **默认值:** - metric_type: 1. 稠密向量:\"L2\"。 2. 稀疏向量:\"IP\"。 3. 标量:无须配置 - index_type: 1. 稠密向量:\"HANNS\"。 2. 稀疏向量:\"SPARSE_INVERTED_INDEX\"。 3. 标量:\"IVF_FLAT\"。 - params:对应索引类型的配置参数。 1. HNSW索引类型参数: - M:16。 - efConstruction:200。 2. HANNS索引相关参数: - max_degree:56。 - search_list_size:100。 - encoding_type: 默认SQ。 - pq_code_budget_gb_ratio:0.125。 - beamwidth:0.0 3. IVF_FLAT索引相关参数: - nlist:128 - nprobe:8
|
|
103
|
+
|
|
104
|
+
:return: The params of this IndexParams.
|
|
105
|
+
:rtype: dict(str, object)
|
|
106
|
+
"""
|
|
107
|
+
return self._params
|
|
108
|
+
|
|
109
|
+
@params.setter
|
|
110
|
+
def params(self, params):
|
|
111
|
+
r"""Sets the params of this IndexParams.
|
|
112
|
+
|
|
113
|
+
**参数解释:** 创建的索引的参数配置。 可以设置的参数: - metric_type:向量度量方式,只有向量索引需要配置。 - index_type:创建的索引类型。 - params:对应索引类型的配置参数。 1. HNSW索引类型参数: - M:节点的最大度。 - efConstruction:构建索引时每个节点邻居数。 2. HANNS索引相关参数: - max_degree:节点的最大度数。较大的值提供更高的召回率但增加索引的大小和构建时间。 - search_list_size:候选列表的大小。较大的值增加构建索引的时间但提供更高的召回率。 - encoding_type: SQ/PQ,默认SQ。 - pq_code_budget_gb_ratio:PQ 码的大小限制。较大的值提供更高的召回率但增加内存使用量,仅当encoding_type为PQ时生效。 - beamwidth:每个搜索迭代的最大 IO 请求数与 CPU 数之间的比率,可用于提升索引性能。 3. IVF_FLAT索引相关参数: - nlist:聚类的数量。 - nprobe:查询聚类的数量。 **约束限制:** 不涉及。 **取值范围:** - metric_type: 1. 稠密向量支持度量方式:\"L2\"和\"COSINE\"。 2. 稀疏向量支持度量方式:\"IP\"。 - index_type: 1. 稠密向量支持索引类型:\"HNSW\"、\"HANNS\"和\"IVF_FLAT\"。 2. 稀疏向量支持索引类型:\"SPARSE_INVERTED_INDEX\"和\"SPARSE_WAND\"。 3. 标量字段支持索引类型:\"IVF_FLAT\"。 - params: 1. HNSW索引类型参数: - M:[2, 2048] - efConstruction:[1, int32_max] 2. HANNS索引相关参数: - max_degree:[1, 512] - search_list_size:[1, int32_max] - encoding_type: SQ/PQ - pq_code_budget_gb_ratio:[0.0, 0.25] - beamwidth:[1, 16] 3. IVF_FLAT索引相关参数: - nlist:[1, 65536] - nprobe:[1, nlist] **默认值:** - metric_type: 1. 稠密向量:\"L2\"。 2. 稀疏向量:\"IP\"。 3. 标量:无须配置 - index_type: 1. 稠密向量:\"HANNS\"。 2. 稀疏向量:\"SPARSE_INVERTED_INDEX\"。 3. 标量:\"IVF_FLAT\"。 - params:对应索引类型的配置参数。 1. HNSW索引类型参数: - M:16。 - efConstruction:200。 2. HANNS索引相关参数: - max_degree:56。 - search_list_size:100。 - encoding_type: 默认SQ。 - pq_code_budget_gb_ratio:0.125。 - beamwidth:0.0 3. IVF_FLAT索引相关参数: - nlist:128 - nprobe:8
|
|
114
|
+
|
|
115
|
+
:param params: The params of this IndexParams.
|
|
116
|
+
:type params: dict(str, object)
|
|
117
|
+
"""
|
|
118
|
+
self._params = params
|
|
119
|
+
|
|
120
|
+
def to_dict(self):
|
|
121
|
+
result = {}
|
|
122
|
+
|
|
123
|
+
for attr, _ in self.openapi_types.items():
|
|
124
|
+
value = getattr(self, attr)
|
|
125
|
+
if isinstance(value, list):
|
|
126
|
+
result[attr] = list(map(
|
|
127
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
128
|
+
value
|
|
129
|
+
))
|
|
130
|
+
elif hasattr(value, "to_dict"):
|
|
131
|
+
result[attr] = value.to_dict()
|
|
132
|
+
elif isinstance(value, dict):
|
|
133
|
+
result[attr] = dict(map(
|
|
134
|
+
lambda item: (item[0], item[1].to_dict())
|
|
135
|
+
if hasattr(item[1], "to_dict") else item,
|
|
136
|
+
value.items()
|
|
137
|
+
))
|
|
138
|
+
else:
|
|
139
|
+
if attr in self.sensitive_list:
|
|
140
|
+
result[attr] = "****"
|
|
141
|
+
else:
|
|
142
|
+
result[attr] = value
|
|
143
|
+
|
|
144
|
+
return result
|
|
145
|
+
|
|
146
|
+
def to_str(self):
|
|
147
|
+
"""Returns the string representation of the model"""
|
|
148
|
+
import simplejson as json
|
|
149
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
150
|
+
|
|
151
|
+
def __repr__(self):
|
|
152
|
+
"""For `print`"""
|
|
153
|
+
return self.to_str()
|
|
154
|
+
|
|
155
|
+
def __eq__(self, other):
|
|
156
|
+
"""Returns true if both objects are equal"""
|
|
157
|
+
if not isinstance(other, IndexParams):
|
|
158
|
+
return False
|
|
159
|
+
|
|
160
|
+
return self.__dict__ == other.__dict__
|
|
161
|
+
|
|
162
|
+
def __ne__(self, other):
|
|
163
|
+
"""Returns true if both objects are not equal"""
|
|
164
|
+
return not self == other
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class InsertEntitiesBody:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'store_name': 'str',
|
|
19
|
+
'collection_name': 'str',
|
|
20
|
+
'data': 'list[dict(str, object)]'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'store_name': 'store_name',
|
|
25
|
+
'collection_name': 'collection_name',
|
|
26
|
+
'data': 'data'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, store_name=None, collection_name=None, data=None):
|
|
30
|
+
r"""InsertEntitiesBody
|
|
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名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线( _ ),大小写敏感。第一个字符只能够是下划线( _ )和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
37
|
+
:type collection_name: str
|
|
38
|
+
:param data: **参数解释:** 插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
39
|
+
:type data: list[dict(str, object)]
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
self._store_name = None
|
|
45
|
+
self._collection_name = None
|
|
46
|
+
self._data = None
|
|
47
|
+
self.discriminator = None
|
|
48
|
+
|
|
49
|
+
self.store_name = store_name
|
|
50
|
+
self.collection_name = collection_name
|
|
51
|
+
self.data = data
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def store_name(self):
|
|
55
|
+
r"""Gets the store_name of this InsertEntitiesBody.
|
|
56
|
+
|
|
57
|
+
**参数解释:** 知识仓实例名称,region内唯一。 约束限制: 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
58
|
+
|
|
59
|
+
:return: The store_name of this InsertEntitiesBody.
|
|
60
|
+
:rtype: str
|
|
61
|
+
"""
|
|
62
|
+
return self._store_name
|
|
63
|
+
|
|
64
|
+
@store_name.setter
|
|
65
|
+
def store_name(self, store_name):
|
|
66
|
+
r"""Sets the store_name of this InsertEntitiesBody.
|
|
67
|
+
|
|
68
|
+
**参数解释:** 知识仓实例名称,region内唯一。 约束限制: 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
69
|
+
|
|
70
|
+
:param store_name: The store_name of this InsertEntitiesBody.
|
|
71
|
+
:type store_name: str
|
|
72
|
+
"""
|
|
73
|
+
self._store_name = store_name
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def collection_name(self):
|
|
77
|
+
r"""Gets the collection_name of this InsertEntitiesBody.
|
|
78
|
+
|
|
79
|
+
**参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线( _ ),大小写敏感。第一个字符只能够是下划线( _ )和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
80
|
+
|
|
81
|
+
:return: The collection_name of this InsertEntitiesBody.
|
|
82
|
+
:rtype: str
|
|
83
|
+
"""
|
|
84
|
+
return self._collection_name
|
|
85
|
+
|
|
86
|
+
@collection_name.setter
|
|
87
|
+
def collection_name(self, collection_name):
|
|
88
|
+
r"""Sets the collection_name of this InsertEntitiesBody.
|
|
89
|
+
|
|
90
|
+
**参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线( _ ),大小写敏感。第一个字符只能够是下划线( _ )和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
91
|
+
|
|
92
|
+
:param collection_name: The collection_name of this InsertEntitiesBody.
|
|
93
|
+
:type collection_name: str
|
|
94
|
+
"""
|
|
95
|
+
self._collection_name = collection_name
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def data(self):
|
|
99
|
+
r"""Gets the data of this InsertEntitiesBody.
|
|
100
|
+
|
|
101
|
+
**参数解释:** 插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
102
|
+
|
|
103
|
+
:return: The data of this InsertEntitiesBody.
|
|
104
|
+
:rtype: list[dict(str, object)]
|
|
105
|
+
"""
|
|
106
|
+
return self._data
|
|
107
|
+
|
|
108
|
+
@data.setter
|
|
109
|
+
def data(self, data):
|
|
110
|
+
r"""Sets the data of this InsertEntitiesBody.
|
|
111
|
+
|
|
112
|
+
**参数解释:** 插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
113
|
+
|
|
114
|
+
:param data: The data of this InsertEntitiesBody.
|
|
115
|
+
:type data: list[dict(str, object)]
|
|
116
|
+
"""
|
|
117
|
+
self._data = data
|
|
118
|
+
|
|
119
|
+
def to_dict(self):
|
|
120
|
+
result = {}
|
|
121
|
+
|
|
122
|
+
for attr, _ in self.openapi_types.items():
|
|
123
|
+
value = getattr(self, attr)
|
|
124
|
+
if isinstance(value, list):
|
|
125
|
+
result[attr] = list(map(
|
|
126
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
127
|
+
value
|
|
128
|
+
))
|
|
129
|
+
elif hasattr(value, "to_dict"):
|
|
130
|
+
result[attr] = value.to_dict()
|
|
131
|
+
elif isinstance(value, dict):
|
|
132
|
+
result[attr] = dict(map(
|
|
133
|
+
lambda item: (item[0], item[1].to_dict())
|
|
134
|
+
if hasattr(item[1], "to_dict") else item,
|
|
135
|
+
value.items()
|
|
136
|
+
))
|
|
137
|
+
else:
|
|
138
|
+
if attr in self.sensitive_list:
|
|
139
|
+
result[attr] = "****"
|
|
140
|
+
else:
|
|
141
|
+
result[attr] = value
|
|
142
|
+
|
|
143
|
+
return result
|
|
144
|
+
|
|
145
|
+
def to_str(self):
|
|
146
|
+
"""Returns the string representation of the model"""
|
|
147
|
+
import simplejson as json
|
|
148
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
149
|
+
|
|
150
|
+
def __repr__(self):
|
|
151
|
+
"""For `print`"""
|
|
152
|
+
return self.to_str()
|
|
153
|
+
|
|
154
|
+
def __eq__(self, other):
|
|
155
|
+
"""Returns true if both objects are equal"""
|
|
156
|
+
if not isinstance(other, InsertEntitiesBody):
|
|
157
|
+
return False
|
|
158
|
+
|
|
159
|
+
return self.__dict__ == other.__dict__
|
|
160
|
+
|
|
161
|
+
def __ne__(self, other):
|
|
162
|
+
"""Returns true if both objects are not equal"""
|
|
163
|
+
return not self == other
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class InsertEntitiesData:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'insert_count': 'int',
|
|
19
|
+
'insert_ids': 'list[object]'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'insert_count': 'insert_count',
|
|
24
|
+
'insert_ids': 'insert_ids'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, insert_count=None, insert_ids=None):
|
|
28
|
+
r"""InsertEntitiesData
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param insert_count: **参数解释:** 插入的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
33
|
+
:type insert_count: int
|
|
34
|
+
:param insert_ids: **参数解释:** 插入成功的entity的primary_key。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
35
|
+
:type insert_ids: list[object]
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._insert_count = None
|
|
41
|
+
self._insert_ids = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
self.insert_count = insert_count
|
|
45
|
+
if insert_ids is not None:
|
|
46
|
+
self.insert_ids = insert_ids
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def insert_count(self):
|
|
50
|
+
r"""Gets the insert_count of this InsertEntitiesData.
|
|
51
|
+
|
|
52
|
+
**参数解释:** 插入的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
53
|
+
|
|
54
|
+
:return: The insert_count of this InsertEntitiesData.
|
|
55
|
+
:rtype: int
|
|
56
|
+
"""
|
|
57
|
+
return self._insert_count
|
|
58
|
+
|
|
59
|
+
@insert_count.setter
|
|
60
|
+
def insert_count(self, insert_count):
|
|
61
|
+
r"""Sets the insert_count of this InsertEntitiesData.
|
|
62
|
+
|
|
63
|
+
**参数解释:** 插入的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
64
|
+
|
|
65
|
+
:param insert_count: The insert_count of this InsertEntitiesData.
|
|
66
|
+
:type insert_count: int
|
|
67
|
+
"""
|
|
68
|
+
self._insert_count = insert_count
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def insert_ids(self):
|
|
72
|
+
r"""Gets the insert_ids of this InsertEntitiesData.
|
|
73
|
+
|
|
74
|
+
**参数解释:** 插入成功的entity的primary_key。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
75
|
+
|
|
76
|
+
:return: The insert_ids of this InsertEntitiesData.
|
|
77
|
+
:rtype: list[object]
|
|
78
|
+
"""
|
|
79
|
+
return self._insert_ids
|
|
80
|
+
|
|
81
|
+
@insert_ids.setter
|
|
82
|
+
def insert_ids(self, insert_ids):
|
|
83
|
+
r"""Sets the insert_ids of this InsertEntitiesData.
|
|
84
|
+
|
|
85
|
+
**参数解释:** 插入成功的entity的primary_key。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
86
|
+
|
|
87
|
+
:param insert_ids: The insert_ids of this InsertEntitiesData.
|
|
88
|
+
:type insert_ids: list[object]
|
|
89
|
+
"""
|
|
90
|
+
self._insert_ids = insert_ids
|
|
91
|
+
|
|
92
|
+
def to_dict(self):
|
|
93
|
+
result = {}
|
|
94
|
+
|
|
95
|
+
for attr, _ in self.openapi_types.items():
|
|
96
|
+
value = getattr(self, attr)
|
|
97
|
+
if isinstance(value, list):
|
|
98
|
+
result[attr] = list(map(
|
|
99
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
100
|
+
value
|
|
101
|
+
))
|
|
102
|
+
elif hasattr(value, "to_dict"):
|
|
103
|
+
result[attr] = value.to_dict()
|
|
104
|
+
elif isinstance(value, dict):
|
|
105
|
+
result[attr] = dict(map(
|
|
106
|
+
lambda item: (item[0], item[1].to_dict())
|
|
107
|
+
if hasattr(item[1], "to_dict") else item,
|
|
108
|
+
value.items()
|
|
109
|
+
))
|
|
110
|
+
else:
|
|
111
|
+
if attr in self.sensitive_list:
|
|
112
|
+
result[attr] = "****"
|
|
113
|
+
else:
|
|
114
|
+
result[attr] = value
|
|
115
|
+
|
|
116
|
+
return result
|
|
117
|
+
|
|
118
|
+
def to_str(self):
|
|
119
|
+
"""Returns the string representation of the model"""
|
|
120
|
+
import simplejson as json
|
|
121
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
122
|
+
|
|
123
|
+
def __repr__(self):
|
|
124
|
+
"""For `print`"""
|
|
125
|
+
return self.to_str()
|
|
126
|
+
|
|
127
|
+
def __eq__(self, other):
|
|
128
|
+
"""Returns true if both objects are equal"""
|
|
129
|
+
if not isinstance(other, InsertEntitiesData):
|
|
130
|
+
return False
|
|
131
|
+
|
|
132
|
+
return self.__dict__ == other.__dict__
|
|
133
|
+
|
|
134
|
+
def __ne__(self, other):
|
|
135
|
+
"""Returns true if both objects are not equal"""
|
|
136
|
+
return not self == other
|