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,258 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SubSearch:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'vector_field': 'str',
|
|
21
|
+
'vector': 'list[object]',
|
|
22
|
+
'top_k': 'int',
|
|
23
|
+
'offset': 'int',
|
|
24
|
+
'filter': 'str',
|
|
25
|
+
'params': 'dict(str, object)'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
attribute_map = {
|
|
29
|
+
'vector_field': 'vector_field',
|
|
30
|
+
'vector': 'vector',
|
|
31
|
+
'top_k': 'top_k',
|
|
32
|
+
'offset': 'offset',
|
|
33
|
+
'filter': 'filter',
|
|
34
|
+
'params': 'params'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
def __init__(self, vector_field=None, vector=None, top_k=None, offset=None, filter=None, params=None):
|
|
38
|
+
r"""SubSearch
|
|
39
|
+
|
|
40
|
+
The model defined in huaweicloud sdk
|
|
41
|
+
|
|
42
|
+
:param vector_field: **参数解释:** 要搜索的向量字段名称。 **约束限制:** 必须是collection field schema中存在的向量字段名称。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
43
|
+
:type vector_field: str
|
|
44
|
+
:param vector: **参数解释:** 要搜索的向量字段数据。 **约束限制:** 与collection field schema中定义的对应向量字段的类型和维度一致。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
45
|
+
:type vector: list[object]
|
|
46
|
+
:param top_k: **参数解释:** 返回的entity个数限制。可以将此参数与offset结合使用以启用分页。 **约束限制:** 当sub_search数量为1时,top_k与offset取值的总和应小于16384。 **取值范围:** `[1, 16384]` **默认取值:** 10
|
|
47
|
+
:type top_k: int
|
|
48
|
+
:param offset: **参数解释:** 在搜索结果中跳过的记录数。可以将此参数与 top_k 参数结合使用以启用分页。 **约束限制:** 1.与top_k取值的总和应小于16384。 2.当sub_search数量为1时才生效。 **取值范围:** 大于等于0 **默认取值:** 0
|
|
49
|
+
:type offset: int
|
|
50
|
+
:param filter: **参数解释:** 用于过滤匹配entity的标量过滤条件。可以将此设置为空字符串以跳过标量过滤。 **约束限制:** 要构建标量过滤条件,请参阅filter表达式规则。 **取值范围:** 不涉及。 **默认取值:** 空字符串,不就行标量过滤。
|
|
51
|
+
:type filter: str
|
|
52
|
+
:param params: **参数解释:** 额外的搜索参数配置。 可以配置的参数: * ef: 每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(仅对HNSW索引类型生效) * search_list: 候选列表的大小,越大召回率越高,但性能会下降。(仅对HANNS索引类型生效) * cut_off_frequency: 通过停用词出现频率决定是否作为查询结果。(仅对稀疏向量搜索生效) **约束限制:** 不涉及。 **取值范围:** 当sub_search数量为1时: ef: [top_k + offset, int32_max] search_list: [top_k + offset, int32_max] cut_off_frequency:[0, 1.0] 当sub_search数量大于1时: ef: [top_k, int32_max] search_list: [top_k, int32_max] cut_off_frequency:[0, 1.0] **默认取值:** 当sub_search数量为1时: ef: top_k + offset search_list: top_k + offset cut_off_frequency: 0 当sub_search数量大于1时: ef: top_k search_list: top_k cut_off_frequency: 0
|
|
53
|
+
:type params: dict(str, object)
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
self._vector_field = None
|
|
59
|
+
self._vector = None
|
|
60
|
+
self._top_k = None
|
|
61
|
+
self._offset = None
|
|
62
|
+
self._filter = None
|
|
63
|
+
self._params = None
|
|
64
|
+
self.discriminator = None
|
|
65
|
+
|
|
66
|
+
self.vector_field = vector_field
|
|
67
|
+
self.vector = vector
|
|
68
|
+
if top_k is not None:
|
|
69
|
+
self.top_k = top_k
|
|
70
|
+
if offset is not None:
|
|
71
|
+
self.offset = offset
|
|
72
|
+
if filter is not None:
|
|
73
|
+
self.filter = filter
|
|
74
|
+
if params is not None:
|
|
75
|
+
self.params = params
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def vector_field(self):
|
|
79
|
+
r"""Gets the vector_field of this SubSearch.
|
|
80
|
+
|
|
81
|
+
**参数解释:** 要搜索的向量字段名称。 **约束限制:** 必须是collection field schema中存在的向量字段名称。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
82
|
+
|
|
83
|
+
:return: The vector_field of this SubSearch.
|
|
84
|
+
:rtype: str
|
|
85
|
+
"""
|
|
86
|
+
return self._vector_field
|
|
87
|
+
|
|
88
|
+
@vector_field.setter
|
|
89
|
+
def vector_field(self, vector_field):
|
|
90
|
+
r"""Sets the vector_field of this SubSearch.
|
|
91
|
+
|
|
92
|
+
**参数解释:** 要搜索的向量字段名称。 **约束限制:** 必须是collection field schema中存在的向量字段名称。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
93
|
+
|
|
94
|
+
:param vector_field: The vector_field of this SubSearch.
|
|
95
|
+
:type vector_field: str
|
|
96
|
+
"""
|
|
97
|
+
self._vector_field = vector_field
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def vector(self):
|
|
101
|
+
r"""Gets the vector of this SubSearch.
|
|
102
|
+
|
|
103
|
+
**参数解释:** 要搜索的向量字段数据。 **约束限制:** 与collection field schema中定义的对应向量字段的类型和维度一致。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
104
|
+
|
|
105
|
+
:return: The vector of this SubSearch.
|
|
106
|
+
:rtype: list[object]
|
|
107
|
+
"""
|
|
108
|
+
return self._vector
|
|
109
|
+
|
|
110
|
+
@vector.setter
|
|
111
|
+
def vector(self, vector):
|
|
112
|
+
r"""Sets the vector of this SubSearch.
|
|
113
|
+
|
|
114
|
+
**参数解释:** 要搜索的向量字段数据。 **约束限制:** 与collection field schema中定义的对应向量字段的类型和维度一致。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
115
|
+
|
|
116
|
+
:param vector: The vector of this SubSearch.
|
|
117
|
+
:type vector: list[object]
|
|
118
|
+
"""
|
|
119
|
+
self._vector = vector
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def top_k(self):
|
|
123
|
+
r"""Gets the top_k of this SubSearch.
|
|
124
|
+
|
|
125
|
+
**参数解释:** 返回的entity个数限制。可以将此参数与offset结合使用以启用分页。 **约束限制:** 当sub_search数量为1时,top_k与offset取值的总和应小于16384。 **取值范围:** `[1, 16384]` **默认取值:** 10
|
|
126
|
+
|
|
127
|
+
:return: The top_k of this SubSearch.
|
|
128
|
+
:rtype: int
|
|
129
|
+
"""
|
|
130
|
+
return self._top_k
|
|
131
|
+
|
|
132
|
+
@top_k.setter
|
|
133
|
+
def top_k(self, top_k):
|
|
134
|
+
r"""Sets the top_k of this SubSearch.
|
|
135
|
+
|
|
136
|
+
**参数解释:** 返回的entity个数限制。可以将此参数与offset结合使用以启用分页。 **约束限制:** 当sub_search数量为1时,top_k与offset取值的总和应小于16384。 **取值范围:** `[1, 16384]` **默认取值:** 10
|
|
137
|
+
|
|
138
|
+
:param top_k: The top_k of this SubSearch.
|
|
139
|
+
:type top_k: int
|
|
140
|
+
"""
|
|
141
|
+
self._top_k = top_k
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def offset(self):
|
|
145
|
+
r"""Gets the offset of this SubSearch.
|
|
146
|
+
|
|
147
|
+
**参数解释:** 在搜索结果中跳过的记录数。可以将此参数与 top_k 参数结合使用以启用分页。 **约束限制:** 1.与top_k取值的总和应小于16384。 2.当sub_search数量为1时才生效。 **取值范围:** 大于等于0 **默认取值:** 0
|
|
148
|
+
|
|
149
|
+
:return: The offset of this SubSearch.
|
|
150
|
+
:rtype: int
|
|
151
|
+
"""
|
|
152
|
+
return self._offset
|
|
153
|
+
|
|
154
|
+
@offset.setter
|
|
155
|
+
def offset(self, offset):
|
|
156
|
+
r"""Sets the offset of this SubSearch.
|
|
157
|
+
|
|
158
|
+
**参数解释:** 在搜索结果中跳过的记录数。可以将此参数与 top_k 参数结合使用以启用分页。 **约束限制:** 1.与top_k取值的总和应小于16384。 2.当sub_search数量为1时才生效。 **取值范围:** 大于等于0 **默认取值:** 0
|
|
159
|
+
|
|
160
|
+
:param offset: The offset of this SubSearch.
|
|
161
|
+
:type offset: int
|
|
162
|
+
"""
|
|
163
|
+
self._offset = offset
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def filter(self):
|
|
167
|
+
r"""Gets the filter of this SubSearch.
|
|
168
|
+
|
|
169
|
+
**参数解释:** 用于过滤匹配entity的标量过滤条件。可以将此设置为空字符串以跳过标量过滤。 **约束限制:** 要构建标量过滤条件,请参阅filter表达式规则。 **取值范围:** 不涉及。 **默认取值:** 空字符串,不就行标量过滤。
|
|
170
|
+
|
|
171
|
+
:return: The filter of this SubSearch.
|
|
172
|
+
:rtype: str
|
|
173
|
+
"""
|
|
174
|
+
return self._filter
|
|
175
|
+
|
|
176
|
+
@filter.setter
|
|
177
|
+
def filter(self, filter):
|
|
178
|
+
r"""Sets the filter of this SubSearch.
|
|
179
|
+
|
|
180
|
+
**参数解释:** 用于过滤匹配entity的标量过滤条件。可以将此设置为空字符串以跳过标量过滤。 **约束限制:** 要构建标量过滤条件,请参阅filter表达式规则。 **取值范围:** 不涉及。 **默认取值:** 空字符串,不就行标量过滤。
|
|
181
|
+
|
|
182
|
+
:param filter: The filter of this SubSearch.
|
|
183
|
+
:type filter: str
|
|
184
|
+
"""
|
|
185
|
+
self._filter = filter
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def params(self):
|
|
189
|
+
r"""Gets the params of this SubSearch.
|
|
190
|
+
|
|
191
|
+
**参数解释:** 额外的搜索参数配置。 可以配置的参数: * ef: 每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(仅对HNSW索引类型生效) * search_list: 候选列表的大小,越大召回率越高,但性能会下降。(仅对HANNS索引类型生效) * cut_off_frequency: 通过停用词出现频率决定是否作为查询结果。(仅对稀疏向量搜索生效) **约束限制:** 不涉及。 **取值范围:** 当sub_search数量为1时: ef: [top_k + offset, int32_max] search_list: [top_k + offset, int32_max] cut_off_frequency:[0, 1.0] 当sub_search数量大于1时: ef: [top_k, int32_max] search_list: [top_k, int32_max] cut_off_frequency:[0, 1.0] **默认取值:** 当sub_search数量为1时: ef: top_k + offset search_list: top_k + offset cut_off_frequency: 0 当sub_search数量大于1时: ef: top_k search_list: top_k cut_off_frequency: 0
|
|
192
|
+
|
|
193
|
+
:return: The params of this SubSearch.
|
|
194
|
+
:rtype: dict(str, object)
|
|
195
|
+
"""
|
|
196
|
+
return self._params
|
|
197
|
+
|
|
198
|
+
@params.setter
|
|
199
|
+
def params(self, params):
|
|
200
|
+
r"""Sets the params of this SubSearch.
|
|
201
|
+
|
|
202
|
+
**参数解释:** 额外的搜索参数配置。 可以配置的参数: * ef: 每个查询的邻居候选集大小。候选集越大,搜索的精度越高,但是搜索时间也会随之增加。(仅对HNSW索引类型生效) * search_list: 候选列表的大小,越大召回率越高,但性能会下降。(仅对HANNS索引类型生效) * cut_off_frequency: 通过停用词出现频率决定是否作为查询结果。(仅对稀疏向量搜索生效) **约束限制:** 不涉及。 **取值范围:** 当sub_search数量为1时: ef: [top_k + offset, int32_max] search_list: [top_k + offset, int32_max] cut_off_frequency:[0, 1.0] 当sub_search数量大于1时: ef: [top_k, int32_max] search_list: [top_k, int32_max] cut_off_frequency:[0, 1.0] **默认取值:** 当sub_search数量为1时: ef: top_k + offset search_list: top_k + offset cut_off_frequency: 0 当sub_search数量大于1时: ef: top_k search_list: top_k cut_off_frequency: 0
|
|
203
|
+
|
|
204
|
+
:param params: The params of this SubSearch.
|
|
205
|
+
:type params: dict(str, object)
|
|
206
|
+
"""
|
|
207
|
+
self._params = params
|
|
208
|
+
|
|
209
|
+
def to_dict(self):
|
|
210
|
+
"""Returns the model properties as a dict"""
|
|
211
|
+
result = {}
|
|
212
|
+
|
|
213
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
214
|
+
value = getattr(self, attr)
|
|
215
|
+
if isinstance(value, list):
|
|
216
|
+
result[attr] = list(map(
|
|
217
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
218
|
+
value
|
|
219
|
+
))
|
|
220
|
+
elif hasattr(value, "to_dict"):
|
|
221
|
+
result[attr] = value.to_dict()
|
|
222
|
+
elif isinstance(value, dict):
|
|
223
|
+
result[attr] = dict(map(
|
|
224
|
+
lambda item: (item[0], item[1].to_dict())
|
|
225
|
+
if hasattr(item[1], "to_dict") else item,
|
|
226
|
+
value.items()
|
|
227
|
+
))
|
|
228
|
+
else:
|
|
229
|
+
if attr in self.sensitive_list:
|
|
230
|
+
result[attr] = "****"
|
|
231
|
+
else:
|
|
232
|
+
result[attr] = value
|
|
233
|
+
|
|
234
|
+
return result
|
|
235
|
+
|
|
236
|
+
def to_str(self):
|
|
237
|
+
"""Returns the string representation of the model"""
|
|
238
|
+
import simplejson as json
|
|
239
|
+
if six.PY2:
|
|
240
|
+
import sys
|
|
241
|
+
reload(sys)
|
|
242
|
+
sys.setdefaultencoding("utf-8")
|
|
243
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
244
|
+
|
|
245
|
+
def __repr__(self):
|
|
246
|
+
"""For `print`"""
|
|
247
|
+
return self.to_str()
|
|
248
|
+
|
|
249
|
+
def __eq__(self, other):
|
|
250
|
+
"""Returns true if both objects are equal"""
|
|
251
|
+
if not isinstance(other, SubSearch):
|
|
252
|
+
return False
|
|
253
|
+
|
|
254
|
+
return self.__dict__ == other.__dict__
|
|
255
|
+
|
|
256
|
+
def __ne__(self, other):
|
|
257
|
+
"""Returns true if both objects are not equal"""
|
|
258
|
+
return not self == other
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpsertEntitiesBody:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'store_name': 'str',
|
|
21
|
+
'collection_name': 'str',
|
|
22
|
+
'data': 'list[dict(str, object)]'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'store_name': 'store_name',
|
|
27
|
+
'collection_name': 'collection_name',
|
|
28
|
+
'data': 'data'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, store_name=None, collection_name=None, data=None):
|
|
32
|
+
r"""UpsertEntitiesBody
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param store_name: **参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
37
|
+
:type store_name: str
|
|
38
|
+
:param collection_name: **参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
39
|
+
:type collection_name: str
|
|
40
|
+
:param data: **参数解释:** 更新插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
41
|
+
:type data: list[dict(str, object)]
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
self._store_name = None
|
|
47
|
+
self._collection_name = None
|
|
48
|
+
self._data = None
|
|
49
|
+
self.discriminator = None
|
|
50
|
+
|
|
51
|
+
self.store_name = store_name
|
|
52
|
+
self.collection_name = collection_name
|
|
53
|
+
self.data = data
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def store_name(self):
|
|
57
|
+
r"""Gets the store_name of this UpsertEntitiesBody.
|
|
58
|
+
|
|
59
|
+
**参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
60
|
+
|
|
61
|
+
:return: The store_name of this UpsertEntitiesBody.
|
|
62
|
+
:rtype: str
|
|
63
|
+
"""
|
|
64
|
+
return self._store_name
|
|
65
|
+
|
|
66
|
+
@store_name.setter
|
|
67
|
+
def store_name(self, store_name):
|
|
68
|
+
r"""Sets the store_name of this UpsertEntitiesBody.
|
|
69
|
+
|
|
70
|
+
**参数解释:** 知识仓实例名称,region内唯一。 **约束限制:** 长度范围为3到63个字符,支持小写字母、数字、中划线(-),第一个字符只能够是小写字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及 **默认取值:** 不涉及
|
|
71
|
+
|
|
72
|
+
:param store_name: The store_name of this UpsertEntitiesBody.
|
|
73
|
+
:type store_name: str
|
|
74
|
+
"""
|
|
75
|
+
self._store_name = store_name
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def collection_name(self):
|
|
79
|
+
r"""Gets the collection_name of this UpsertEntitiesBody.
|
|
80
|
+
|
|
81
|
+
**参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
82
|
+
|
|
83
|
+
:return: The collection_name of this UpsertEntitiesBody.
|
|
84
|
+
:rtype: str
|
|
85
|
+
"""
|
|
86
|
+
return self._collection_name
|
|
87
|
+
|
|
88
|
+
@collection_name.setter
|
|
89
|
+
def collection_name(self, collection_name):
|
|
90
|
+
r"""Sets the collection_name of this UpsertEntitiesBody.
|
|
91
|
+
|
|
92
|
+
**参数解释:** collection名称,知识仓内唯一。 **约束限制:** 长度范围为1到255个字符,支持字母、数字、中划线(-)和下划线(_),大小写敏感。第一个字符只能够是下划线(_)和字母,中划线(-)不得出现在字符串末尾。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
93
|
+
|
|
94
|
+
:param collection_name: The collection_name of this UpsertEntitiesBody.
|
|
95
|
+
:type collection_name: str
|
|
96
|
+
"""
|
|
97
|
+
self._collection_name = collection_name
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def data(self):
|
|
101
|
+
r"""Gets the data of this UpsertEntitiesBody.
|
|
102
|
+
|
|
103
|
+
**参数解释:** 更新插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
104
|
+
|
|
105
|
+
:return: The data of this UpsertEntitiesBody.
|
|
106
|
+
:rtype: list[dict(str, object)]
|
|
107
|
+
"""
|
|
108
|
+
return self._data
|
|
109
|
+
|
|
110
|
+
@data.setter
|
|
111
|
+
def data(self, data):
|
|
112
|
+
r"""Sets the data of this UpsertEntitiesBody.
|
|
113
|
+
|
|
114
|
+
**参数解释:** 更新插入collection的entity数据。 **约束限制:** 满足插入collection的field schema。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
115
|
+
|
|
116
|
+
:param data: The data of this UpsertEntitiesBody.
|
|
117
|
+
:type data: list[dict(str, object)]
|
|
118
|
+
"""
|
|
119
|
+
self._data = data
|
|
120
|
+
|
|
121
|
+
def to_dict(self):
|
|
122
|
+
"""Returns the model properties as a dict"""
|
|
123
|
+
result = {}
|
|
124
|
+
|
|
125
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
126
|
+
value = getattr(self, attr)
|
|
127
|
+
if isinstance(value, list):
|
|
128
|
+
result[attr] = list(map(
|
|
129
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
130
|
+
value
|
|
131
|
+
))
|
|
132
|
+
elif hasattr(value, "to_dict"):
|
|
133
|
+
result[attr] = value.to_dict()
|
|
134
|
+
elif isinstance(value, dict):
|
|
135
|
+
result[attr] = dict(map(
|
|
136
|
+
lambda item: (item[0], item[1].to_dict())
|
|
137
|
+
if hasattr(item[1], "to_dict") else item,
|
|
138
|
+
value.items()
|
|
139
|
+
))
|
|
140
|
+
else:
|
|
141
|
+
if attr in self.sensitive_list:
|
|
142
|
+
result[attr] = "****"
|
|
143
|
+
else:
|
|
144
|
+
result[attr] = value
|
|
145
|
+
|
|
146
|
+
return result
|
|
147
|
+
|
|
148
|
+
def to_str(self):
|
|
149
|
+
"""Returns the string representation of the model"""
|
|
150
|
+
import simplejson as json
|
|
151
|
+
if six.PY2:
|
|
152
|
+
import sys
|
|
153
|
+
reload(sys)
|
|
154
|
+
sys.setdefaultencoding("utf-8")
|
|
155
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
156
|
+
|
|
157
|
+
def __repr__(self):
|
|
158
|
+
"""For `print`"""
|
|
159
|
+
return self.to_str()
|
|
160
|
+
|
|
161
|
+
def __eq__(self, other):
|
|
162
|
+
"""Returns true if both objects are equal"""
|
|
163
|
+
if not isinstance(other, UpsertEntitiesBody):
|
|
164
|
+
return False
|
|
165
|
+
|
|
166
|
+
return self.__dict__ == other.__dict__
|
|
167
|
+
|
|
168
|
+
def __ne__(self, other):
|
|
169
|
+
"""Returns true if both objects are not equal"""
|
|
170
|
+
return not self == other
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpsertEntitiesData:
|
|
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
|
+
'upsert_count': 'int',
|
|
21
|
+
'upsert_ids': 'list[object]'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'upsert_count': 'upsert_count',
|
|
26
|
+
'upsert_ids': 'upsert_ids'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, upsert_count=None, upsert_ids=None):
|
|
30
|
+
r"""UpsertEntitiesData
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param upsert_count: **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
35
|
+
:type upsert_count: int
|
|
36
|
+
:param upsert_ids: **参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
37
|
+
:type upsert_ids: list[object]
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._upsert_count = None
|
|
43
|
+
self._upsert_ids = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
self.upsert_count = upsert_count
|
|
47
|
+
self.upsert_ids = upsert_ids
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def upsert_count(self):
|
|
51
|
+
r"""Gets the upsert_count of this UpsertEntitiesData.
|
|
52
|
+
|
|
53
|
+
**参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
54
|
+
|
|
55
|
+
:return: The upsert_count of this UpsertEntitiesData.
|
|
56
|
+
:rtype: int
|
|
57
|
+
"""
|
|
58
|
+
return self._upsert_count
|
|
59
|
+
|
|
60
|
+
@upsert_count.setter
|
|
61
|
+
def upsert_count(self, upsert_count):
|
|
62
|
+
r"""Sets the upsert_count of this UpsertEntitiesData.
|
|
63
|
+
|
|
64
|
+
**参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
65
|
+
|
|
66
|
+
:param upsert_count: The upsert_count of this UpsertEntitiesData.
|
|
67
|
+
:type upsert_count: int
|
|
68
|
+
"""
|
|
69
|
+
self._upsert_count = upsert_count
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def upsert_ids(self):
|
|
73
|
+
r"""Gets the upsert_ids of this UpsertEntitiesData.
|
|
74
|
+
|
|
75
|
+
**参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
76
|
+
|
|
77
|
+
:return: The upsert_ids of this UpsertEntitiesData.
|
|
78
|
+
:rtype: list[object]
|
|
79
|
+
"""
|
|
80
|
+
return self._upsert_ids
|
|
81
|
+
|
|
82
|
+
@upsert_ids.setter
|
|
83
|
+
def upsert_ids(self, upsert_ids):
|
|
84
|
+
r"""Sets the upsert_ids of this UpsertEntitiesData.
|
|
85
|
+
|
|
86
|
+
**参数解释:** 更新的entity数量。 **约束限制:** 不涉及。 **取值范围:** 不涉及。 **默认取值:** 不涉及。
|
|
87
|
+
|
|
88
|
+
:param upsert_ids: The upsert_ids of this UpsertEntitiesData.
|
|
89
|
+
:type upsert_ids: list[object]
|
|
90
|
+
"""
|
|
91
|
+
self._upsert_ids = upsert_ids
|
|
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, UpsertEntitiesData):
|
|
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,111 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpsertEntitiesRequest:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'body': 'UpsertEntitiesBody'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'body': 'body'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, body=None):
|
|
28
|
+
r"""UpsertEntitiesRequest
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param body: Body of the UpsertEntitiesRequest
|
|
33
|
+
:type body: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
self._body = None
|
|
39
|
+
self.discriminator = None
|
|
40
|
+
|
|
41
|
+
if body is not None:
|
|
42
|
+
self.body = body
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def body(self):
|
|
46
|
+
r"""Gets the body of this UpsertEntitiesRequest.
|
|
47
|
+
|
|
48
|
+
:return: The body of this UpsertEntitiesRequest.
|
|
49
|
+
:rtype: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
|
|
50
|
+
"""
|
|
51
|
+
return self._body
|
|
52
|
+
|
|
53
|
+
@body.setter
|
|
54
|
+
def body(self, body):
|
|
55
|
+
r"""Sets the body of this UpsertEntitiesRequest.
|
|
56
|
+
|
|
57
|
+
:param body: The body of this UpsertEntitiesRequest.
|
|
58
|
+
:type body: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesBody`
|
|
59
|
+
"""
|
|
60
|
+
self._body = body
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""Returns the model properties as a dict"""
|
|
64
|
+
result = {}
|
|
65
|
+
|
|
66
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
67
|
+
value = getattr(self, attr)
|
|
68
|
+
if isinstance(value, list):
|
|
69
|
+
result[attr] = list(map(
|
|
70
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
71
|
+
value
|
|
72
|
+
))
|
|
73
|
+
elif hasattr(value, "to_dict"):
|
|
74
|
+
result[attr] = value.to_dict()
|
|
75
|
+
elif isinstance(value, dict):
|
|
76
|
+
result[attr] = dict(map(
|
|
77
|
+
lambda item: (item[0], item[1].to_dict())
|
|
78
|
+
if hasattr(item[1], "to_dict") else item,
|
|
79
|
+
value.items()
|
|
80
|
+
))
|
|
81
|
+
else:
|
|
82
|
+
if attr in self.sensitive_list:
|
|
83
|
+
result[attr] = "****"
|
|
84
|
+
else:
|
|
85
|
+
result[attr] = value
|
|
86
|
+
|
|
87
|
+
return result
|
|
88
|
+
|
|
89
|
+
def to_str(self):
|
|
90
|
+
"""Returns the string representation of the model"""
|
|
91
|
+
import simplejson as json
|
|
92
|
+
if six.PY2:
|
|
93
|
+
import sys
|
|
94
|
+
reload(sys)
|
|
95
|
+
sys.setdefaultencoding("utf-8")
|
|
96
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
97
|
+
|
|
98
|
+
def __repr__(self):
|
|
99
|
+
"""For `print`"""
|
|
100
|
+
return self.to_str()
|
|
101
|
+
|
|
102
|
+
def __eq__(self, other):
|
|
103
|
+
"""Returns true if both objects are equal"""
|
|
104
|
+
if not isinstance(other, UpsertEntitiesRequest):
|
|
105
|
+
return False
|
|
106
|
+
|
|
107
|
+
return self.__dict__ == other.__dict__
|
|
108
|
+
|
|
109
|
+
def __ne__(self, other):
|
|
110
|
+
"""Returns true if both objects are not equal"""
|
|
111
|
+
return not self == other
|