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.

Files changed (171) hide show
  1. huaweicloudsdkdwr/__init__.py +0 -0
  2. huaweicloudsdkdwr/v1/__init__.py +93 -0
  3. huaweicloudsdkdwr/v1/dwr_async_client.py +1519 -0
  4. huaweicloudsdkdwr/v1/dwr_client.py +1516 -0
  5. huaweicloudsdkdwr/v1/model/__init__.py +90 -0
  6. huaweicloudsdkdwr/v1/model/build_progress.py +231 -0
  7. huaweicloudsdkdwr/v1/model/charge_info.py +230 -0
  8. huaweicloudsdkdwr/v1/model/collection_base_info.py +142 -0
  9. huaweicloudsdkdwr/v1/model/create_collection_body.py +281 -0
  10. huaweicloudsdkdwr/v1/model/create_collection_request.py +111 -0
  11. huaweicloudsdkdwr/v1/model/create_collection_response.py +145 -0
  12. huaweicloudsdkdwr/v1/model/create_index_body.py +166 -0
  13. huaweicloudsdkdwr/v1/model/create_index_request.py +111 -0
  14. huaweicloudsdkdwr/v1/model/create_index_response.py +145 -0
  15. huaweicloudsdkdwr/v1/model/create_store_body.py +248 -0
  16. huaweicloudsdkdwr/v1/model/create_store_data.py +335 -0
  17. huaweicloudsdkdwr/v1/model/create_store_request.py +111 -0
  18. huaweicloudsdkdwr/v1/model/create_store_response.py +170 -0
  19. huaweicloudsdkdwr/v1/model/decribe_collection_data.py +344 -0
  20. huaweicloudsdkdwr/v1/model/delete_collection_request.py +111 -0
  21. huaweicloudsdkdwr/v1/model/delete_collection_response.py +145 -0
  22. huaweicloudsdkdwr/v1/model/delete_entities_body.py +170 -0
  23. huaweicloudsdkdwr/v1/model/delete_entities_request.py +111 -0
  24. huaweicloudsdkdwr/v1/model/delete_entities_response.py +145 -0
  25. huaweicloudsdkdwr/v1/model/delete_index_body.py +170 -0
  26. huaweicloudsdkdwr/v1/model/delete_index_request.py +111 -0
  27. huaweicloudsdkdwr/v1/model/delete_index_response.py +145 -0
  28. huaweicloudsdkdwr/v1/model/delete_store_data.py +114 -0
  29. huaweicloudsdkdwr/v1/model/delete_store_request.py +111 -0
  30. huaweicloudsdkdwr/v1/model/delete_store_response.py +170 -0
  31. huaweicloudsdkdwr/v1/model/describe_collection_request.py +111 -0
  32. huaweicloudsdkdwr/v1/model/describe_collection_response.py +170 -0
  33. huaweicloudsdkdwr/v1/model/describe_index_body.py +170 -0
  34. huaweicloudsdkdwr/v1/model/describe_index_data.py +166 -0
  35. huaweicloudsdkdwr/v1/model/describe_index_request.py +111 -0
  36. huaweicloudsdkdwr/v1/model/describe_index_response.py +170 -0
  37. huaweicloudsdkdwr/v1/model/describe_job_body.py +114 -0
  38. huaweicloudsdkdwr/v1/model/describe_job_request.py +111 -0
  39. huaweicloudsdkdwr/v1/model/describe_job_response.py +170 -0
  40. huaweicloudsdkdwr/v1/model/describe_store_request.py +111 -0
  41. huaweicloudsdkdwr/v1/model/describe_store_response.py +170 -0
  42. huaweicloudsdkdwr/v1/model/entities_data.py +114 -0
  43. huaweicloudsdkdwr/v1/model/field.py +229 -0
  44. huaweicloudsdkdwr/v1/model/field_data.py +285 -0
  45. huaweicloudsdkdwr/v1/model/flavor.py +142 -0
  46. huaweicloudsdkdwr/v1/model/get_index_progress_body.py +170 -0
  47. huaweicloudsdkdwr/v1/model/get_progress_data.py +167 -0
  48. huaweicloudsdkdwr/v1/model/get_progress_request.py +111 -0
  49. huaweicloudsdkdwr/v1/model/get_progress_response.py +170 -0
  50. huaweicloudsdkdwr/v1/model/hybrid_search_body.py +282 -0
  51. huaweicloudsdkdwr/v1/model/hybrid_search_request.py +111 -0
  52. huaweicloudsdkdwr/v1/model/hybrid_search_response.py +170 -0
  53. huaweicloudsdkdwr/v1/model/index_desc.py +198 -0
  54. huaweicloudsdkdwr/v1/model/index_params.py +171 -0
  55. huaweicloudsdkdwr/v1/model/insert_entities_body.py +170 -0
  56. huaweicloudsdkdwr/v1/model/insert_entities_data.py +143 -0
  57. huaweicloudsdkdwr/v1/model/insert_entities_request.py +111 -0
  58. huaweicloudsdkdwr/v1/model/insert_entities_response.py +170 -0
  59. huaweicloudsdkdwr/v1/model/job_data.py +316 -0
  60. huaweicloudsdkdwr/v1/model/list_collection_data.py +143 -0
  61. huaweicloudsdkdwr/v1/model/list_collection_details.py +260 -0
  62. huaweicloudsdkdwr/v1/model/list_collections_body.py +143 -0
  63. huaweicloudsdkdwr/v1/model/list_collections_request.py +111 -0
  64. huaweicloudsdkdwr/v1/model/list_collections_response.py +170 -0
  65. huaweicloudsdkdwr/v1/model/list_jobs_data.py +115 -0
  66. huaweicloudsdkdwr/v1/model/list_jobs_request.py +231 -0
  67. huaweicloudsdkdwr/v1/model/list_jobs_response.py +170 -0
  68. huaweicloudsdkdwr/v1/model/list_store_data.py +114 -0
  69. huaweicloudsdkdwr/v1/model/list_stores_request.py +84 -0
  70. huaweicloudsdkdwr/v1/model/list_stores_response.py +170 -0
  71. huaweicloudsdkdwr/v1/model/load_collection_body.py +142 -0
  72. huaweicloudsdkdwr/v1/model/load_collection_request.py +111 -0
  73. huaweicloudsdkdwr/v1/model/load_collection_response.py +145 -0
  74. huaweicloudsdkdwr/v1/model/primary_field.py +142 -0
  75. huaweicloudsdkdwr/v1/model/query_entities_body.py +257 -0
  76. huaweicloudsdkdwr/v1/model/query_entities_request.py +111 -0
  77. huaweicloudsdkdwr/v1/model/query_entities_response.py +170 -0
  78. huaweicloudsdkdwr/v1/model/release_collection_request.py +111 -0
  79. huaweicloudsdkdwr/v1/model/release_collection_response.py +145 -0
  80. huaweicloudsdkdwr/v1/model/rerank.py +143 -0
  81. huaweicloudsdkdwr/v1/model/search_entities_body.py +343 -0
  82. huaweicloudsdkdwr/v1/model/search_entities_request.py +111 -0
  83. huaweicloudsdkdwr/v1/model/search_entities_response.py +170 -0
  84. huaweicloudsdkdwr/v1/model/store_data.py +364 -0
  85. huaweicloudsdkdwr/v1/model/store_info.py +114 -0
  86. huaweicloudsdkdwr/v1/model/sub_search.py +258 -0
  87. huaweicloudsdkdwr/v1/model/upsert_entities_body.py +170 -0
  88. huaweicloudsdkdwr/v1/model/upsert_entities_data.py +142 -0
  89. huaweicloudsdkdwr/v1/model/upsert_entities_request.py +111 -0
  90. huaweicloudsdkdwr/v1/model/upsert_entities_response.py +170 -0
  91. huaweicloudsdkdwr/v1/region/__init__.py +0 -0
  92. huaweicloudsdkdwr/v1/region/dwr_region.py +43 -0
  93. huaweicloudsdkdwr/v3/__init__.py +76 -0
  94. huaweicloudsdkdwr/v3/dwr_async_client.py +1622 -0
  95. huaweicloudsdkdwr/v3/dwr_client.py +1619 -0
  96. huaweicloudsdkdwr/v3/model/__init__.py +73 -0
  97. huaweicloudsdkdwr/v3/model/accept_service_contract_request.py +114 -0
  98. huaweicloudsdkdwr/v3/model/accept_service_contract_response.py +137 -0
  99. huaweicloudsdkdwr/v3/model/action.py +427 -0
  100. huaweicloudsdkdwr/v3/model/action_result.py +228 -0
  101. huaweicloudsdkdwr/v3/model/action_template_item.py +144 -0
  102. huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_request.py +139 -0
  103. huaweicloudsdkdwr/v3/model/async_invoke_api_start_workflow_response.py +274 -0
  104. huaweicloudsdkdwr/v3/model/check_workflow_authentication_request.py +84 -0
  105. huaweicloudsdkdwr/v3/model/check_workflow_authentication_response.py +477 -0
  106. huaweicloudsdkdwr/v3/model/create_my_action_template_request.py +139 -0
  107. huaweicloudsdkdwr/v3/model/create_my_action_template_response.py +419 -0
  108. huaweicloudsdkdwr/v3/model/create_workflow_authentication_request.py +84 -0
  109. huaweicloudsdkdwr/v3/model/create_workflow_authentication_response.py +137 -0
  110. huaweicloudsdkdwr/v3/model/create_workflow_request.py +139 -0
  111. huaweicloudsdkdwr/v3/model/create_workflow_request_body.py +281 -0
  112. huaweicloudsdkdwr/v3/model/create_workflow_response.py +274 -0
  113. huaweicloudsdkdwr/v3/model/delete_my_action_template_request.py +114 -0
  114. huaweicloudsdkdwr/v3/model/delete_my_action_template_response.py +137 -0
  115. huaweicloudsdkdwr/v3/model/delete_workflow_request.py +114 -0
  116. huaweicloudsdkdwr/v3/model/delete_workflow_response.py +137 -0
  117. huaweicloudsdkdwr/v3/model/execute_workflow_body.py +167 -0
  118. huaweicloudsdkdwr/v3/model/execution.py +289 -0
  119. huaweicloudsdkdwr/v3/model/express_config.py +144 -0
  120. huaweicloudsdkdwr/v3/model/func_vpc.py +260 -0
  121. huaweicloudsdkdwr/v3/model/graph_item.py +202 -0
  122. huaweicloudsdkdwr/v3/model/input.py +370 -0
  123. huaweicloudsdkdwr/v3/model/input_para_type.py +84 -0
  124. huaweicloudsdkdwr/v3/model/input_para_value_type.py +89 -0
  125. huaweicloudsdkdwr/v3/model/list_my_action_template_request.py +231 -0
  126. huaweicloudsdkdwr/v3/model/list_my_action_template_response.py +303 -0
  127. huaweicloudsdkdwr/v3/model/list_system_templates_request.py +202 -0
  128. huaweicloudsdkdwr/v3/model/list_system_templates_response.py +332 -0
  129. huaweicloudsdkdwr/v3/model/list_workflow_instance_request.py +259 -0
  130. huaweicloudsdkdwr/v3/model/list_workflow_instance_response.py +303 -0
  131. huaweicloudsdkdwr/v3/model/list_workflows_request.py +173 -0
  132. huaweicloudsdkdwr/v3/model/list_workflows_response.py +303 -0
  133. huaweicloudsdkdwr/v3/model/node_execution.py +289 -0
  134. huaweicloudsdkdwr/v3/model/policy.py +144 -0
  135. huaweicloudsdkdwr/v3/model/provided_action.py +564 -0
  136. huaweicloudsdkdwr/v3/model/public_template_item.py +285 -0
  137. huaweicloudsdkdwr/v3/model/public_template_register_type.py +87 -0
  138. huaweicloudsdkdwr/v3/model/restore_workflow_execution_request.py +142 -0
  139. huaweicloudsdkdwr/v3/model/restore_workflow_execution_response.py +274 -0
  140. huaweicloudsdkdwr/v3/model/show_public_action_list_request.py +202 -0
  141. huaweicloudsdkdwr/v3/model/show_public_action_list_response.py +332 -0
  142. huaweicloudsdkdwr/v3/model/show_public_template_info_request.py +114 -0
  143. huaweicloudsdkdwr/v3/model/show_public_template_info_response.py +212 -0
  144. huaweicloudsdkdwr/v3/model/show_service_contract_request.py +114 -0
  145. huaweicloudsdkdwr/v3/model/show_service_contract_response.py +245 -0
  146. huaweicloudsdkdwr/v3/model/show_system_template_detail_request.py +114 -0
  147. huaweicloudsdkdwr/v3/model/show_system_template_detail_response.py +212 -0
  148. huaweicloudsdkdwr/v3/model/show_third_template_info_request.py +114 -0
  149. huaweicloudsdkdwr/v3/model/show_third_template_info_response.py +212 -0
  150. huaweicloudsdkdwr/v3/model/show_workflow_info_request.py +114 -0
  151. huaweicloudsdkdwr/v3/model/show_workflow_info_response.py +332 -0
  152. huaweicloudsdkdwr/v3/model/show_workflow_instance_request.py +142 -0
  153. huaweicloudsdkdwr/v3/model/show_workflow_instance_response.py +535 -0
  154. huaweicloudsdkdwr/v3/model/state.py +345 -0
  155. huaweicloudsdkdwr/v3/model/statement.py +144 -0
  156. huaweicloudsdkdwr/v3/model/third_action_template_item.py +285 -0
  157. huaweicloudsdkdwr/v3/model/third_template_request_body.py +430 -0
  158. huaweicloudsdkdwr/v3/model/update_my_action_template_request.py +139 -0
  159. huaweicloudsdkdwr/v3/model/update_my_action_template_response.py +274 -0
  160. huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_request.py +114 -0
  161. huaweicloudsdkdwr/v3/model/update_my_action_template_to_deprecated_response.py +137 -0
  162. huaweicloudsdkdwr/v3/model/update_workflow_body.py +115 -0
  163. huaweicloudsdkdwr/v3/model/update_workflow_request.py +139 -0
  164. huaweicloudsdkdwr/v3/model/update_workflow_response.py +274 -0
  165. huaweicloudsdkdwr/v3/region/__init__.py +0 -0
  166. huaweicloudsdkdwr/v3/region/dwr_region.py +43 -0
  167. huaweicloudsdkdwr-3.1.160.dist-info/LICENSE +13 -0
  168. huaweicloudsdkdwr-3.1.160.dist-info/METADATA +26 -0
  169. huaweicloudsdkdwr-3.1.160.dist-info/RECORD +171 -0
  170. huaweicloudsdkdwr-3.1.160.dist-info/WHEEL +5 -0
  171. huaweicloudsdkdwr-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1516 @@
1
+ # coding: utf-8
2
+
3
+ from __future__ import absolute_import
4
+
5
+ import importlib
6
+ import warnings
7
+
8
+ from huaweicloudsdkcore.client import Client, ClientBuilder
9
+ from huaweicloudsdkcore.utils import http_utils
10
+ from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
11
+
12
+ try:
13
+ from huaweicloudsdkcore.invoker.invoker import SyncInvoker
14
+ except ImportError as e:
15
+ warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkdwr'")
16
+
17
+
18
+ class DwrClient(Client):
19
+ def __init__(self):
20
+ super(DwrClient, self).__init__()
21
+ self.model_package = importlib.import_module("huaweicloudsdkdwr.v1.model")
22
+
23
+ @classmethod
24
+ def new_builder(cls, clazz=None):
25
+ if not clazz:
26
+ client_builder = ClientBuilder(cls)
27
+ else:
28
+ if clazz.__name__ != "DwrClient":
29
+ raise TypeError("client type error, support client type is DwrClient")
30
+ client_builder = ClientBuilder(clazz)
31
+
32
+
33
+
34
+ return client_builder
35
+
36
+ def create_collection(self, request):
37
+ r"""创建collection
38
+
39
+ 在知识仓实例下创建collection。
40
+
41
+ Please refer to HUAWEI cloud API Explorer for details.
42
+
43
+ :param request: Request instance for CreateCollection
44
+ :type request: :class:`huaweicloudsdkdwr.v1.CreateCollectionRequest`
45
+ :rtype: :class:`huaweicloudsdkdwr.v1.CreateCollectionResponse`
46
+ """
47
+ http_info = self._create_collection_http_info(request)
48
+ return self._call_api(**http_info)
49
+
50
+ def create_collection_invoker(self, request):
51
+ http_info = self._create_collection_http_info(request)
52
+ return SyncInvoker(self, http_info)
53
+
54
+ @classmethod
55
+ def _create_collection_http_info(cls, request):
56
+ http_info = {
57
+ "method": "POST",
58
+ "resource_path": "/v1/collections/create",
59
+ "request_type": request.__class__.__name__,
60
+ "response_type": "CreateCollectionResponse"
61
+ }
62
+
63
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
64
+
65
+ cname = None
66
+
67
+ collection_formats = {}
68
+
69
+ path_params = {}
70
+
71
+ query_params = []
72
+
73
+ header_params = {}
74
+
75
+ form_params = {}
76
+
77
+ body = None
78
+ if 'body' in local_var_params:
79
+ body = local_var_params['body']
80
+ if isinstance(request, SdkStreamRequest):
81
+ body = request.get_file_stream()
82
+
83
+ response_headers = []
84
+
85
+ header_params['Content-Type'] = http_utils.select_header_content_type(
86
+ ['application/json'])
87
+
88
+ auth_settings = []
89
+
90
+ http_info["cname"] = cname
91
+ http_info["collection_formats"] = collection_formats
92
+ http_info["path_params"] = path_params
93
+ http_info["query_params"] = query_params
94
+ http_info["header_params"] = header_params
95
+ http_info["post_params"] = form_params
96
+ http_info["body"] = body
97
+ http_info["response_headers"] = response_headers
98
+
99
+ return http_info
100
+
101
+ def create_index(self, request):
102
+ r"""创建索引
103
+
104
+ 在指定的collection中,按照参数创建索引。
105
+
106
+ Please refer to HUAWEI cloud API Explorer for details.
107
+
108
+ :param request: Request instance for CreateIndex
109
+ :type request: :class:`huaweicloudsdkdwr.v1.CreateIndexRequest`
110
+ :rtype: :class:`huaweicloudsdkdwr.v1.CreateIndexResponse`
111
+ """
112
+ http_info = self._create_index_http_info(request)
113
+ return self._call_api(**http_info)
114
+
115
+ def create_index_invoker(self, request):
116
+ http_info = self._create_index_http_info(request)
117
+ return SyncInvoker(self, http_info)
118
+
119
+ @classmethod
120
+ def _create_index_http_info(cls, request):
121
+ http_info = {
122
+ "method": "POST",
123
+ "resource_path": "/v1/indexes/create",
124
+ "request_type": request.__class__.__name__,
125
+ "response_type": "CreateIndexResponse"
126
+ }
127
+
128
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
129
+
130
+ cname = None
131
+
132
+ collection_formats = {}
133
+
134
+ path_params = {}
135
+
136
+ query_params = []
137
+
138
+ header_params = {}
139
+
140
+ form_params = {}
141
+
142
+ body = None
143
+ if 'body' in local_var_params:
144
+ body = local_var_params['body']
145
+ if isinstance(request, SdkStreamRequest):
146
+ body = request.get_file_stream()
147
+
148
+ response_headers = []
149
+
150
+ header_params['Content-Type'] = http_utils.select_header_content_type(
151
+ ['application/json'])
152
+
153
+ auth_settings = []
154
+
155
+ http_info["cname"] = cname
156
+ http_info["collection_formats"] = collection_formats
157
+ http_info["path_params"] = path_params
158
+ http_info["query_params"] = query_params
159
+ http_info["header_params"] = header_params
160
+ http_info["post_params"] = form_params
161
+ http_info["body"] = body
162
+ http_info["response_headers"] = response_headers
163
+
164
+ return http_info
165
+
166
+ def create_store(self, request):
167
+ r"""创建知识仓实例
168
+
169
+ 创建知识仓实例。知识仓实例名称region内唯一。
170
+
171
+ Please refer to HUAWEI cloud API Explorer for details.
172
+
173
+ :param request: Request instance for CreateStore
174
+ :type request: :class:`huaweicloudsdkdwr.v1.CreateStoreRequest`
175
+ :rtype: :class:`huaweicloudsdkdwr.v1.CreateStoreResponse`
176
+ """
177
+ http_info = self._create_store_http_info(request)
178
+ return self._call_api(**http_info)
179
+
180
+ def create_store_invoker(self, request):
181
+ http_info = self._create_store_http_info(request)
182
+ return SyncInvoker(self, http_info)
183
+
184
+ @classmethod
185
+ def _create_store_http_info(cls, request):
186
+ http_info = {
187
+ "method": "POST",
188
+ "resource_path": "/v1/stores/create",
189
+ "request_type": request.__class__.__name__,
190
+ "response_type": "CreateStoreResponse"
191
+ }
192
+
193
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
194
+
195
+ cname = None
196
+
197
+ collection_formats = {}
198
+
199
+ path_params = {}
200
+
201
+ query_params = []
202
+
203
+ header_params = {}
204
+
205
+ form_params = {}
206
+
207
+ body = None
208
+ if 'body' in local_var_params:
209
+ body = local_var_params['body']
210
+ if isinstance(request, SdkStreamRequest):
211
+ body = request.get_file_stream()
212
+
213
+ response_headers = []
214
+
215
+ header_params['Content-Type'] = http_utils.select_header_content_type(
216
+ ['application/json'])
217
+
218
+ auth_settings = []
219
+
220
+ http_info["cname"] = cname
221
+ http_info["collection_formats"] = collection_formats
222
+ http_info["path_params"] = path_params
223
+ http_info["query_params"] = query_params
224
+ http_info["header_params"] = header_params
225
+ http_info["post_params"] = form_params
226
+ http_info["body"] = body
227
+ http_info["response_headers"] = response_headers
228
+
229
+ return http_info
230
+
231
+ def delete_collection(self, request):
232
+ r"""删除collection
233
+
234
+ 在知识仓实例下删除指定的collection。
235
+
236
+ Please refer to HUAWEI cloud API Explorer for details.
237
+
238
+ :param request: Request instance for DeleteCollection
239
+ :type request: :class:`huaweicloudsdkdwr.v1.DeleteCollectionRequest`
240
+ :rtype: :class:`huaweicloudsdkdwr.v1.DeleteCollectionResponse`
241
+ """
242
+ http_info = self._delete_collection_http_info(request)
243
+ return self._call_api(**http_info)
244
+
245
+ def delete_collection_invoker(self, request):
246
+ http_info = self._delete_collection_http_info(request)
247
+ return SyncInvoker(self, http_info)
248
+
249
+ @classmethod
250
+ def _delete_collection_http_info(cls, request):
251
+ http_info = {
252
+ "method": "POST",
253
+ "resource_path": "/v1/collections/delete",
254
+ "request_type": request.__class__.__name__,
255
+ "response_type": "DeleteCollectionResponse"
256
+ }
257
+
258
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
259
+
260
+ cname = None
261
+
262
+ collection_formats = {}
263
+
264
+ path_params = {}
265
+
266
+ query_params = []
267
+
268
+ header_params = {}
269
+
270
+ form_params = {}
271
+
272
+ body = None
273
+ if 'body' in local_var_params:
274
+ body = local_var_params['body']
275
+ if isinstance(request, SdkStreamRequest):
276
+ body = request.get_file_stream()
277
+
278
+ response_headers = []
279
+
280
+ header_params['Content-Type'] = http_utils.select_header_content_type(
281
+ ['application/json'])
282
+
283
+ auth_settings = []
284
+
285
+ http_info["cname"] = cname
286
+ http_info["collection_formats"] = collection_formats
287
+ http_info["path_params"] = path_params
288
+ http_info["query_params"] = query_params
289
+ http_info["header_params"] = header_params
290
+ http_info["post_params"] = form_params
291
+ http_info["body"] = body
292
+ http_info["response_headers"] = response_headers
293
+
294
+ return http_info
295
+
296
+ def delete_index(self, request):
297
+ r"""删除索引
298
+
299
+ 删除指定索引。
300
+
301
+ Please refer to HUAWEI cloud API Explorer for details.
302
+
303
+ :param request: Request instance for DeleteIndex
304
+ :type request: :class:`huaweicloudsdkdwr.v1.DeleteIndexRequest`
305
+ :rtype: :class:`huaweicloudsdkdwr.v1.DeleteIndexResponse`
306
+ """
307
+ http_info = self._delete_index_http_info(request)
308
+ return self._call_api(**http_info)
309
+
310
+ def delete_index_invoker(self, request):
311
+ http_info = self._delete_index_http_info(request)
312
+ return SyncInvoker(self, http_info)
313
+
314
+ @classmethod
315
+ def _delete_index_http_info(cls, request):
316
+ http_info = {
317
+ "method": "POST",
318
+ "resource_path": "/v1/indexes/delete",
319
+ "request_type": request.__class__.__name__,
320
+ "response_type": "DeleteIndexResponse"
321
+ }
322
+
323
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
324
+
325
+ cname = None
326
+
327
+ collection_formats = {}
328
+
329
+ path_params = {}
330
+
331
+ query_params = []
332
+
333
+ header_params = {}
334
+
335
+ form_params = {}
336
+
337
+ body = None
338
+ if 'body' in local_var_params:
339
+ body = local_var_params['body']
340
+ if isinstance(request, SdkStreamRequest):
341
+ body = request.get_file_stream()
342
+
343
+ response_headers = []
344
+
345
+ header_params['Content-Type'] = http_utils.select_header_content_type(
346
+ ['application/json'])
347
+
348
+ auth_settings = []
349
+
350
+ http_info["cname"] = cname
351
+ http_info["collection_formats"] = collection_formats
352
+ http_info["path_params"] = path_params
353
+ http_info["query_params"] = query_params
354
+ http_info["header_params"] = header_params
355
+ http_info["post_params"] = form_params
356
+ http_info["body"] = body
357
+ http_info["response_headers"] = response_headers
358
+
359
+ return http_info
360
+
361
+ def delete_store(self, request):
362
+ r"""删除知识仓实例
363
+
364
+ 删除指定的知识仓实例。
365
+
366
+ Please refer to HUAWEI cloud API Explorer for details.
367
+
368
+ :param request: Request instance for DeleteStore
369
+ :type request: :class:`huaweicloudsdkdwr.v1.DeleteStoreRequest`
370
+ :rtype: :class:`huaweicloudsdkdwr.v1.DeleteStoreResponse`
371
+ """
372
+ http_info = self._delete_store_http_info(request)
373
+ return self._call_api(**http_info)
374
+
375
+ def delete_store_invoker(self, request):
376
+ http_info = self._delete_store_http_info(request)
377
+ return SyncInvoker(self, http_info)
378
+
379
+ @classmethod
380
+ def _delete_store_http_info(cls, request):
381
+ http_info = {
382
+ "method": "POST",
383
+ "resource_path": "/v1/stores/delete",
384
+ "request_type": request.__class__.__name__,
385
+ "response_type": "DeleteStoreResponse"
386
+ }
387
+
388
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
389
+
390
+ cname = None
391
+
392
+ collection_formats = {}
393
+
394
+ path_params = {}
395
+
396
+ query_params = []
397
+
398
+ header_params = {}
399
+
400
+ form_params = {}
401
+
402
+ body = None
403
+ if 'body' in local_var_params:
404
+ body = local_var_params['body']
405
+ if isinstance(request, SdkStreamRequest):
406
+ body = request.get_file_stream()
407
+
408
+ response_headers = []
409
+
410
+ header_params['Content-Type'] = http_utils.select_header_content_type(
411
+ ['application/json'])
412
+
413
+ auth_settings = []
414
+
415
+ http_info["cname"] = cname
416
+ http_info["collection_formats"] = collection_formats
417
+ http_info["path_params"] = path_params
418
+ http_info["query_params"] = query_params
419
+ http_info["header_params"] = header_params
420
+ http_info["post_params"] = form_params
421
+ http_info["body"] = body
422
+ http_info["response_headers"] = response_headers
423
+
424
+ return http_info
425
+
426
+ def describe_collection(self, request):
427
+ r"""查询collection
428
+
429
+ 在知识仓实例下查询指定的collection的信息。
430
+
431
+ Please refer to HUAWEI cloud API Explorer for details.
432
+
433
+ :param request: Request instance for DescribeCollection
434
+ :type request: :class:`huaweicloudsdkdwr.v1.DescribeCollectionRequest`
435
+ :rtype: :class:`huaweicloudsdkdwr.v1.DescribeCollectionResponse`
436
+ """
437
+ http_info = self._describe_collection_http_info(request)
438
+ return self._call_api(**http_info)
439
+
440
+ def describe_collection_invoker(self, request):
441
+ http_info = self._describe_collection_http_info(request)
442
+ return SyncInvoker(self, http_info)
443
+
444
+ @classmethod
445
+ def _describe_collection_http_info(cls, request):
446
+ http_info = {
447
+ "method": "POST",
448
+ "resource_path": "/v1/collections/describe",
449
+ "request_type": request.__class__.__name__,
450
+ "response_type": "DescribeCollectionResponse"
451
+ }
452
+
453
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
454
+
455
+ cname = None
456
+
457
+ collection_formats = {}
458
+
459
+ path_params = {}
460
+
461
+ query_params = []
462
+
463
+ header_params = {}
464
+
465
+ form_params = {}
466
+
467
+ body = None
468
+ if 'body' in local_var_params:
469
+ body = local_var_params['body']
470
+ if isinstance(request, SdkStreamRequest):
471
+ body = request.get_file_stream()
472
+
473
+ response_headers = []
474
+
475
+ header_params['Content-Type'] = http_utils.select_header_content_type(
476
+ ['application/json'])
477
+
478
+ auth_settings = []
479
+
480
+ http_info["cname"] = cname
481
+ http_info["collection_formats"] = collection_formats
482
+ http_info["path_params"] = path_params
483
+ http_info["query_params"] = query_params
484
+ http_info["header_params"] = header_params
485
+ http_info["post_params"] = form_params
486
+ http_info["body"] = body
487
+ http_info["response_headers"] = response_headers
488
+
489
+ return http_info
490
+
491
+ def describe_index(self, request):
492
+ r"""查询索引
493
+
494
+ 查询指定索引的详细信息。
495
+
496
+ Please refer to HUAWEI cloud API Explorer for details.
497
+
498
+ :param request: Request instance for DescribeIndex
499
+ :type request: :class:`huaweicloudsdkdwr.v1.DescribeIndexRequest`
500
+ :rtype: :class:`huaweicloudsdkdwr.v1.DescribeIndexResponse`
501
+ """
502
+ http_info = self._describe_index_http_info(request)
503
+ return self._call_api(**http_info)
504
+
505
+ def describe_index_invoker(self, request):
506
+ http_info = self._describe_index_http_info(request)
507
+ return SyncInvoker(self, http_info)
508
+
509
+ @classmethod
510
+ def _describe_index_http_info(cls, request):
511
+ http_info = {
512
+ "method": "POST",
513
+ "resource_path": "/v1/indexes/describe",
514
+ "request_type": request.__class__.__name__,
515
+ "response_type": "DescribeIndexResponse"
516
+ }
517
+
518
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
519
+
520
+ cname = None
521
+
522
+ collection_formats = {}
523
+
524
+ path_params = {}
525
+
526
+ query_params = []
527
+
528
+ header_params = {}
529
+
530
+ form_params = {}
531
+
532
+ body = None
533
+ if 'body' in local_var_params:
534
+ body = local_var_params['body']
535
+ if isinstance(request, SdkStreamRequest):
536
+ body = request.get_file_stream()
537
+
538
+ response_headers = []
539
+
540
+ header_params['Content-Type'] = http_utils.select_header_content_type(
541
+ ['application/json'])
542
+
543
+ auth_settings = []
544
+
545
+ http_info["cname"] = cname
546
+ http_info["collection_formats"] = collection_formats
547
+ http_info["path_params"] = path_params
548
+ http_info["query_params"] = query_params
549
+ http_info["header_params"] = header_params
550
+ http_info["post_params"] = form_params
551
+ http_info["body"] = body
552
+ http_info["response_headers"] = response_headers
553
+
554
+ return http_info
555
+
556
+ def describe_job(self, request):
557
+ r"""获取指定ID任务信息
558
+
559
+ 根据指定的jobid查询任务信息。用于在创建和删除知识仓实例操作执行成功后,通过响应中返回的job_id,来查询创建和删除知识仓实例执行的具体结果。
560
+
561
+ Please refer to HUAWEI cloud API Explorer for details.
562
+
563
+ :param request: Request instance for DescribeJob
564
+ :type request: :class:`huaweicloudsdkdwr.v1.DescribeJobRequest`
565
+ :rtype: :class:`huaweicloudsdkdwr.v1.DescribeJobResponse`
566
+ """
567
+ http_info = self._describe_job_http_info(request)
568
+ return self._call_api(**http_info)
569
+
570
+ def describe_job_invoker(self, request):
571
+ http_info = self._describe_job_http_info(request)
572
+ return SyncInvoker(self, http_info)
573
+
574
+ @classmethod
575
+ def _describe_job_http_info(cls, request):
576
+ http_info = {
577
+ "method": "POST",
578
+ "resource_path": "/v1/jobs/describe",
579
+ "request_type": request.__class__.__name__,
580
+ "response_type": "DescribeJobResponse"
581
+ }
582
+
583
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
584
+
585
+ cname = None
586
+
587
+ collection_formats = {}
588
+
589
+ path_params = {}
590
+
591
+ query_params = []
592
+
593
+ header_params = {}
594
+
595
+ form_params = {}
596
+
597
+ body = None
598
+ if 'body' in local_var_params:
599
+ body = local_var_params['body']
600
+ if isinstance(request, SdkStreamRequest):
601
+ body = request.get_file_stream()
602
+
603
+ response_headers = []
604
+
605
+ header_params['Content-Type'] = http_utils.select_header_content_type(
606
+ ['application/json'])
607
+
608
+ auth_settings = []
609
+
610
+ http_info["cname"] = cname
611
+ http_info["collection_formats"] = collection_formats
612
+ http_info["path_params"] = path_params
613
+ http_info["query_params"] = query_params
614
+ http_info["header_params"] = header_params
615
+ http_info["post_params"] = form_params
616
+ http_info["body"] = body
617
+ http_info["response_headers"] = response_headers
618
+
619
+ return http_info
620
+
621
+ def describe_store(self, request):
622
+ r"""查询知识仓实例
623
+
624
+ 查询指定知识仓实例的详细信息。
625
+
626
+ Please refer to HUAWEI cloud API Explorer for details.
627
+
628
+ :param request: Request instance for DescribeStore
629
+ :type request: :class:`huaweicloudsdkdwr.v1.DescribeStoreRequest`
630
+ :rtype: :class:`huaweicloudsdkdwr.v1.DescribeStoreResponse`
631
+ """
632
+ http_info = self._describe_store_http_info(request)
633
+ return self._call_api(**http_info)
634
+
635
+ def describe_store_invoker(self, request):
636
+ http_info = self._describe_store_http_info(request)
637
+ return SyncInvoker(self, http_info)
638
+
639
+ @classmethod
640
+ def _describe_store_http_info(cls, request):
641
+ http_info = {
642
+ "method": "POST",
643
+ "resource_path": "/v1/stores/describe",
644
+ "request_type": request.__class__.__name__,
645
+ "response_type": "DescribeStoreResponse"
646
+ }
647
+
648
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
649
+
650
+ cname = None
651
+
652
+ collection_formats = {}
653
+
654
+ path_params = {}
655
+
656
+ query_params = []
657
+
658
+ header_params = {}
659
+
660
+ form_params = {}
661
+
662
+ body = None
663
+ if 'body' in local_var_params:
664
+ body = local_var_params['body']
665
+ if isinstance(request, SdkStreamRequest):
666
+ body = request.get_file_stream()
667
+
668
+ response_headers = []
669
+
670
+ header_params['Content-Type'] = http_utils.select_header_content_type(
671
+ ['application/json'])
672
+
673
+ auth_settings = []
674
+
675
+ http_info["cname"] = cname
676
+ http_info["collection_formats"] = collection_formats
677
+ http_info["path_params"] = path_params
678
+ http_info["query_params"] = query_params
679
+ http_info["header_params"] = header_params
680
+ http_info["post_params"] = form_params
681
+ http_info["body"] = body
682
+ http_info["response_headers"] = response_headers
683
+
684
+ return http_info
685
+
686
+ def get_progress(self, request):
687
+ r"""查询索引构建进度
688
+
689
+ 查询指定索引的构建进度。
690
+
691
+ Please refer to HUAWEI cloud API Explorer for details.
692
+
693
+ :param request: Request instance for GetProgress
694
+ :type request: :class:`huaweicloudsdkdwr.v1.GetProgressRequest`
695
+ :rtype: :class:`huaweicloudsdkdwr.v1.GetProgressResponse`
696
+ """
697
+ http_info = self._get_progress_http_info(request)
698
+ return self._call_api(**http_info)
699
+
700
+ def get_progress_invoker(self, request):
701
+ http_info = self._get_progress_http_info(request)
702
+ return SyncInvoker(self, http_info)
703
+
704
+ @classmethod
705
+ def _get_progress_http_info(cls, request):
706
+ http_info = {
707
+ "method": "POST",
708
+ "resource_path": "/v1/indexes/get-progress",
709
+ "request_type": request.__class__.__name__,
710
+ "response_type": "GetProgressResponse"
711
+ }
712
+
713
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
714
+
715
+ cname = None
716
+
717
+ collection_formats = {}
718
+
719
+ path_params = {}
720
+
721
+ query_params = []
722
+
723
+ header_params = {}
724
+
725
+ form_params = {}
726
+
727
+ body = None
728
+ if 'body' in local_var_params:
729
+ body = local_var_params['body']
730
+ if isinstance(request, SdkStreamRequest):
731
+ body = request.get_file_stream()
732
+
733
+ response_headers = []
734
+
735
+ header_params['Content-Type'] = http_utils.select_header_content_type(
736
+ ['application/json'])
737
+
738
+ auth_settings = []
739
+
740
+ http_info["cname"] = cname
741
+ http_info["collection_formats"] = collection_formats
742
+ http_info["path_params"] = path_params
743
+ http_info["query_params"] = query_params
744
+ http_info["header_params"] = header_params
745
+ http_info["post_params"] = form_params
746
+ http_info["body"] = body
747
+ http_info["response_headers"] = response_headers
748
+
749
+ return http_info
750
+
751
+ def list_collections(self, request):
752
+ r"""列举collection
753
+
754
+ 列举指定知识仓实例中所有的collections。
755
+
756
+ Please refer to HUAWEI cloud API Explorer for details.
757
+
758
+ :param request: Request instance for ListCollections
759
+ :type request: :class:`huaweicloudsdkdwr.v1.ListCollectionsRequest`
760
+ :rtype: :class:`huaweicloudsdkdwr.v1.ListCollectionsResponse`
761
+ """
762
+ http_info = self._list_collections_http_info(request)
763
+ return self._call_api(**http_info)
764
+
765
+ def list_collections_invoker(self, request):
766
+ http_info = self._list_collections_http_info(request)
767
+ return SyncInvoker(self, http_info)
768
+
769
+ @classmethod
770
+ def _list_collections_http_info(cls, request):
771
+ http_info = {
772
+ "method": "POST",
773
+ "resource_path": "/v1/collections/list",
774
+ "request_type": request.__class__.__name__,
775
+ "response_type": "ListCollectionsResponse"
776
+ }
777
+
778
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
779
+
780
+ cname = None
781
+
782
+ collection_formats = {}
783
+
784
+ path_params = {}
785
+
786
+ query_params = []
787
+
788
+ header_params = {}
789
+
790
+ form_params = {}
791
+
792
+ body = None
793
+ if 'body' in local_var_params:
794
+ body = local_var_params['body']
795
+ if isinstance(request, SdkStreamRequest):
796
+ body = request.get_file_stream()
797
+
798
+ response_headers = []
799
+
800
+ header_params['Content-Type'] = http_utils.select_header_content_type(
801
+ ['application/json'])
802
+
803
+ auth_settings = []
804
+
805
+ http_info["cname"] = cname
806
+ http_info["collection_formats"] = collection_formats
807
+ http_info["path_params"] = path_params
808
+ http_info["query_params"] = query_params
809
+ http_info["header_params"] = header_params
810
+ http_info["post_params"] = form_params
811
+ http_info["body"] = body
812
+ http_info["response_headers"] = response_headers
813
+
814
+ return http_info
815
+
816
+ def list_jobs(self, request):
817
+ r"""查询任务列表
818
+
819
+ 根据指定条件查询列举任务的详情。
820
+
821
+ Please refer to HUAWEI cloud API Explorer for details.
822
+
823
+ :param request: Request instance for ListJobs
824
+ :type request: :class:`huaweicloudsdkdwr.v1.ListJobsRequest`
825
+ :rtype: :class:`huaweicloudsdkdwr.v1.ListJobsResponse`
826
+ """
827
+ http_info = self._list_jobs_http_info(request)
828
+ return self._call_api(**http_info)
829
+
830
+ def list_jobs_invoker(self, request):
831
+ http_info = self._list_jobs_http_info(request)
832
+ return SyncInvoker(self, http_info)
833
+
834
+ @classmethod
835
+ def _list_jobs_http_info(cls, request):
836
+ http_info = {
837
+ "method": "POST",
838
+ "resource_path": "/v1/jobs/list",
839
+ "request_type": request.__class__.__name__,
840
+ "response_type": "ListJobsResponse"
841
+ }
842
+
843
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
844
+
845
+ cname = None
846
+
847
+ collection_formats = {}
848
+
849
+ path_params = {}
850
+
851
+ query_params = []
852
+ if 'start_time' in local_var_params:
853
+ query_params.append(('start_time', local_var_params['start_time']))
854
+ if 'end_time' in local_var_params:
855
+ query_params.append(('end_time', local_var_params['end_time']))
856
+ if 'status' in local_var_params:
857
+ query_params.append(('status', local_var_params['status']))
858
+ if 'offset' in local_var_params:
859
+ query_params.append(('offset', local_var_params['offset']))
860
+ if 'limit' in local_var_params:
861
+ query_params.append(('limit', local_var_params['limit']))
862
+
863
+ header_params = {}
864
+
865
+ form_params = {}
866
+
867
+ body = None
868
+ if isinstance(request, SdkStreamRequest):
869
+ body = request.get_file_stream()
870
+
871
+ response_headers = []
872
+
873
+ header_params['Content-Type'] = http_utils.select_header_content_type(
874
+ ['application/json'])
875
+
876
+ auth_settings = []
877
+
878
+ http_info["cname"] = cname
879
+ http_info["collection_formats"] = collection_formats
880
+ http_info["path_params"] = path_params
881
+ http_info["query_params"] = query_params
882
+ http_info["header_params"] = header_params
883
+ http_info["post_params"] = form_params
884
+ http_info["body"] = body
885
+ http_info["response_headers"] = response_headers
886
+
887
+ return http_info
888
+
889
+ def list_stores(self, request):
890
+ r"""列举知识仓实例
891
+
892
+ 列举租户所有的知识仓实例。
893
+
894
+ Please refer to HUAWEI cloud API Explorer for details.
895
+
896
+ :param request: Request instance for ListStores
897
+ :type request: :class:`huaweicloudsdkdwr.v1.ListStoresRequest`
898
+ :rtype: :class:`huaweicloudsdkdwr.v1.ListStoresResponse`
899
+ """
900
+ http_info = self._list_stores_http_info(request)
901
+ return self._call_api(**http_info)
902
+
903
+ def list_stores_invoker(self, request):
904
+ http_info = self._list_stores_http_info(request)
905
+ return SyncInvoker(self, http_info)
906
+
907
+ @classmethod
908
+ def _list_stores_http_info(cls, request):
909
+ http_info = {
910
+ "method": "POST",
911
+ "resource_path": "/v1/stores/list",
912
+ "request_type": request.__class__.__name__,
913
+ "response_type": "ListStoresResponse"
914
+ }
915
+
916
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
917
+
918
+ cname = None
919
+
920
+ collection_formats = {}
921
+
922
+ path_params = {}
923
+
924
+ query_params = []
925
+
926
+ header_params = {}
927
+
928
+ form_params = {}
929
+
930
+ body = None
931
+ if isinstance(request, SdkStreamRequest):
932
+ body = request.get_file_stream()
933
+
934
+ response_headers = []
935
+
936
+ header_params['Content-Type'] = http_utils.select_header_content_type(
937
+ ['application/json'])
938
+
939
+ auth_settings = []
940
+
941
+ http_info["cname"] = cname
942
+ http_info["collection_formats"] = collection_formats
943
+ http_info["path_params"] = path_params
944
+ http_info["query_params"] = query_params
945
+ http_info["header_params"] = header_params
946
+ http_info["post_params"] = form_params
947
+ http_info["body"] = body
948
+ http_info["response_headers"] = response_headers
949
+
950
+ return http_info
951
+
952
+ def load_collection(self, request):
953
+ r"""加载collection
954
+
955
+ 加载指定collection的数据。加载成功后,才能执行查询操作。
956
+
957
+ Please refer to HUAWEI cloud API Explorer for details.
958
+
959
+ :param request: Request instance for LoadCollection
960
+ :type request: :class:`huaweicloudsdkdwr.v1.LoadCollectionRequest`
961
+ :rtype: :class:`huaweicloudsdkdwr.v1.LoadCollectionResponse`
962
+ """
963
+ http_info = self._load_collection_http_info(request)
964
+ return self._call_api(**http_info)
965
+
966
+ def load_collection_invoker(self, request):
967
+ http_info = self._load_collection_http_info(request)
968
+ return SyncInvoker(self, http_info)
969
+
970
+ @classmethod
971
+ def _load_collection_http_info(cls, request):
972
+ http_info = {
973
+ "method": "POST",
974
+ "resource_path": "/v1/collections/load",
975
+ "request_type": request.__class__.__name__,
976
+ "response_type": "LoadCollectionResponse"
977
+ }
978
+
979
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
980
+
981
+ cname = None
982
+
983
+ collection_formats = {}
984
+
985
+ path_params = {}
986
+
987
+ query_params = []
988
+
989
+ header_params = {}
990
+
991
+ form_params = {}
992
+
993
+ body = None
994
+ if 'body' in local_var_params:
995
+ body = local_var_params['body']
996
+ if isinstance(request, SdkStreamRequest):
997
+ body = request.get_file_stream()
998
+
999
+ response_headers = []
1000
+
1001
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1002
+ ['application/json'])
1003
+
1004
+ auth_settings = []
1005
+
1006
+ http_info["cname"] = cname
1007
+ http_info["collection_formats"] = collection_formats
1008
+ http_info["path_params"] = path_params
1009
+ http_info["query_params"] = query_params
1010
+ http_info["header_params"] = header_params
1011
+ http_info["post_params"] = form_params
1012
+ http_info["body"] = body
1013
+ http_info["response_headers"] = response_headers
1014
+
1015
+ return http_info
1016
+
1017
+ def release_collection(self, request):
1018
+ r"""卸载collection
1019
+
1020
+ 卸载已加载collection的数据。
1021
+
1022
+ Please refer to HUAWEI cloud API Explorer for details.
1023
+
1024
+ :param request: Request instance for ReleaseCollection
1025
+ :type request: :class:`huaweicloudsdkdwr.v1.ReleaseCollectionRequest`
1026
+ :rtype: :class:`huaweicloudsdkdwr.v1.ReleaseCollectionResponse`
1027
+ """
1028
+ http_info = self._release_collection_http_info(request)
1029
+ return self._call_api(**http_info)
1030
+
1031
+ def release_collection_invoker(self, request):
1032
+ http_info = self._release_collection_http_info(request)
1033
+ return SyncInvoker(self, http_info)
1034
+
1035
+ @classmethod
1036
+ def _release_collection_http_info(cls, request):
1037
+ http_info = {
1038
+ "method": "POST",
1039
+ "resource_path": "/v1/collections/release",
1040
+ "request_type": request.__class__.__name__,
1041
+ "response_type": "ReleaseCollectionResponse"
1042
+ }
1043
+
1044
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1045
+
1046
+ cname = None
1047
+
1048
+ collection_formats = {}
1049
+
1050
+ path_params = {}
1051
+
1052
+ query_params = []
1053
+
1054
+ header_params = {}
1055
+
1056
+ form_params = {}
1057
+
1058
+ body = None
1059
+ if 'body' in local_var_params:
1060
+ body = local_var_params['body']
1061
+ if isinstance(request, SdkStreamRequest):
1062
+ body = request.get_file_stream()
1063
+
1064
+ response_headers = []
1065
+
1066
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1067
+ ['application/json'])
1068
+
1069
+ auth_settings = []
1070
+
1071
+ http_info["cname"] = cname
1072
+ http_info["collection_formats"] = collection_formats
1073
+ http_info["path_params"] = path_params
1074
+ http_info["query_params"] = query_params
1075
+ http_info["header_params"] = header_params
1076
+ http_info["post_params"] = form_params
1077
+ http_info["body"] = body
1078
+ http_info["response_headers"] = response_headers
1079
+
1080
+ return http_info
1081
+
1082
+ def delete_entities(self, request):
1083
+ r"""删除向量
1084
+
1085
+ 在指定的collection中删除一个或多个Entity。
1086
+
1087
+ Please refer to HUAWEI cloud API Explorer for details.
1088
+
1089
+ :param request: Request instance for DeleteEntities
1090
+ :type request: :class:`huaweicloudsdkdwr.v1.DeleteEntitiesRequest`
1091
+ :rtype: :class:`huaweicloudsdkdwr.v1.DeleteEntitiesResponse`
1092
+ """
1093
+ http_info = self._delete_entities_http_info(request)
1094
+ return self._call_api(**http_info)
1095
+
1096
+ def delete_entities_invoker(self, request):
1097
+ http_info = self._delete_entities_http_info(request)
1098
+ return SyncInvoker(self, http_info)
1099
+
1100
+ @classmethod
1101
+ def _delete_entities_http_info(cls, request):
1102
+ http_info = {
1103
+ "method": "POST",
1104
+ "resource_path": "/v1/entities/delete",
1105
+ "request_type": request.__class__.__name__,
1106
+ "response_type": "DeleteEntitiesResponse"
1107
+ }
1108
+
1109
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1110
+
1111
+ cname = None
1112
+
1113
+ collection_formats = {}
1114
+
1115
+ path_params = {}
1116
+
1117
+ query_params = []
1118
+
1119
+ header_params = {}
1120
+
1121
+ form_params = {}
1122
+
1123
+ body = None
1124
+ if 'body' in local_var_params:
1125
+ body = local_var_params['body']
1126
+ if isinstance(request, SdkStreamRequest):
1127
+ body = request.get_file_stream()
1128
+
1129
+ response_headers = []
1130
+
1131
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1132
+ ['application/json'])
1133
+
1134
+ auth_settings = []
1135
+
1136
+ http_info["cname"] = cname
1137
+ http_info["collection_formats"] = collection_formats
1138
+ http_info["path_params"] = path_params
1139
+ http_info["query_params"] = query_params
1140
+ http_info["header_params"] = header_params
1141
+ http_info["post_params"] = form_params
1142
+ http_info["body"] = body
1143
+ http_info["response_headers"] = response_headers
1144
+
1145
+ return http_info
1146
+
1147
+ def hybrid_search(self, request):
1148
+ r"""混合搜索
1149
+
1150
+ 基于相似度匹配的查询方式,用于查找与给定多个向量进行相似性搜索,支持密集向量,稀疏向量等多路召回,并对结果进行重排处理,最终返回指定的 Top K 个最相似的 Entity。
1151
+
1152
+ Please refer to HUAWEI cloud API Explorer for details.
1153
+
1154
+ :param request: Request instance for HybridSearch
1155
+ :type request: :class:`huaweicloudsdkdwr.v1.HybridSearchRequest`
1156
+ :rtype: :class:`huaweicloudsdkdwr.v1.HybridSearchResponse`
1157
+ """
1158
+ http_info = self._hybrid_search_http_info(request)
1159
+ return self._call_api(**http_info)
1160
+
1161
+ def hybrid_search_invoker(self, request):
1162
+ http_info = self._hybrid_search_http_info(request)
1163
+ return SyncInvoker(self, http_info)
1164
+
1165
+ @classmethod
1166
+ def _hybrid_search_http_info(cls, request):
1167
+ http_info = {
1168
+ "method": "POST",
1169
+ "resource_path": "/v1/entities/hybrid-search",
1170
+ "request_type": request.__class__.__name__,
1171
+ "response_type": "HybridSearchResponse"
1172
+ }
1173
+
1174
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1175
+
1176
+ cname = None
1177
+
1178
+ collection_formats = {}
1179
+
1180
+ path_params = {}
1181
+
1182
+ query_params = []
1183
+
1184
+ header_params = {}
1185
+
1186
+ form_params = {}
1187
+
1188
+ body = None
1189
+ if 'body' in local_var_params:
1190
+ body = local_var_params['body']
1191
+ if isinstance(request, SdkStreamRequest):
1192
+ body = request.get_file_stream()
1193
+
1194
+ response_headers = []
1195
+
1196
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1197
+ ['application/json'])
1198
+
1199
+ auth_settings = []
1200
+
1201
+ http_info["cname"] = cname
1202
+ http_info["collection_formats"] = collection_formats
1203
+ http_info["path_params"] = path_params
1204
+ http_info["query_params"] = query_params
1205
+ http_info["header_params"] = header_params
1206
+ http_info["post_params"] = form_params
1207
+ http_info["body"] = body
1208
+ http_info["response_headers"] = response_headers
1209
+
1210
+ return http_info
1211
+
1212
+ def insert_entities(self, request):
1213
+ r"""插入向量
1214
+
1215
+ 在指定的collection中插入一个或多个Entity。
1216
+
1217
+ Please refer to HUAWEI cloud API Explorer for details.
1218
+
1219
+ :param request: Request instance for InsertEntities
1220
+ :type request: :class:`huaweicloudsdkdwr.v1.InsertEntitiesRequest`
1221
+ :rtype: :class:`huaweicloudsdkdwr.v1.InsertEntitiesResponse`
1222
+ """
1223
+ http_info = self._insert_entities_http_info(request)
1224
+ return self._call_api(**http_info)
1225
+
1226
+ def insert_entities_invoker(self, request):
1227
+ http_info = self._insert_entities_http_info(request)
1228
+ return SyncInvoker(self, http_info)
1229
+
1230
+ @classmethod
1231
+ def _insert_entities_http_info(cls, request):
1232
+ http_info = {
1233
+ "method": "POST",
1234
+ "resource_path": "/v1/entities/insert",
1235
+ "request_type": request.__class__.__name__,
1236
+ "response_type": "InsertEntitiesResponse"
1237
+ }
1238
+
1239
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1240
+
1241
+ cname = None
1242
+
1243
+ collection_formats = {}
1244
+
1245
+ path_params = {}
1246
+
1247
+ query_params = []
1248
+
1249
+ header_params = {}
1250
+
1251
+ form_params = {}
1252
+
1253
+ body = None
1254
+ if 'body' in local_var_params:
1255
+ body = local_var_params['body']
1256
+ if isinstance(request, SdkStreamRequest):
1257
+ body = request.get_file_stream()
1258
+
1259
+ response_headers = []
1260
+
1261
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1262
+ ['application/json'])
1263
+
1264
+ auth_settings = []
1265
+
1266
+ http_info["cname"] = cname
1267
+ http_info["collection_formats"] = collection_formats
1268
+ http_info["path_params"] = path_params
1269
+ http_info["query_params"] = query_params
1270
+ http_info["header_params"] = header_params
1271
+ http_info["post_params"] = form_params
1272
+ http_info["body"] = body
1273
+ http_info["response_headers"] = response_headers
1274
+
1275
+ return http_info
1276
+
1277
+ def query_entities(self, request):
1278
+ r"""标量查询
1279
+
1280
+ 接口用于精确查找与查询条件完全匹配的向量,此操作使用指定的布尔表达式对标量字段进行筛选。
1281
+
1282
+ Please refer to HUAWEI cloud API Explorer for details.
1283
+
1284
+ :param request: Request instance for QueryEntities
1285
+ :type request: :class:`huaweicloudsdkdwr.v1.QueryEntitiesRequest`
1286
+ :rtype: :class:`huaweicloudsdkdwr.v1.QueryEntitiesResponse`
1287
+ """
1288
+ http_info = self._query_entities_http_info(request)
1289
+ return self._call_api(**http_info)
1290
+
1291
+ def query_entities_invoker(self, request):
1292
+ http_info = self._query_entities_http_info(request)
1293
+ return SyncInvoker(self, http_info)
1294
+
1295
+ @classmethod
1296
+ def _query_entities_http_info(cls, request):
1297
+ http_info = {
1298
+ "method": "POST",
1299
+ "resource_path": "/v1/entities/query",
1300
+ "request_type": request.__class__.__name__,
1301
+ "response_type": "QueryEntitiesResponse"
1302
+ }
1303
+
1304
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1305
+
1306
+ cname = None
1307
+
1308
+ collection_formats = {}
1309
+
1310
+ path_params = {}
1311
+
1312
+ query_params = []
1313
+
1314
+ header_params = {}
1315
+
1316
+ form_params = {}
1317
+
1318
+ body = None
1319
+ if 'body' in local_var_params:
1320
+ body = local_var_params['body']
1321
+ if isinstance(request, SdkStreamRequest):
1322
+ body = request.get_file_stream()
1323
+
1324
+ response_headers = []
1325
+
1326
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1327
+ ['application/json'])
1328
+
1329
+ auth_settings = []
1330
+
1331
+ http_info["cname"] = cname
1332
+ http_info["collection_formats"] = collection_formats
1333
+ http_info["path_params"] = path_params
1334
+ http_info["query_params"] = query_params
1335
+ http_info["header_params"] = header_params
1336
+ http_info["post_params"] = form_params
1337
+ http_info["body"] = body
1338
+ http_info["response_headers"] = response_headers
1339
+
1340
+ return http_info
1341
+
1342
+ def search_entities(self, request):
1343
+ r"""向量查询
1344
+
1345
+ 基于相似度匹配的查询方式,用于查找与给定查询向量相似的向量。返回指定的 Top K 个最相似的 Entity。
1346
+
1347
+ Please refer to HUAWEI cloud API Explorer for details.
1348
+
1349
+ :param request: Request instance for SearchEntities
1350
+ :type request: :class:`huaweicloudsdkdwr.v1.SearchEntitiesRequest`
1351
+ :rtype: :class:`huaweicloudsdkdwr.v1.SearchEntitiesResponse`
1352
+ """
1353
+ http_info = self._search_entities_http_info(request)
1354
+ return self._call_api(**http_info)
1355
+
1356
+ def search_entities_invoker(self, request):
1357
+ http_info = self._search_entities_http_info(request)
1358
+ return SyncInvoker(self, http_info)
1359
+
1360
+ @classmethod
1361
+ def _search_entities_http_info(cls, request):
1362
+ http_info = {
1363
+ "method": "POST",
1364
+ "resource_path": "/v1/entities/search",
1365
+ "request_type": request.__class__.__name__,
1366
+ "response_type": "SearchEntitiesResponse"
1367
+ }
1368
+
1369
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1370
+
1371
+ cname = None
1372
+
1373
+ collection_formats = {}
1374
+
1375
+ path_params = {}
1376
+
1377
+ query_params = []
1378
+
1379
+ header_params = {}
1380
+
1381
+ form_params = {}
1382
+
1383
+ body = None
1384
+ if 'body' in local_var_params:
1385
+ body = local_var_params['body']
1386
+ if isinstance(request, SdkStreamRequest):
1387
+ body = request.get_file_stream()
1388
+
1389
+ response_headers = []
1390
+
1391
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1392
+ ['application/json'])
1393
+
1394
+ auth_settings = []
1395
+
1396
+ http_info["cname"] = cname
1397
+ http_info["collection_formats"] = collection_formats
1398
+ http_info["path_params"] = path_params
1399
+ http_info["query_params"] = query_params
1400
+ http_info["header_params"] = header_params
1401
+ http_info["post_params"] = form_params
1402
+ http_info["body"] = body
1403
+ http_info["response_headers"] = response_headers
1404
+
1405
+ return http_info
1406
+
1407
+ def upsert_entities(self, request):
1408
+ r"""更新向量
1409
+
1410
+ 在指定collection中更新Entity。如果pk列中值存在,则更新Entity,如果不存在,则插入Entity。
1411
+
1412
+ Please refer to HUAWEI cloud API Explorer for details.
1413
+
1414
+ :param request: Request instance for UpsertEntities
1415
+ :type request: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesRequest`
1416
+ :rtype: :class:`huaweicloudsdkdwr.v1.UpsertEntitiesResponse`
1417
+ """
1418
+ http_info = self._upsert_entities_http_info(request)
1419
+ return self._call_api(**http_info)
1420
+
1421
+ def upsert_entities_invoker(self, request):
1422
+ http_info = self._upsert_entities_http_info(request)
1423
+ return SyncInvoker(self, http_info)
1424
+
1425
+ @classmethod
1426
+ def _upsert_entities_http_info(cls, request):
1427
+ http_info = {
1428
+ "method": "POST",
1429
+ "resource_path": "/v1/entities/upsert",
1430
+ "request_type": request.__class__.__name__,
1431
+ "response_type": "UpsertEntitiesResponse"
1432
+ }
1433
+
1434
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1435
+
1436
+ cname = None
1437
+
1438
+ collection_formats = {}
1439
+
1440
+ path_params = {}
1441
+
1442
+ query_params = []
1443
+
1444
+ header_params = {}
1445
+
1446
+ form_params = {}
1447
+
1448
+ body = None
1449
+ if 'body' in local_var_params:
1450
+ body = local_var_params['body']
1451
+ if isinstance(request, SdkStreamRequest):
1452
+ body = request.get_file_stream()
1453
+
1454
+ response_headers = []
1455
+
1456
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1457
+ ['application/json'])
1458
+
1459
+ auth_settings = []
1460
+
1461
+ http_info["cname"] = cname
1462
+ http_info["collection_formats"] = collection_formats
1463
+ http_info["path_params"] = path_params
1464
+ http_info["query_params"] = query_params
1465
+ http_info["header_params"] = header_params
1466
+ http_info["post_params"] = form_params
1467
+ http_info["body"] = body
1468
+ http_info["response_headers"] = response_headers
1469
+
1470
+ return http_info
1471
+
1472
+ def _call_api(self, **kwargs):
1473
+ try:
1474
+ return self.do_http_request(**kwargs)
1475
+ except TypeError:
1476
+ import inspect
1477
+ params = inspect.signature(self.do_http_request).parameters
1478
+ http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
1479
+ return self.do_http_request(**http_info)
1480
+
1481
+ def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
1482
+ post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
1483
+ collection_formats=None, request_type=None):
1484
+ """Makes the HTTP request and returns deserialized data.
1485
+
1486
+ :param resource_path: Path to method endpoint.
1487
+ :param method: Method to call.
1488
+ :param path_params: Path parameters in the url.
1489
+ :param query_params: Query parameters in the url.
1490
+ :param header_params: Header parameters to be placed in the request header.
1491
+ :param body: Request body.
1492
+ :param post_params: Request post form parameters,
1493
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
1494
+ :param cname: Used for obs endpoint.
1495
+ :param auth_settings: Auth Settings names for the request.
1496
+ :param response_type: Response data type.
1497
+ :param response_headers: Header should be added to response data.
1498
+ :param collection_formats: dict of collection formats for path, query,
1499
+ header, and post parameters.
1500
+ :param request_type: Request data type.
1501
+ :return:
1502
+ Return the response directly.
1503
+ """
1504
+ return self.do_http_request(
1505
+ method=method,
1506
+ resource_path=resource_path,
1507
+ path_params=path_params,
1508
+ query_params=query_params,
1509
+ header_params=header_params,
1510
+ body=body,
1511
+ post_params=post_params,
1512
+ cname=cname,
1513
+ response_type=response_type,
1514
+ response_headers=response_headers,
1515
+ collection_formats=collection_formats,
1516
+ request_type=request_type)